[Gambas-user] New component gb.test

Christof Thalhofer chrisml at deganius.de
Wed May 23 08:24:30 CEST 2018


Hello dear Adrien,

Am 23.05.2018 um 01:03 schrieb Adrien Prokopowicz:

> I'm sorry, I may have been missing something again, but you are talking 
> about this code here, right ?
> 
> https://github.com/Deganius/gb.deg.unittest/tree/develop (the develop 
> branch, not the master one)

Yes. The develop branch is an excerpt from the master branch. All GUI
stripped and (very primitive) output as TAP.

If you look at the master branch, that has also output to console, but
no TAP.

> If this is indeed your latest work, the public API you have implemented 
> does indeed look like what I'm proposing in my previous messages (only a 
> bit less concise, but still globally the same idea), but your inner 
> implementation does not do many things I'm discussing here : mainly 
> testing in separate, multiple processes, streaming TAP output, splitting 
> gbtest3/gb.test, and Assertions that stop the execution flow.

I doubt that testing in separate multiple processes (one per test) is
even necessary. I think it disturbs flexibility and/or makes all much
more complicated. And if failing assertions really should stop the
execution flow of one test or just report the failing is also a thing
that could be discussed. But it would be very easy to implement it.

Please make a component out of one of the two above and use it to test
code of your own. You may find out, that it does all things needed just
like any other unit testing framework.

The only thing which is a big annoying caveat, is, that a project has to
depend on it. There we are searching for a solution, Benoît wanted to do
something to integrate it to Gambas and his first suggestion was "gbx3 -s".

But maybe that is not the best ... and there would be a more elegant
solution.

Maybe sth like gbx3 -s module -m "method1 method2 method3 ..." would be
possible and much better? Also for the future of Gambas?

> I apologize if my previous messages look too imperative, I assure you 
> this is not the intent. The goal of these is to simply discuss subjects 
> that I think are important, and also to confirm things that have been 
> done/discussed already so it is clear for everyone reading.

Thank you! I also apologize for my rant. But it costed me the whole
weekend to discuss things that have been aready done but invented new by
Tobi in pre-pre-alpha.

We have now 2 test execution engines, 2 Tap printers and 2 times
assertions. Tobis assertions are much more elegant than mine. :-)

And my fear was indeed that here that happens again.

Ok. So ... perhaps we should 1st define, what an unittesting system for
Gambas has to do (but without details of implementation), then look what
has been done already and if it is sufficient, then what is missing and
at last talk about implementation.

Can you agree with that?


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/20180523/1cfcd776/attachment.sig>


More information about the User mailing list