Appendix A 525
Additional Lab Exercises
Test Sequencing
Using the Test Sequencer, Step 6
If the
Sequencer includes many tests, it can become cumbersome to use
many individual
Formula objects connected to a Junction. Instead, you
can use a
Formula that contains an expression, generate the expression at
run time, and loop through the possible expressions.
First the example will generate the expression strings.
In a separate thread, use a Loop and a
Formula to generate a test expression
string. Output the information as a string in a
Logging Alphanumeric.
The string generated in the
Formula should be
"a[*].test<x>.timestamp" where <x> goes from 1 to 4.
Solution—Using the Test Sequencer, Step 6
Figure A-38 shows a solution for step 6.
Figure A-38. Using the Test Sequencer, Step 6
Using the Test Sequencer, Step 7
Now take the Loop and the
Formula you built in Step 6, and replace the
four
Formulas and Junction in the previous step with the Loop and
Formula. Plus, you now want to evaluate the string you built. Send the
string generated (the expression
"a[*].test<x>.timestamp") into a
Formula to be evaluated at runtime.
Hints
n Formula Control Pin on the Formula Object: The
Formula you want
to evaluate is generated by the
Formula inside the Loop. You can create
a second
Formula box with a control input for its Formula expression.
The expression the second
Formula evaluates is generated at runtime.