Service Virtualization

Expand all | Collapse all

Unable to execute "echo" command from  Execute External Command Step

Jump to Best Answer
  • 1.  Unable to execute "echo" command from  Execute External Command Step

    Posted 06-06-2018 05:22 PM

    Hi All,

              When I am trying to run " echo" command from  Execute External Command Step,I am getting "java.io.IOException: Cannot run program "echo" " error.

                                                                  Thanks,

    Vish



  • 2.  Re: Unable to execute "echo" command from  Execute External Command Step
    Best Answer

    Posted 06-06-2018 08:03 PM

    There is no program called "echo". Output into a shell is provided by a shell function called "echo", so you would always get a "can't run program" error if you try to invoke it.

     

    What are you trying to output, where are you trying to output it, and why? When I need to output anything, I tend to use the testExec class in a JSR-223 step, as it can output to log files and to the test execution results. Various examples of the use of this class can be found in DevTest 8.0 - Scripting Guide - V1.1.pdf 



  • 3.  Re: Unable to execute "echo" command from  Execute External Command Step

    Posted 06-07-2018 11:34 AM

    Rick is correct.  "echo" is a shell command and not a program.  If you want this to work, you need to select the "Exec Shell" checkbox on the step:

     

     

    --Mike