Jump to content

Idea for VITester


WG-

Recommended Posts

It would be awesome if you were able to manipulate the order in which tests are being done (and optionally leave tests out).

 

Example. I have a delete VI which deletes something. I return a boolean if it has actually been deleted. I also have a search VI which can look something up. Now in the unittest of the delete VI I have to actually verify that the record has been deleted. So after it has been deleted I also call the search VI, in the same unittest, which then checks if the record has been deleted. I also have a unittest which tests the search VI.

 

It would save me time (not programming the check on the unittest for delete) when I would be able to easily manipulate the order in which the unittests are being called. I could for example then first click the delete unittest and afterwards the search unittest. Further this would make a lot of test combinations possible, 2^(number of unittests) further enabling one to test the software more intensively.

 

The only problem which crosses my mind now is that you will have to be able to manipulate the tests. For example I have programmed the search unittest for a the search of ID:4 but not for ID:X where X is the ID that is being deleted for the delete test.

Link to comment
Share on other sites

I'm not a unit testing expert, but I'm pretty sure that unit tests should not depend on other unit tests. You can certainly reuse test support code, but there should be no external statefullness that an individual test relies upon.

 

I'll ping some others at JKI, to see if there are any more detailed answers that could be helpful to your testing scenario.

Link to comment
Share on other sites

I'm not a unit testing expert, but I'm pretty sure that unit tests should not depend on other unit tests. You can certainly reuse test support code, but there should be no external statefullness that an individual test relies upon.

 

This is correct - unit tests should not depend on execution order - that's one of the first principles of unit testing. What you should do is update the setUp.vi (and/or the tearDown.vi) in your TestCase class to setup the test (delete all unused files prior to running a test, create files needed for testing, etc). In the tearDown.vi you can delete all files that are no longer needed, etc. I hope that helps - let us know if you still have questions.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.