NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Additional Results: Report Precondition not executing correctly during first execution in a For Loop

Solved!
Go to solution

I am experiencing an unusual issue with NI TestStand 4.1. I have a For loop and within it I have a sequence call configured as a numeric limit test. This test is configured to report additional results. All of the additional results are preconditioned upon test failure. Here is the unusual part: During the first iteration of the For loop the test passes yet the additional results for all input parameters are reported (The output parameters are not reported at this time, but more about that later). All additional iterations of this test in the For loop pass and the additional results are not reported. 

 

Regarding the output parameters...If a test fails I would expect all additional results (input and output parameters) to be reported. However when I encounter a failure only the additional results that are output parameters are displayed on the test report. Input parameters are not reported.

 

Has anyone else encountered this? My expectation was that all of the additional results would be reported in the event of a failure. In addition, in the absense of a failure I would not expect to see any additional results. Thanks in advance!

0 Kudos
Message 1 of 6
(3,299 Views)

Hi,

 

Would it be possible for you to share the sequence or an example that shows what you are describing? I'd like to test it out and parse what is happening.

 

Luis C.

0 Kudos
Message 2 of 6
(3,266 Views)

I am unable to share my original code but I was able to create a sequence to replicate all of the issues that I described. I used the NI SequentialModel and executed it in Single Pass.

 

The MainSequence contains a For loop that calls the Test1 sequence six times. The Test Report (attached) indicates the following:

Test 1: Failing Test: The additional results are displayed but only for the output parameters. Why aren't the input parameters reported?

Test 2: Failing Test: All of the additional results are displayed as expected.

Test 3: Passing Test: Why are the additional results displayed? In addition why are only the input parameters reported?

Test 4 - 6: Passing Tests: No additional results are displayed as expected.

 

Note that the Conditions for each Additional Result parameter are set to the same property "Step.Result.Numeric<>0". I have experimented with other conditions without success.

Thanks for your time and effort!

 

Download All
0 Kudos
Message 3 of 6
(3,255 Views)
Solution
Accepted by topic author A_I

The short answer is that Additional Results condition for the inputs is evaluated before it has called the subsequence, so it is using the value of Step.Result.Numeric from the previous iteration (or default value on the first).

 

You can see this described as Step 15 in the following link:

 

http://zone.ni.com/reference/en-XX/help/370052P-01/tsfundamentals/infotopics/step_execution/ 

 

Regards,

 

Charlie Rodway | Principal Software Engineer | Certified TestStand Architect (CTA)

Computer Controlled Solutions Ltd | NI Silver Alliance Partner | GDevCon#1 Sponsor

0 Kudos
Message 4 of 6
(3,246 Views)

Charlie,

Would the sequence of step operations that you provided also apply to TestStand 4.1? I was able to locate similar information for TestStand 4.2 and there is no mention of additional results processing.

 

I am experimenting with implementing the "Additonal Results" step type as a potential work around. Would you suggest this as an alternative? Do you have any other thoughts on this?

 

Thanks!

0 Kudos
Message 5 of 6
(3,240 Views)

One possible solution would be to change all the parameters in the subsequence to be passed by reference and select all the output parameters to be included in the additional results:

 

Test1.PNG

 

I hope this helps,

Charlie Rodway | Principal Software Engineer | Certified TestStand Architect (CTA)

Computer Controlled Solutions Ltd | NI Silver Alliance Partner | GDevCon#1 Sponsor

0 Kudos
Message 6 of 6
(3,239 Views)