Jump to content
Sign in to follow this  
bernhard_LA

best practise unit testing , DUNITX

Recommended Posts

following the samples  from  http://delphiprogrammingdiary.blogspot.com/2018/09/introducing-dunitx-new-unit-test.html  

we  created  now  also 2 different delphi projects *.dpr   for each test 

 

a) the consoleAPP  for automatic execution  within JENKINS and CI 

b) the VCLGUI app for  debugging of our testcases 

 

 

we include  the testcas.pas file  inside  both  projects 

 

Q1 : any known issue while sharing the test case  class (*.pas) between VCLGUI app and console APP ?

 

Q2 :  how to separate  or  select different  test cases?   we have test cases  with a very short execution   time  ( below  1 min)   and some with a very  long execution time  (several hours)

        if I could select the  individual testcase via the GUI, this would help,  I don' want to create a third App  for the  long test cases .... 

 

Edited by bernhard_LA

Share this post


Link to post
1 hour ago, bernhard_LA said:

Q1 : any known issue while sharing the test case  class (*.pas) between VCLGUI app and console APP ?

None.

1 hour ago, bernhard_LA said:

Q2 :  how to separate  or  select different  test cases?

You can use categories

    [Category('bench')]
    procedure BenchMsgThreads;
    [Category('stability')]
    procedure TestMsgThreadStab;

and corresponding arguments

Quote

--include:value or -i:value    - Specify the categories to include
--exclude:value or -e:value    - Specify the categories to exclude

 

  • Like 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×