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

Tobias Boege taboege at gmail.com
Thu Feb 27 11:58:45 CET 2020


On Wed, 26 Feb 2020, Christof Thalhofer wrote:
> Hello Tobias,
> 
> in your branch gb.test.tab:
> 
> Could you restore the three BailOuts with Quit in the gb.test component
> as we spoke and comment them with "Emergency Stop"?
> 
> If gb.test there prints out pure TAP without summary by default we could
> merge it into master. Am I right with this conclusion?
> 
> Then I could continue working on gb.test in master and we could marry it
> with the interpreter. After that we can concentrate on the GUI.
> 

I will have to finish this on the train and push later today. But here is
what I'll do: I'll restore BailOuts and Quits and rebase on current master.

There will be a slight inconvenience you will notice when you run the self-
tests of gb.test: for the self-tests I connected the Assert module to a
string stream which is read by the TestHarness to produce UnitTest.PrintSummary()
afterwards. But it is *not* read in realtime and it is not echoed to the
console. Since everything is in one process, all the tests first have to
be run, their results buffered (in a string, not the console) and then the
TAP can be summarized and echoed.

Unfortunately, when an error happens, as in TestFailures.test, the process
is Quit before that routine gets to run and until that routine runs, you see
nothing! But this is just a temporary issue. I add a flag which disables
the string stream stuff (also disables PrintSummary) and prints TAP directly
to console as it is Assert'ed. You can use that to verify that TestFailures
still works.

And an observation: do we still need the inheritance hierarchy of ITest
and ITestCase now that tests are identified by the .test extension?
Their names are kind of funky and they are almost empty.

Regards,
Tobi

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20200227/a199b085/attachment.sig>


More information about the User mailing list