03-18-2011 01:56 PM
I'm trying to use unit test framework to unit test a vi where I've wired a First Call? to a case structure. I'd like to test both the first call case and the nonfirst call case. When I run two test cases, both test cases execute the first call case. I'm using UTF 1.0
03-19-2011 01:59 PM
You could create just a single test case and call your VI under test two times (and use some data flow or flat sequence to enforce which call executs first). Another thought is that maybe you want to put all of your logic into a subVI that takes a "First Call" Boolean as an input, so that the logic is more testable -- then you could put this logic in a wrapper that actually has the First Call? primitive.
03-21-2011 11:56 AM
Good suggestions. Thanks.
03-21-2011 12:44 PM - edited 03-21-2011 12:44 PM
You're welcome. BTW, I'm not sure how easy my advice is to implement using NI's UTF, since we use VI Tester at JKI (since it's our product).
03-23-2011 10:55 AM - edited 03-23-2011 10:57 AM
Another option recommended to me was to use a conditional disable and put a control in the debug case. That way there's no wrapper required. Of course, then you have to trust the first call node works predictably.