Daklu Posted August 7, 2019 Report Share Posted August 7, 2019 (edited) I ran across a problem in a project where, after creating and initializing the class under test in the setUp VI, unbundling it in the test VI returns a default object rather than the one I instantiated. setUp.vi testCount.vi I've attached a project with the class under test (ListImp) and two test cases. Both test cases have (as near as I can tell) identical setUp code and identical code in the test method (testCount). However, one test passes while the other test fails. Any idea what's causing this? [Edit - The about box reports "version 3.0.1.294 (Feb 11 2019)".] [Edit 2 - Another piece of potentially relevant information is the Test_ListImp..._2 test class was brought forward from an older version of VI Tester. I don't know what version, but according to my repository it was sometime before Feb. 2013. The other test class (the one that passed) was created with the current version of VI Tester.] VI Tester Error.zip Edited August 7, 2019 by Daklu 1 Quote Link to comment Share on other sites More sharing options...
Jim Kring Posted August 7, 2019 Report Share Posted August 7, 2019 Hi @Daklu. Thanks for reporting this, and sorry for the trouble. I wanted to give you a quick reply to let you know we got your message and will look into this. Quote Link to comment Share on other sites More sharing options...
Daklu Posted August 8, 2019 Author Report Share Posted August 8, 2019 (edited) Thanks Jim. It's not urgent, but I wanted to let you know about it. Once I figured out it was related to classes being created in a previous version of VI Tester it was easy enough to work around. Edited August 8, 2019 by Daklu Quote Link to comment Share on other sites More sharing options...
Daklu Posted August 8, 2019 Author Report Share Posted August 8, 2019 (edited) BTW, (and not related to this thread in any way whatsoever...) I cloned the repo to see if I could implement the changes for Issue #40 . Package 3.0.2 is available on VIPM. Should that branch be merged into master or do you have other plans? (I'm wondering if I should branch from master or 95c579a.) Edited August 8, 2019 by Daklu Quote Link to comment Share on other sites More sharing options...
cbutcher Posted October 30, 2019 Report Share Posted October 30, 2019 (edited) Possibly related, I can't close then reopen a file within a test method. It feels like the tearDown VI is using the reference created in the setUp VI, without considering that the object being unbundled in tthe tearDown.vi might have been changed by test_CloseOpen.vi It may be this just isn't allowed, but if so, perhaps it could be more widely documented? A simple example is attached. It's written with LabVIEW 2019, but I can backsave if needed (not sure if the issue depends on the version though). The VI Tester version is 3.0.1.294 (Feb 12 2019) according to the About page from the Runner. VI Package manager tells me I've installed the latest version, "v3.0.2.294-1", which mentions a fix for issue #39 in the change list. I'm therefore not exactly sure which version I have, and if I should reinstall things to check for a fix, but I'd guess initially that perhaps I have the latest version and the About page wasn't automatically updated? Edit: This may not have been the best thread to post to, but continuing to edit here to hopefully reduce the number of emails I may trigger. The issue described here: [FIXED in 3.0] DOM reference is lost when passed from Setup to test VI seems fairly similar in spirit. However, unlike in that case (as far as I could tell from reading), I don't actually open the reference in the Test Suite's new - I only populate a Path control (which I don't change). The reference is opened first in MyTestCase:setUp.vi, and closed in MyTestCase:tearDown.vi (which is where I hit the Error 1), and also closed+reopened (so a new reference, but the same path) in MyTestCase:test_CloseOpen.vi. When I receive the Error 1 in tearDown calling the object to close the reference, probing the reference shows a seemingly valid reference, which matches the value probing the Open.vi gives during the test. References-JKI_VI_Tester.zip Edited October 30, 2019 by cbutcher additional information and related link, then 2nd edit for version clarification and #39 reference. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.