NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

abort the current sequence file

Hi,

 

I have a main sequence file (with a number of test cases) calling another 2nd sequence file.  I like to abort from my 2nd sequence file if a paremeter returned is certain value (e.g. parameter.result == "1") from TestComplete.  What command can I use?

 

Also once the 2nd sequence file aborts, I need the main sequence file to continue on the next step.

 

Thanks!

0 Kudos
Message 1 of 12
(4,412 Views)

By 'abort' I assume you mean terminate. That call is RunState.Execution.Terminate()

 

Not sure this is the direction you want to go as there are other options for exiting such as failing a test and setting the runstate flag to gotocleanonfailure or something along those lines.

CTA, CLA, MTFBWY
0 Kudos
Message 2 of 12
(4,408 Views)

I think you should use post expressions/action: go to step: cleanup

Rodéric L
Certified LabVIEW Architect
0 Kudos
Message 3 of 12
(4,398 Views)

Thanks Snowpunter!

 

I'll look into it.

0 Kudos
Message 4 of 12
(4,379 Views)

Thanks Roderic!  I'll look at both solutions.

0 Kudos
Message 5 of 12
(4,379 Views)

Using the Terminate() call is perhaps the better solution, as setting the GotoCleanup property doesn't change the Result.Status for the calling step.

0 Kudos
Message 6 of 12
(4,375 Views)

Hi All,

 

How do I implement the Runstate.Execution.Terminate() ?  I tried using a f(x) statement step, then Edit Expression, and all I see is Runstate.Execution.

 

Thank you

 

Peter

0 Kudos
Message 7 of 12
(4,357 Views)

The easiest way is to use the Post Action in the Step to Terminate.

 

But I dont think you want to do that because you still want the caller sequence to run. Therefore use the Post Action of the Step to goto to CleanUp. This will then skip the remaining steps in the Main, run any steps you have in the Cleanup and return back to the Caller Sequence which continue running onto the next step.

 

 

 

 

Regards
Ray Farmer
0 Kudos
Message 8 of 12
(4,352 Views)

If you do want to use terminate, but want the parent sequence to still continue running, you can use the run option "Ignore termination" on the sequence call step.

Message 9 of 12
(4,345 Views)

Thank you Ray_Farmer and dug9000.  I'll try both solutions when I get to the lab.

 

I just realized I have a three layered sequence calls.  So I need to terminate the steps at the child 3rd sequence file, and return to the parent sequence file and continue on the next step.  I suppose I don't need to do anything in the 2nd sequence file, right?

 

Also, what should I put in the cleanup tab so that it will return to the parent sequence call and contine on the next step?

 

Thanks!

 

Peter

0 Kudos
Message 10 of 12
(4,339 Views)