Suggestion: test classes inherit test methods
Posted 14 September 2012 - 05:30 PM
I tried this because I have similar VIs I want to do 3 test on each. The connector pane of the VIs are similar, but some data types are different. So I wanted to handle this differences in a VI which is used in all 3 tests. In the subclasses I wanted only to overwrite this VI.
My words are probably unclear, maybe this structur explains more.
myTests_A.lvclass, inheriting TestCase.lvclass
Test 1.vi, calling CommonVI.vi
Test 2.vi, calling CommonVI.vi
Test 3.vi, calling CommonVI.vi
myTests_B.lvclass, inherinting myTests_A.lvclass
Posted 14 September 2012 - 08:22 PM
Posted 17 September 2012 - 02:48 PM
Posted 18 September 2012 - 07:59 AM
- mark the parent class as abstract
- use the skip VI in ComonVI.vi in the parent class
- implement the first test case in the parent class (probably not a clean design)
When the parent class is not in the project (only in dependencies), it is not loaded with the project anyway. So it is easy to leave it out.