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 Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
StephenGerads

enhance call executable step

Status: Completed

I believe all of this functionality is implemented:

  • "Initial Window State" allows for showing/hiding the console
  • You can pass parameters to and get return values from the console.

If there's anything else missing, let me know.

support capture of std output and std error to variables while displaying normal 'dos' window

maybe by integrating duplication or cloning of the std output and std error streams, like the tee function provides in unix

 

**Added 4/19/2010**

It is nice to have a dos window visible while running executables that take a while to complete.

Often it is important to capture output from executable for parsing.

Currently, if you assign output to a variable, the dos window is not visible.

9 Comments
Jervin Justin
NI Employee (retired)

Hi Stephen,

 

Unless I'm misunderstanding your request, TestStand 4.2 added this functionality:

http://zone.ni.com/reference/en-XX/help/370052H-01/tshelp/infotopics/42whatsnew/#callexecstep

Jervin Justin
NI TestStand Product Manager
StephenGerads
Member

currently, if you have the window visible, std ouput and error output cannot be directed to a variable.

Jervin Justin
NI Employee (retired)

The variables should be sent to the variables when the window closes (i.e. when the executable is done executing).

 

If that is not sufficient, can you please give me an example use case so we can better evaluate this request?

Jervin Justin
NI TestStand Product Manager
StephenGerads
Member

I would like them send to variables when the window closes; but they are not.

example: try calling cmd.exe with argument /c dir

If you work for NI, see ServReq Reference#7317571

Jervin Justin
NI Employee (retired)

As long as you have a Wait Condition (usually "Wait for Exit"), you should be able to get the output when executable has finished execution and the window closes.

 

Demo: http://www.screencast.com/users/jervinjustin/folders/Jing/media/019b589e-4dd8-46a8-8817-aeb112808098

 

Do you have a particular situation where you need to continue execution of your sequence without waiting for the exe to complete?

 

I don't mean this as pushing back on your idea, and hope it doesn't come off that way. I am trying to fully understand your particular use case.

 

Thanks,

Jervin Justin

Jervin Justin
NI TestStand Product Manager
StephenGerads
Member

"support capture of std output and std error to variables while displaying normal 'dos' window"

 

the window is not visible in your screencast

this will be more apparent if you try something that takes longer

cmd.exe with argument /c cd \ && dir /s

 

if you assign output to a variable, the dos window will not be visible

If you set for ignore output, the window will be visible.

 

 

Jervin Justin
NI Employee (retired)

Ah, I see what you mean now... Thank you for providing the detailed explaination.

Jervin Justin
NI TestStand Product Manager
StephenGerads
Member

Is there for anyone to clarify my initial post to include:

It is nice to have a dos window visible while running executables that take a while to complete.

Often it is important to capture output from executable for parsing.

Currently, if you assign output to a variable, the dos window is not visible.

 

 

WireWeaver
Active Participant
Status changed to: Completed

I believe all of this functionality is implemented:

  • "Initial Window State" allows for showing/hiding the console
  • You can pass parameters to and get return values from the console.

If there's anything else missing, let me know.

https://www.linkedin.com/in/trentweaver