[Gambas-user] Test Module Order of test unit execution

Brian G brian at westwoodsvcs.com
Sat Jul 18 11:11:13 CEST 2020

Thanks Christof Thalhofer 

I did that and it works fine. 

One issue That I did find is that the _Setup _Teardown are not case insensative 
if you don't type it just like _Setup it is never found, 

I had that problem I put _setup and spent quite a while trying to figure out why it did not work! 

Thank You 
Brian G 
Hi Brian, 

Am 18.07.20 um 01:26 schrieb Brian G: 

> eg setupall.test - contains the _setup for all of the units and 
> a dummy assert to make it execute 
> testMod1.test - some tests 
> TestMod2.test 
> testMod3.test 
> teardownall.test - contains the _teardown and a dummy assert 
> to make it execute 
> How do i control the order in which these are executed? 

Testmodules and testmethods are executed in alphabetical order of their 
names. So if you want to do it the way you want, you should name the 
modules that way: 


Btw I don't like such dependencies. They destroy the idea of testsuites. 
I don't recommend it. Testmodules should always be independent of each 
other! You could also do this with hidden helper methods called by 
_Setup() and _Teardown() inside each testmodule. 

If you had answered this in the mailinglist, my answer could be found in 
future by others who face the same problem. 

Alles Gute 

Christof Thalhofer 

Dies ist keine Signatur 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20200718/e611a951/attachment-0001.html>

More information about the User mailing list