-
Notifications
You must be signed in to change notification settings - Fork 2
Examples
ThomasPRZilliox edited this page Mar 25, 2025
·
4 revisions
In that first example the Python script (using the pytest framework) will do the following:
- Check that the front most VI is "example 1 - plot.vi"
- Click on the button "Generate new plots"
- Store the new value of the graph
- Click again on the button "Generate new plots"
- Store the new value of the graph
- Compare the two values, the test is passed if they differ.

In that second example the Python script (using the pytest framework) will do the following:
- Check that the front most VI is "example 2 - value.vi"
- Using the parametrized function of pytest, set a value to control labelled "myNumber"
- Then get the value of the control labelled "myNumber" and the boolean indicator "greater"
- If the boolean indicator "greater" si TRUE when "myNumber" is > 5, then the test is passed

In that third example the Python script (using the pytest framework) will do the following:
- Check that the front most VI is "example 3 - subpanel.vi"
- Click on the Sub Panel 1 control
- Check that the supbanel is displaying the appropriate VI (which is similar to example 1)
- Repeate the test of example 1
- Click on the Sub Panel 2 control
- Check that the supbanel is displaying the appropriate VI (which is similar to example 2)
- Repeate the test of example 2

In that fourth example the Python script (using the pytest framework) will do the following:
- Check that the front most VI is "example 4 - string.vi"
- Update the control "String" in the following way (Set it to "Hello", read it and add to its current value " World")
- Check that the string control now display "Hello World"
- Check that the tree control is unselected.
- Select the parent item of the tree and check that it is indeed selected
- Select the items "Child 1" and "Child 2" then ensure they are both selected
