NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Get return code from sequence file ran from custom TestStand UI

Hi,

 

I have built a custom teststand UI, I would now like to run a sequence file via the command line and have it wait for the sequence to finish and respond with a return code. The sequence file is very simple and is set to FAIL the test. I have tried the following command

 

start /wait TestExec -Quit -OutputToStdIO /runEntryPoint "Single Pass" C:\Users\user\Desktop\Sequence.seq

 

but I do not get any output in the stdout and when I request the exit code using ECHO %ERRORLEVEL% after the sequence returns I get a value of 0, even thought it should be 2 since the sequence failed.

 

Any ideas?

 

Thanks in advance

 

 

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

TestExec is an application.  The return code is based on the application exit.  The execution from TestStand has nothing to do with TestExec.  So whether or not it passes, fails, errors or terminates is independent of TestExec. 

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

Well when I run the exact same command using the shipping SeqEdit.exe (start /wait SeqEdit.exe -Quit -OutputToStdIO /runEntryPoint "Single Pass" C:\Users\user\Desktop\Sequence.seq) I get the correct exit code for passed or failed sequence file ( 0 for passed & 2 for failed). So my question was how to get this functionality built into a custom UI, since there is a property to set the exit code via  "ApplicationMgr.ExitCode" property. See http://zone.ni.com/reference/en-XX/help/370052N-01/tsuiref/reftopics/applicationmgr_exitcode_p/.

 

The reason I need all this is because I need to be able pass custom command line arguments to my sequence files but I cant do that in the shipping SeqEdit.exe so I built the custom UI to accept them. But now the problem is that my custom UI will not give me the correct exit code,, which I need. Its a catch 22!

 

 

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

Are you ensuring that the engine is properly shut down before exiting the application?  In other words calling the ApplicationMgr.Shutdown method and ensuring that it returns True.

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

Hi Jigg,

 

I ended up scrapping the custom LabVIEW UI because I figured out LabVIEW does not return exit codes. So will have to think of something else.

 

Thanks for your help!

0 Kudos
Message 5 of 6
(2,966 Views)

Hey,

 

LabVIEW does not natively support standard out, but you  could use toolkits like the CLI toolkit from Wiresmith or the new LabVIEW Command Line Interface Toolkit. You could incorporate either toolkit into your TestExec to print a standard out. 

 

Let me know if you have any questions on it.

 

Thanks,

Roxy

0 Kudos
Message 6 of 6
(2,963 Views)