Jump to content

JKI

JKI Team
  • Content count

    348
  • Joined

  • Last visited

Community Reputation

1 Neutral

About JKI

Profile Information

  • Gender
    Male

Recent Profile Visitors

18,441 profile views
  1. Yes, EasyXML works great on LabVIEW Real-Time (RT). However, EasyXML depends on some OpenG Array Tools (oglib_array) package, which has some version dependencies you should be aware of: On LabVIEW Real-Time 2009 or newer, you should have no problems. On LabVIEW Real-Time 8.x, you should install oglib_array 2.7 or earlier. The reason for this is that oglib_array 3.0 added support for LabVIEW Classes and Objects (objects-oriented programming), which is supported in LabVIEW 8.x, but is not supported in LabVIEW Real-Time 8.x (and therefor causes the OpenG Array Library and EasyXML to be broken). LabVIEW Real-Time 2009 added support for LabVIEW Classes and Objects, so oglib_array 3.0 works fine in this environment without any issues.
  2. For some reason, upgrading to LabVIEW 8.6.1 can cause the "VI Server: Exported VIs" settings to get reset in a way that prevents VIPM from being able to connect. To fix this, do the following: LabVIEW's VI Server permissions are not configured correctly for VIPM. In the LabVIEW options dialog (Tools>>Options) go to the "VI Server: Exported VIs" page and ensure that you entered a value of "*" (see below).
  3. JKI

    VI Tester - Known Issues

    This is the Known Issues list for VI Tester 1.1.2. For issues fixed in current & previous releases of VI Tester, please see the Release Notes. Known Issues Case 10909: 'Run Single Test' generates an error when pressed after reloading a project Reloading a project does not disable the 'Run Single Test' button which makes it possible to press the button when no test is selected, resulting in an invalid test selection error dialog. Workaround: Do not press 'Run Single Test' until you've selected a test on the test tree after reloading project. Case 10911: VI Tester UI Doesn't Always Open on German Localization of LabVIEW VI Tester UI won't open from the Getting Started Window menu, or from a project (.lvproj) menu. Workaround: Open VI Tester from the VI Tester toolbar on the project window or from the menu of an open VI. Case 10770: VI Tester UI Should Warn Users if Test has unsaved changes. VI Tester uses the saved class on disk to find test methods. If the class has changes in memory, VI Tester should warn users to save Test class(es). Workaround: Manually save test classes prior to opening VI Tester UI. Case 11703: VI Tester Setup, and test methods required interface (TestCase in, TestCase out, error in (no error), error out, are case sensitive. VI Tester searches for the inputs/outputs by name and is case sensitive. Can create problems if user modifies the names from the template. Workaround: Don't rename controls/indicators that are created from the template. Case 11980: VI Tester TestCase.Setup method has typo on reference indicator. Test Cases instantiated by TestCase template have 'reference in' label on the reference output. This should be labelled as 'reference out'. Workaround: This bug does not have any adverse effects on tests (cosmetic bug). Case 13680: VI Tester Toolbar Icons not visible in LV2011, LV2012 Project toolbar buttons not visible and/or have missing icons. Workaround: Use the Tools Menu to launch VI Tester.
  4. VI Tester requires the following software: LabVIEW 8.2.1 or greater on any operating system VI Package Manager 2.0 or greater (free download)
  5. JKI

    VI Tester - Roadmap

    Here are some of the things that are on our radar. If you've got ideas or feedback please post them in VI Tester forum -- everything here is open for discussion. Run Test Programmatically -- high-level VIs for running tests programmatically (instead of from the VI Tester GUI) Right-click on tests in VI Tester GUI: Skip / Don't Skip, Run Test, Open Test VI Performance optimizations Inheritance and overrides of custom Test Cases and Test Suites Export test report 'Detailed Status' to printer/disk/clipboard Improved project file integration
  6. JKI

    VI Tester - Home Page

    Moved here: https://github.com/JKISoftware/JKI-VI-Tester
  7. Background VI Tester is a LabVIEW implementation of the xUnit test framework architecture. It is an object-oriented framework with several core classes and a graphical user interface for loading and running tests. Terminology VI Tester - Graphical Test Runner UI The graphical user interface that loads and runs tests (which you launch by selecting Tools >> VI Tester >> Test VIs... from the LabVIEW menubar). When you open a Project, Test Case, or Test Suite, VI Tester searches for tests in Test Cases and Test Suites. You can then run the tests. Core Class: TestCase.lvclass All Test Cases must inherit from "TestCase.lvclass". This core class contains several utility methods for setting the pass/fail status, and performing other operations in test methods. This class also contains several other methods that are used by the framework for running tests. Core Class: TestSuite.lvclass All Test Suites must inherit from "TestCase.lvclass". This core class contains several utility methods for configuring tests in the test suite. Test Case (contains your tests) Any class that inherits from "TestCase.lvclass" (for example, a Test Case that you create by selecting Tools >> VI Tester >> New >> Test Case... from the LabVIEW menubar). A Test Case contains Unit Tests (a.k.a Test Methods) as well as optional Setup and Teardown methods. Test Suite (your groupings of tests) Any class that inherits from "TestSuite.lvclass". A Test Suite contains a collection of "Test Objects", which are either TestCase.lvclass or TestSuite.lvclass objects. Unit Test / Test Method A Test Case member VI whose name begins with the word "test" Setup A Test Case member VI named "setUp.vi". Teardown A Test Case member VI named "tearDown.vi".
  8. JKI

    Debugging Tests

    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.
  9. JKI

    Creating New Tests

    Add a new test case to your project. A "test case" is a special LabVIEW class that contains unit test methods. VI Tester recognizes unit test methods as members of a test case class whose name starts with "test". To get started, please watch this brief tutorial video and then follow the walkthrough below. You can create a new test case by selecting Tools >> VI Tester >> New >> Test Case... from the menubar of the Project Explorer window. Browse to a folder where you want to create the test case, type a name for the test case, and press the "OK" button. VI Tester will create a folder for your test case (having the same name as your test case). Inside this folder will be your new test case class along with some other useful VIs. The new test case class will will be added to your LabVIEW project and under the "My Computer" node. Add a new unit test (method) to your new test case. To create new tests, save a new copy of "testExample.vi" using the "Open additional copy" option of the "Save As" dialog. Make sure to check the box that says 'Add copy to {MyTest}.lvclass' where {MyTest} is the test you created. Customize the unit test and its pass/fail criteria. The following video gives a short tutorial on how to define the test pass/fail criteria: Tests pass when there are no test failures or errors. You can write tests quickly by using the built in test evaluations found on the Test Case palette, shown below: For example, if you need to test that an error is raised, use 'passIfError.vi'. If none of the built-in evaluations is sufficient for the type of test you need to perform, you can use the Error status to define test behavior, any test with an Error will fail. But, don't branch your test case object wire! Note: Be careful not to branch the TestCase object wire! The easiest way to avoid this, is to treat the TestCase object wire much like you would treat the error cluster, never allow it to branch. Good (no branching of the TestCase object): Note how the object wire is not branched. Bad (branching of the TestCase object): Note that the object wire is branched. VI Tester will not be able to evaluate the result correctly. Move on to designing a test. If you've gotten this far, why not learn some other aspects of designing a test.
  10. JKI

    Designing Tests

    Unit tests should be designed around the following principles: Unit tests should be simple - you don't want to spend time debugging tests Unit tests should only test one thing (a "unit" of code) - unit tests should help you pinpoint problems so performing multiple tests within a unit test defeats this purpose Unit tests should be independent of other unit tests - they should not depend on or affect other unit tests To facilitate these principles, unit tests should be designed to work within a test harness. A test harness is a set of VIs called 'setUp.vi' and 'tearDown.vi' that run before and after each unit test method. The test harness facilitates keeping your code simple and preventing tests from interfering with each other by providing a place to initialize and cleanup the test data. Any task that is common to the test methods you need to run should be placed in the setUp.vi method. Any task that is needed to clean up the test environment should be put in tearDown.vi. An important aspect of the unit test framework is how data is passed from the setUp to the testMethod and tearDown.vi. The data that is passed around are actually properties of the test and so these items should be placed in the test object private data. You can edit this data by opening the {Test}.ctl file. Now that you've designed your new test, you should read some tips on how to easily debug your test.
  11. Please watch this short tutorial on how to run unit tests from VI Tester. After watching the video, you can follow them step by step in the walk through below. Open the VI Tester example project located at: \examples\JKI\VI Tester\VI Tester Example.lvproj The example project, shown below contains two TestCase classes: Expand the "Merge Errors TestCase.lvclass" class in the tree to show the class members. You will find several member VIs whose names all begin with "test" -- these are unit tests that validate functionality of the "Merge Errors" VI that ships with LabVIEW. We'll look at these later. Now, let's run all the tests. Launch the VI Tester user interface by selecting Tools >VI Tester > Test VIs... from the menubar of the Project Explorer window. VI Tester will then inspect the project for all unit tests and show them in the Test Hierarchy window, as shown below. Press the 'Run All Tests' button to run all of the unit tests. This will run all of the tests, showing the results. The following glyphs are used to show the status of each test: - Test Passed - Test Failed - Test Skipped - Test Not Run You can double-click any of the tests, to open it. Double-click on the "test no error in" test in the "Merge Errors TestCase". This will open "Merge Errors TestCase.lvclass:test no error in.vi", as shown below: You can see that the "Enabled" frame of the Diagram Disable Structure calls "TestCase.lvclass:skip.vi" -- this is why the test shows the Test Skipped () icon in VI Tester. Enable the other frame of the Diagram Disable Structure, as shown below: The re-run the test to see that it is no longer skipped. Interested, and want to see more? Why not learn how to add new Test Cases to a Project?
  12. You have a few minutes and just want to learn what VI Tester is about. VI Tester helps you perform unit testing on your VIs. Unit testing is a way to validate that your code works at the lowest (i.e. unit) levels. In LabVIEW, the lowest level of testing is the VI. When you write effective unit tests you get two benefits: 1) you can verify that when you modify code, you don't create unintended bugs 2) when your tests fail, you can quickly pinpoint the root cause of your failure. To start, you launch VI Tester window from the LabVIEW Tools Menu. Next, open a project file that contains unit tests. To run the tests, you can press the 'Run all tests' button. You can easily review the test status and see a log that was generated while running the tests. The following video shows just how easy it is to run tests in VI Tester. VI Tester makes it really easy to run unit tests on your LabVIEW code. If you have more time, why not try installing VI Tester and then running some unit tests to see for yourself?
  13. Moved here: https://github.com/JKISoftware/JKI-VI-Tester/wiki/VI-Tester-FAQ
  14. Download and Install VI Tester from JKI Labs Note: The full-featured version of the JKI VI Tester is licensed under the JKI Toolkits Evaluation License. To download and install VI Tester, you will need VIPM (VI Package Manager), which is made freely available by JKI. If you don't already have VIPM installed, you can get it from our website, here. Also, make sure to check the System Requirements for VI Tester. Installing VI Tester takes less than a minute. Here are the steps: Update Your Package List Install VI Tester Restart LabVIEW 1) Update Your Package List From VIPM's toolbar, press the Check the Network for Available Packages button. VIPM will connect to the Internet and obtain an updated list of all the available packages. After VIPM completes this operation, you may see a dialog stating that there were new packages found and asking you if you want to install them. Press the no/cancel button and proceed to the next step. 2) Install VI Tester Find the jki_labs_tool_vi_tester package in the package list (hint: type "tester" into the quick search text box to find the VI Tester package). Right-click on it and select the Install right-click menu option, as shown below: VIPM may ask you if you wish to install other dependency packages, in addition to jki_labs_tool_vi_tester. Make sure that all the dependency packages remain selected and press OK, as shown below. VIPM will download all required packages and begin the installation process. During the installation process, VIPM will present you with a license agreement dialog (shown below) for VI Tester software. If you agree to the terms of the license agreement, press the "Yes" button to proceed with the installation process. 3) Restart LabVIEW After the installation process completes, restart LabVIEW. You are now ready to start using VI Tester. What Next? Read the VI Tester Getting Started Guide, of course
  15. What's New in VI Tester 1.0 Initial public release.
×

Important Information

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