[Gambas-user] Merge request for gb.test

Benoît Minisini g4mba5 at gmail.com
Wed Sep 11 00:49:24 CEST 2019


Le 10/09/2019 à 14:28, Christof Thalhofer a écrit :
> Hello Benoît,
> 
> I just created a merge request for the component gb.test.
> 
> With this component I test all my software written in Gambas with
> several hundred tests before we put it into production. I also use it to
> do test-driven development. It has greatly stabilized the quality of all
> my projects and I hope you see value in it as well. I would be very
> happy if it could be integrated into Gambas.
> 
> I tried to integrate things which were mentioned by you and other
> members of the Gambas community when we discussed unittests more than a
> year ago.
> 
> gb.test produces TAP output to Stdout as described in this
> specification: http://testanything.org/tap-specification.html
> 
> It lacks only "TODO", which can easily be implemented later.
> 
> TAP can be used to display or process the results in multiple ways.
> 
> gb.test also allows a project to be tested "from outside", as shown in
> the file "test.sh" and so allows automated testing for example in
> servers for continuous integration.
> 
> I usually use it myself so, that during development I start
> Unittest.Main() with F5 and watch the console. I would be happy if tests
> could still be triggered quickly with one key or even from a module in
> future.
> 
> 
> Alles Gute
> 
> Christof Thalhofer
> 

I will start to merge it after the release of Gambas 3.14 (soon !).

I just quickly look at your code, and I may suggest some changes in the 
public interface of the component. I saw a lot of identifiers I don't like.

Did you see that 'gb.util' adds a Class.Stat() static method that allows 
to get some information about any project class without loading it? With 
that you should be able to get all classes that inherits UnitTest.

There is no function that returns the list of project classes, but it is 
just a metter of browsing the ".gambas" directory.

Regards,

-- 
Benoît Minisini


More information about the User mailing list