[Gambas-user] New component gb.test
Tobias Boege
taboege at gmail.com
Sat May 19 02:44:44 CEST 2018
Hi all,
continuing from this thread: https://lists.gambas-basic.org/pipermail/user/2018-April/063732.html
I have pushed the to-be unit testing component to (a separate branch of)
the official repository [1]. I think this is the easiest way to enable
collaboration on it, and it has to be merged at some point anyway, as we
plan to have the IDE use it. I have substantially cleaned the repository
up today and it is now in a state where others can dive into it and get
the right idea of how it is supposed to work.
It is now named gb.test as Adrien suggested, was previously gb.unittest
and gb.deg.unittest before that. It was originally written by Christof
and inspired by COMUnit, which in turn was inspired by JUnit. But I have
been rewriting it to the Test Anything Protocol.
Lots of history... and I pulled all that into the branch. I hope that's
okay, even if the old commit messages aren't in the usual format.
To kick it off, I created a TODO file in the component:
* Integration into the IDE with bells and whistles and a command-line tool for automated testing
* Compiler and interpreter support for test classes (list them), fixtures and data files (do not include them in installable packages)
* Internal and external (wiki) documentation, test how-to
* Test ourselves, including how well we interface with other TAP software
* More assertion convenience functions, use diagnostic messages to detail test failures for the user (Test::Differences in perl5)
* Subtest support (see http://search.cpan.org/~exodist/Test-Simple-1.302136/lib/Test/More.pm)
The former two points are bigger endeavours and probably need Benoit's
guidance, but until these two points are implemented, the usability of
the component is rather limited. The latter points could be taken by
anyone right now.
I am probably starting with the documentation, as I have noticed that
the TAP architecture is quite different from the one inspired by JUnit.
Besides the raw meaning of the interface, some explanations of how the
classes are intended to work together are in order.
Regards,
Tobi
[1] https://gitlab.com/gambas/gambas/tree/gb.test
--
"There's an old saying: Don't change anything... ever!" -- Mr. Monk
More information about the User
mailing list