[Gambas-user] New component gb.test

Christof Thalhofer chrisml at deganius.de
Tue May 22 10:57:53 CEST 2018


Hi Tobi, Hi Adrien,

I see this all as a very creative exploring of possibilities. So there
is nothing wrong if you (Tobi) did sth other than I did. We have Git, so
we are free to play around.

Things have been as far as I can see:

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

There is an existing and working testing framework interwoven with GUI
in gb.deg.unittest/master

The same thing but without GUI is in
gb.deg.unittest/develop

(here are Benoîts mentions realized)
(To make it better understandable how it works I think I have to create
a flowchart)

We have a TAP printer (that I really do not understand until now, my
fault, as I concentrated at TestHarness) in gb.test.

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

There are things both approaches (gb.deg.unittest and gb.test) have in
common and these are assertions (in german "Behauptungen", in french
"affirmations"?) which have to be true that a test succeeds.

By the way, the assertions you (Tobi) wrote are way better and much more
elegant than mine!

So as I can see, we can couple these two approaches together in this way:

The code in gb.deg.unittest arranges tests (single methods) in
testcontainers (classes that inherit Unittest), adds fixtures, creates a
plan (this is already done) and should bring these tests to execution.

Currently this central functionality of execution is done in
gb.deg.unittest TestCase.Run.

We should talk about the way how the code should be executed. Maybe we
need some magic here. Can (or should) we hand out the code to a separate
interpreter process? How?

Every test contains one or more assertions.

If an assertion is processed then it has to engage Tapprinter and
that prints out TAP.

If an error occurs Tapprinter has also to be engaged. So the testmethods
have to be executed with Try.

That's all, such easy ;-)

After that sth has to parse the TAP output, maybe has to do some
accounting and display the result in GUI and/or console.

What we also should talk about is, how a couple of tests could be
arranged (organized) in GUI and/or code.

But now my free time ends and I have to work to earn some money ;-)


Alles Gute

Christof Thalhofer

-- 
Dies ist keine Signatur

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20180522/a468b778/attachment.sig>


More information about the User mailing list