NI Home
Cart Cart | Help
Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Currently Being Moderated

TestStand: Including Results of Subsequence Launched in New Thread in Report

VERSION 2

Created on: Jun 5, 2009 3:20 PM by Jervin Justin - Last Modified:  Jun 5, 2009 4:32 PM by Jervin Justin

Functional Description

Often times developers need to launch subsequences in separate threads to allow for parallel execution of steps in the same execution.

 

One potential drawback of doing this is that the MainSequence (or calling sequence) no longer waits for the subsequence to finish execution and so does not gather the results of the subsequence into its "ResultList" container.

 

If a result is not in the ResultList container, the report generation code will not include these results in the Report.

 

In order to include the results of a subsequence launched in a separate thread in the report, you must force the MainSequence (or calling sequence) to wait for the subsequence to finish execution. This will ensure that the subsequence's results are added to the calling sequence's Result List container and therefore in the report. You can force the calling sequence to wait for a su-sequence to finish execution using the Wait step type.

 

SubSequenceCall.jpg


Example Code:

The attached example sequence file has two sequences, a MainSequence and a Subsequence. The MainSequence runs 4 tests that are set to pass and calls the SubSequence in a separate thread. The subsequence runs one test that is set to pass. The MainSequence is also has a Wait step that is configured to wait till the subsequence is done executing.

Note: This example is written in TestStand 4.2

 

Related Links:
KnowledgeBase 4Y4F42PE: Why Are the Results of Subsequences Called in New Threads Not Included In My Report?

 

Downloads:
Average User Rating
(0 ratings)




There are no comments on this document

More Like This

  • Retrieving data ...