Integrating DQMH Unit Tests with JKI VI Tester
The video below shows the steps to create a DQMH Unit Test for Unit Test Framework
bit.ly/CreateDQMHUnitTestsVITester
- Follow the steps described in Creating DQMH Unit Tests.
- Verify that you have JKI VI Tester installed.
- On the project tool bar click on the Right-click on the Add New Test Case button.
- When prompted, save your new test case in the <Project>\Unit Tests\<DQMH Module Name> folder. Make sure your test case class includes the word Test in its name.
- If you plan to have multiple test cases and only start and stop the DQMH module once, delete the setUp.vi and tearDown.vi and right click on the class and select New>VI for Override... and use globalSetUp.vi and globalTearDown.vi instead.
- Place the <DQMH Module Name> setup.vi that the New DQMH Unit Test added to the Unit Tests virtual folder to your project inside the setUp or globalSetUp.vi.
- Place the <DQMH Module Name> teardown.vi that the New DQMH Unit Test added to the Unit Tests virtual folder to your project inside the tearDown or globalTearDown.vi.
- Right-click on testExample.vit and select New From Template. This will create the new unit test for your code. Replace the temp_VI_UnderTest.vi with the Test - <Module Name> - <Request Name> <number>.vi that the New DQMH Unit Test added to the Unit Tests virtual folder to your project.
- Save your test class
- Save your project
- On the project tool bar click on Open VI Tester button
- If your new test is not listed, click on the Reload test hierarchy button
- Run your unit test