[Gambas-user] Questions about gb.test and gb.test.tap
Christof Thalhofer
chrisml at deganius.de
Thu Feb 27 18:34:18 CET 2020
Am 27.02.20 um 11:58 schrieb Tobias Boege:
> 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.
Ok. Depending on where you are, you might have more time. Here in
Bavaria they stop the trains because of storm warnings ... have a nice
journey! :-)
> 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.
I think that you are aware of the fact that this behavior is not what we
want. Each assertion has to be printed out as soon as it happened so
that a crash of the whole system ... ah yes, you are ...:
> 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.
The last one is what we always expect from gb.test running inside the
project to be tested, so I think this should be the default. It has to
print out pure TAP. Parsing, analyzing etc. has to be done "from
outside" by the process which tests the project and here gb.test.tap can
unfold its full beauty.
> 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.
I also thought of better getting rid of them. They are leftovers of the
software archaeology thing I did in earlier days. Their main purpose is
that each dependent has a method Run(). Naturally this can be done
easier but as soon as you comment out "Inherits iTest" anywhere the
whole house of cards collapses. I was just too lazy to search for the
reason. If your train ride is really boring, maybe you can find the
energy to do it.
Funky was ferrry nice back in the eighties ...
... I always think of a test pyjamas suit.
;-)
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/20200227/084a647c/attachment.sig>
More information about the User
mailing list