From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Repeat test sequence programmatically

Hi All,

 

I have a test sequence which includes 10 tests. Once the sequence has completed, If any one of the 10 tests failed a popup is produced. The user is presented with two options, repeat the test or bin the result (produce the report).

 

The problem I have is how do I remove the results gathered during the test so that when the test is repeated it does not append to the already populated results list?

 

Thanks

0 Kudos
Message 1 of 8
(2,746 Views)

Locals.ResultList.SetNumElements(0, 0)

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 8
(2,737 Views)

Would it be a good idea to use the PostMainSequence callback to handle a full sequence retest?

 

My thinking is that this would take place before any result plug-ins are called. E.g. the user can be prompted if they want to retest, As long as the sequence keeps failing the user will be prompted until the user decides to end testing. Once ended the results would be processed as normal.

 

When in PostMainSequence, the results container is the PostSequence results contain and not the MainSequence results container.  I cant see the Results container to initialise it back to {0,0}.

 

How might you achieve this?

0 Kudos
Message 3 of 8
(2,715 Views)

Not sure what you mean by PostMainSequence callback.  Is that one that you added to the process model or planning to add?

 

If it were me I'd do it in either the PreUUT and set the continue testing flag appropriately.  The downside to this is that you will generate a whole new report and the failed results will be put in your DB as well (unless you set it not to). 

 

Another options is in the MainSequence Cleanup step group you can put some logic and a dialog to see if you want to re-run the sequence.  Then put a go-to step (not a big fan of go-to steps but this would be a good use case).

 

Regards,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 4 of 8
(2,711 Views)

HI Jiggawax,

 

Thank you for you answers.

 

Within the sequential model I found pre defined callbacks called PreMainSequence and PostMainsequence. Just like PreUUT and PostUUT etc.

 

I read in the help file that PostMainSequence is a callback after MainSequence but before any of the model plugins are called. My thinking was to interrupt the result reporting and retest as many time as needed.

 

Thanks

0 Kudos
Message 5 of 8
(2,708 Views)

It would be better if you could use the SequenceFilePostResultListEntry. This has the ability to discard the result.

 

Regards
Ray Farmer
0 Kudos
Message 6 of 8
(2,704 Views)

It sounds like you have a custom process model.  I've never heard of those callbacks.  Which help file were you looking in?

 

To Ray's point you could do it that way but it would be for each step that failed and would only retry that step.  If you want to restart the entire test you would need to jump back to the beginning of MainSequence.  Also the SequenceFilePostresultListEntry only applies to the file it is in.  If you have any kind of sequence file hierarchy you would need it in all of them.

 

Regards,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 7 of 8
(2,701 Views)

HI Jiggawax,

 

I am using TS 2016 so maybe its a new feature? I am just learning TS so I have no idea why it wouldn't be included in other versions.

 

See this help file

 

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

0 Kudos
Message 8 of 8
(2,687 Views)