[Gambas-user] Questions about gb.test and gb.test.tap

Christof Thalhofer chrisml at deganius.de
Tue Feb 25 11:57:17 CET 2020


Am 25.02.20 um 10:10 schrieb Benoît Minisini:

>> I do not want to run the "full project in test mode" while I am
>> programming. I have projects that need two minutes to test. So I just
>> want to test one single testmethod while I work.
> 
> So, in test mode, the IDE must provide an interface to choose which test 
> we want to run.
> 
> Can we assume that a "test" is a full module, or do we have to be able 
> to choose one method in the test module?

A single test is one method inside a test module.

> Could we use help commentaries in the test modules to define the display 
> name of the tests?

I'd want to avoid that at all costs. It not only makes just more work
but also provides the additional chance of human failures.

gb.test:Unittest, which you can imagine as the "test orchestrator", with
its arguments in the current state provides that (cherrypicking of one
module with or without one method).

I even wanted to extend it's optional arguments with a variable that can
take a JSON string that defines a certain test plan to extend the
possibilities of cherry-picking. Imagine this szenario:

You have a few tests, which should run now, while you are in a
programming process. These tests should also run later when it goes to
production.

Then you have a couple of tests, which should only run when a certain db
connection is available.

Then you have a lot of tests that are mandatory to succeed if the
program goes to production but the db tests should not be done, because
the CI (continuous integration) system has no db connection.

-----------------------

Please have a look at the code of gbt3.

It creates a startmodule, injects it into the project to be tested,
compiles it, runs the tests and then deletes the startmodule afterwards
and compiles the project again.

It produces TAP on stdout.

For me that could be a solution.

Alles Gute

Christof Thalhofer

-- 
Dies ist keine Signatur

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20200225/4615ddf3/attachment.sig>


More information about the User mailing list