Bhargavi Posted January 21, 2019 Report Share Posted January 21, 2019 Hi all, I have faced an issue with JKI VI Tester. Here are the details.. I am creating a DOM reference in "Setup.vi" and bundling it into my TestCase Object. DOM reference can be created by using "Load.vi" from XML Parser palette(attached image-> XML Parser palette and DOM Ref.png). When I unbundle it in the test VI, the DOM is reset to '0'. It is getting lost. We digged into the VI Tester and found out that some deprecated property nodes are used in "_JKI Toolkits\VI Tester\TestCase.llb\CallTestMethod.vi" in order to pass data from one VI (Setup VI) to another VI (Test VI).Refer to attached images -> VI Tester_Set Control.png, VI Tester_Get All.png. When the DOM reference is flattened it is getting lost, because LabVIEW doesn't know how to convert DOM reference into flattened data type. We have done a quick internal fix by replacing the property nodes and using variant to data after getting the control value. These changes are shown in "VI Tester_Set Changed.png" and "VI Tester_Get_Changed.png". Also, in "_JKI Toolkits\VI Tester\TestCase.llb\WaitOnTestComplete.vi", we have replaced the property node when parent data is written to child class indicator. This change is shown in "WaitOnTestComplete.png". I am getting my DOM reference in test VI correctly after doing this change. As I said this is a quick fix done for internal purpose. If this is the right change to make it work, can you please make this change and distribute the package so that my customers can also use it. If this is not the right change to be made, please suggest us how to fix this. Also, let me know if you can fix this issue and and release the fixed version. Please let me know if any other information is needed regarding this. Thanks, Bhargavi Gowri. Link to comment Share on other sites More sharing options...
Jim Kring Posted January 25, 2019 Report Share Posted January 25, 2019 Thanks for reporting this @Bhargavi. We've just released VI Tester 3.0 with a fix for this. Please let us know if this works for you. Link to comment Share on other sites More sharing options...
Bhargavi Posted January 31, 2019 Author Report Share Posted January 31, 2019 Hi @Jim Kring, Thanks for the update and the new release works fine for me Link to comment Share on other sites More sharing options...
Bhargavi Posted February 11, 2019 Author Report Share Posted February 11, 2019 Hi @Jim Kring, I am facing the same issue(document reference getting lost) when I create my object(this object private data contains document reference) in the "New.vi" of Test Suite. I observed that when I create the document reference in "New.vi" and use it in my test case the document ref is lost. Please let me know if this issue can be solved or I should find other alternatives to make my test work. Thanks, Bhargavi Gowri. Link to comment Share on other sites More sharing options...
Jim Kring Posted February 11, 2019 Report Share Posted February 11, 2019 Hi @Bhargavi Would you be able to create a very small test project (and zip+attached it) that demonstrates the issue? That will make it easier to debug. Thanks! Link to comment Share on other sites More sharing options...
Bhargavi Posted February 12, 2019 Author Report Share Posted February 12, 2019 Hi @JimKring I have attached the sample project, which demonstrates the issue that I am facing. I have also attached the image, which shows the DOM ref values in New.vi of test suite and setUp.vi of the test case. Please let me know if you need any details. Thanks, Bhargavi Gowri. Sample Code.zip Link to comment Share on other sites More sharing options...
Jim Kring Posted February 12, 2019 Report Share Posted February 12, 2019 Hi @Bhargavi, Thank you for posting this example project. The breakpoints do a great job of showing the problem you're seeing. I did find that some of the deprecated control value methods are being used and the typecasting issue is present (and those should probably be replaced with the variant counterparts). However, that's not the only/main problem at hand. Another big issue I see is that the TestSuite's New.vi method is being called when VI Tester first loads the Test Suites, and then the New.vi goes idle, which means that any references created inside of New.vi will get disposed of automatically by LabVIEW (when the VI goes idle). VI Tester works around this with the TestCase and TestSuite setUp.vi using the TestCase.lvclass:WaitOnTestComplete and TestCase.lvclass:WaitOnTestComplete VIs, which keep setUp.vi running until the test case/suite completes. However, that's not exactly what you're after -- you're trying to initialize the data of the TestCase inside the TestSuite New.vi. I'll need to think about this some more, to see if there's a good solution. Link to comment Share on other sites More sharing options...
Bhargavi Posted February 12, 2019 Author Report Share Posted February 12, 2019 Hi @JimKring, I have moved to the approach of creating the DOM reference in setUp.vi of Test Suite. I will let you know if I face any problem. For now, Thanks, Bhargavi Gowri. Link to comment Share on other sites More sharing options...
Jim Kring Posted February 12, 2019 Report Share Posted February 12, 2019 1 minute ago, Bhargavi said: I have moved to the approach of creating the DOM reference in setUp.vi of Test Suite. I will let you know if I face any problem. OK, I think that's the best approach. I think that we may still need to fix some of the flattening/unflattening issues inside of TestSuite.lvclass:WaitOnTestComplete.vi (and the TestSuite runner), in order for the reference to be valid. Link to comment Share on other sites More sharing options...
Bhargavi Posted February 12, 2019 Author Report Share Posted February 12, 2019 Hi @JimKring, You are right. Similar to the one in test case "setUp.vi" we have to fix in test suite "setUp.vi". If you are going to make those changes, can I know when I can expect the fixed version? Thanks, Bhargavi Gowri. Link to comment Share on other sites More sharing options...
Jim Kring Posted February 12, 2019 Report Share Posted February 12, 2019 Hi @Bhargavi, Can you please try this pre-release build 3.0.2, and see if it works for you? Please let me know how it goes. Also, how are you planning to access the reference (inside the TestSuite) from within the TestCase? Link to comment Share on other sites More sharing options...
Bhargavi Posted February 12, 2019 Author Report Share Posted February 12, 2019 Hi @Jim Kring, Thanks for sharing the build:). I will try it and let you know if it works fine for me. I am accessing the reference in TestCase by passing it through functional global. I didn't find any other way to do it as of now. Please let me know if there is any other way. Thanks, Bhargavi Gowri. Link to comment Share on other sites More sharing options...
Bhargavi Posted February 13, 2019 Author Report Share Posted February 13, 2019 Hi @Jim Kring , I have tried out the new build(3.0.2) and it works fine for me. Thanks for the immediate fix Thanks, Bhargavi Gowri. Link to comment Share on other sites More sharing options...
Jim Kring Posted February 13, 2019 Report Share Posted February 13, 2019 Hi @Bhargavi, I’m glad to hear it’s working for you. Thanks for testing it out. -Jim Link to comment Share on other sites More sharing options...
Jim Kring Posted February 13, 2019 Report Share Posted February 13, 2019 Great. We've just released 3.0.2 for download with VIPM. Link to comment Share on other sites More sharing options...
Bhargavi Posted February 14, 2019 Author Report Share Posted February 14, 2019 Hi @Jim Kring Thanks for the update Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.