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: 

Get Teststand to set dos errorlevel

I want to launch Teststand and a Teststand sequence from a Generic Test in Microsoft Visual Studio.

 

A Generic Test allows a command line based program to be called as part of a test provided it does the follwoing

 

"In general, a generic test passes when the executable it wraps returns a value of 0, and fails if any other value is returned."

 

I can see that TestStand can be launched via the cmd line, but it looks as though there is no way to get TestStand to return an exit

code when it has finished executing a sequence (i.e. 0 passed, other number failed).

 

Can someone confirm that this is correct and there is no work around?

 

Could a wrapper program be written that launched TestStand and then returned an exit code?

0 Kudos
Message 1 of 4
(4,358 Views)

Recent versions of TestStand already return an exit code like this. What version of TestStand are you using? What command line are you using?

 

-Doug

0 Kudos
Message 2 of 4
(4,339 Views)

Test stand 2013.

How do I set the error code as part of the sequnce?

0 Kudos
Message 3 of 4
(4,337 Views)

It is set by default/automatically based on the status of the executions run. See the API help for ApplicationMgr.ExitCode for more details.

 

-Doug

0 Kudos
Message 4 of 4
(4,321 Views)