Jump to content
Sign in to follow this  
JKI

Debugging Tests

Recommended Posts

VI Tester is a tool to help you pinpoint problems with your code. As your application evolves, you will want to regularly run unit tests to validate that none of the tests fail. If a test fails, it generally means that there is a problem with the code that is being tested - but it can sometimes mean that there is a bug in the test itself. Either way, you'll want to fix the problem.

 

A test can fail in three places: in the actual test method (most likely), but also in "setUp.vi" (called once before each test method is executed) and "tearDown.vi" (called once after each test method is executed).

 

When a test fails, it will appear on the "Failures" tab (and will also show a red "X" as its glyph in the "Test Hierarchy" tree). Switch to the "Failures" tab and double click the test of interest to open it. The VI where the failure was detected will open (setUp, test method, or tearDown). Tests can fail due to a failure being raised or an error being raised. If an error is raised, the test will appear as Error.

 

One easy way to debug the test is to enable LabVIEW's Retain Wire Values tool and re-run the test. You can now trace the data that was passed into and out of your test VI.

 

Here's a short video showing how easy it is to debug test VIs:

 

 

If you have any feedback or questions (including ideas for other topics you'd like to learn more about), please consider posting them to the VI Tester Discussion Forums. We're looking forward to your feedback.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×
×
  • Create New...

Important Information

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