[Gambas-user] Integrate unittest component to Gambas

Benoît Minisini g4mba5 at gmail.com
Sat Apr 21 19:43:22 CEST 2018


Le 21/04/2018 à 18:46, Christof Thalhofer a écrit :
> Hello,
> 
> my component for unittesting is working flawlessly and I do a lot of
> test-driven programming in Gambas with it.
> 
> I would like to integrate it to Gambas.
> 
> The current name is gb.deg.unittest (because currently it is an internal
> component for my firm), we could rename it to gb.unittest.
> 
> If you agree, I would have to split it into two components, gb.unittest
> and gb.unittest-ui, this is done in one hour.
> 
> Is there a chance to integrate it to Gambas or are there any caveats?
> 
> https://github.com/Deganius/gb.deg.unittest/
> 
> 
> Alles Gute
> 
> Christof Thalhofer
> 

No problem to add a new component, but I'm not sure to understand your 
interface. So maybe I will tell rubbish.

ATestContainer -> it's actually the parent class for all tests?

UnitTest -> Why this class? And why do you have to instanciate it? If it 
is just there to run all the test, I suggest mergin UnitTest and 
ATestContainer, and just make a static method "Run()" to run all the 
unit tests in the exported classes inheriting the new "UnitTest".

As for the GUI, I think it should be be extern to the tested project and 
merged into the IDE.

The result of the tests should be provided to the standard output in a 
standard format that will be displayed by your GUI in the IDE.

The unit test will be run by forcing the startup class run by the 
interpreter to "UnitTest".

What do you think about that? Does it raise any problem?

-- 
Benoît Minisini


More information about the User mailing list