Service Virtualization

 View Only
Expand all | Collapse all

Execute External command step not working as expected from VSE

  • 1.  Execute External command step not working as expected from VSE

    Posted Feb 15, 2021 11:55 AM
    Hi,

    I have a script to use the sfxcl command in Execute External command step. The script is working as expected when I test it via ITR on workstation instance on the server that hosts DevTest. But I get the message ' 'sfxcl' is not recognized as an internal or external command, operable program or batch file.', when I deploy the test as monitor to CVS or deploy it as VSM on VSE.
    SecureFx is installed on the server that has DevTest services running on.

    Need help on how to refer to the executable from the test.


  • 2.  RE: Execute External command step not working as expected from VSE

    Broadcom Employee
    Posted Feb 15, 2021 12:01 PM
    Hi Swapna
                Have you tried passing the full path of the executable 'sfxcl' ?

    --
    regards
    Sankar Natarajan

    This electronic communication and the information and any files transmitted with it, or attached to it, are confidential and are intended solely for the use of the individual or entity to whom it is addressed and may contain information that is confidential, legally privileged, protected by privacy laws, or otherwise restricted from disclosure to anyone else. If you are not the intended recipient or the person responsible for delivering the e-mail to the intended recipient, you are hereby notified that any use, copying, distributing, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited. If you received this e-mail in error, please return the e-mail to the sender, delete it from your computer, and destroy any printed copy of it.





  • 3.  RE: Execute External command step not working as expected from VSE

    Posted Feb 15, 2021 12:13 PM
    Yes I did pas the complete path of the executable sfxcl in the 'Execute from Directory' section of 'Execute External Command' step.
    Got this error:
    java.lang.RuntimeException: Base directory \\<servername>\c$\Program Files (x86)\VanDyke Software\SecureFX\sfxcl.exe is a file, not a directory!

    Please let me know if I have to give the complete path somewhere else?


  • 4.  RE: Execute External command step not working as expected from VSE

    Posted Feb 15, 2021 12:18 PM
    Hi Swapna,

    Try giving " \\<servername>\c$\Program Files (x86)\VanDyke Software\SecureFX\" in your directory path and include the exe name in command once.

    Thanks


    ------------------------------
    Regards,
    Vaibhav Jain
    Capgemini
    ------------------------------



  • 5.  RE: Execute External command step not working as expected from VSE

    Posted Feb 15, 2021 12:29 PM
    Getting the below error now:


    java.io.IOException: Cannot run program "sfxcl.exe" (in directory "\\<servername>\c$\Program Files (x86)\VanDyke Software\SecureFX"): CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
    at java.lang.Runtime.exec(Runtime.java:620)
    at com.itko.lisa.utils.CommandLineExecNode.executeCmdLine(CommandLineExecNode.java:540)
    at com.itko.lisa.utils.CommandLineExecNode.executeCmdLine(CommandLineExecNode.java:452)
    at com.itko.lisa.utils.CommandLineExecNode.executeCmdLine(CommandLineExecNode.java:419)
    at com.itko.lisa.utils.CommandLineExecNode.executeCmdLine(CommandLineExecNode.java:405)
    at com.itko.lisa.utils.CommandLineExecEditor$4.doCallback(CommandLineExecEditor.java:411)
    at com.itko.util.swing.panels.ProcessingDialog$2.run(ProcessingDialog.java:194)
    at java.lang.Thread.run(Thread.java:745)
    Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessImpl.create(Native Method)
    at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)
    at java.lang.ProcessImpl.start(ProcessImpl.java:137)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
    ... 8 more


  • 6.  RE: Execute External command step not working as expected from VSE

    Broadcom Employee
    Posted Feb 15, 2021 12:46 PM
    Can you please try the following:

    1. If this external command is run from a Virtual Service, then try starting VSE as 'Administrator'
    2. Just to isolate the problem, try to keep that sfxcl executable in simple path; eg: C:\test just to make sue long folder names and spaces are not a problem.

    --
    regards
    Sankar Natarajan

    This electronic communication and the information and any files transmitted with it, or attached to it, are confidential and are intended solely for the use of the individual or entity to whom it is addressed and may contain information that is confidential, legally privileged, protected by privacy laws, or otherwise restricted from disclosure to anyone else. If you are not the intended recipient or the person responsible for delivering the e-mail to the intended recipient, you are hereby notified that any use, copying, distributing, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited. If you received this e-mail in error, please return the e-mail to the sender, delete it from your computer, and destroy any printed copy of it.





  • 7.  RE: Execute External command step not working as expected from VSE

    Posted Feb 15, 2021 01:34 PM
    The DevTest Services are running on a remote server as service. When I login to workstation on the remote server and give path as C:/ or D:/ the scripts work fine. But the same does not work as expected when I deploy the test on CVS monitor or as virtual service on VSM. Also if I change the path to //<servername>/c$/ or //<servername>/d$/ the scripts works from my local machine but not elsewhere.

    Why does the same project when open on local machines workstation show the value of property LISA_RELATIVE_PROJ_ROOT as \\<servername>\d$\DevTest\Projects\ and that on workstation on remote server (that hosts the DevTest) as D:\DevTest\Projects\ ?


  • 8.  RE: Execute External command step not working as expected from VSE

    Posted Feb 15, 2021 11:30 PM
    Edited by Vaibhav Jain Feb 15, 2021 11:31 PM
    Hi Swapna,

    LISA_RELATIVE_PROJ_NAME refers to the project for the currently executing test or subprocess. If the test does not call any subprocesses, LISA_PROJ_NAME and LISA_RELATIVE_PROJ_NAME will have the same values

    Thanks

    ------------------------------
    Regards,
    Vaibhav Jain
    Capgemini
    ------------------------------



  • 9.  RE: Execute External command step not working as expected from VSE

    Posted Feb 16, 2021 06:00 PM
    Thank you Vaibhav and Sankar. I got the ftp issue resolved. As mentioned above I gave the path as c:\Program Files (x86)\VanDyke Software\SecureFX and added the sfxcl.exe and some config path to command line to make it work.
    Thank you for your answers.



  • 10.  RE: Execute External command step not working as expected from VSE

    Posted Feb 16, 2021 11:19 PM
    Cool. Thanks for the update Swapna.

    ------------------------------
    Regards,
    Vaibhav Jain
    Capgemini
    ------------------------------



  • 11.  RE: Execute External command step not working as expected from VSE

    Broadcom Employee
    Posted Feb 17, 2021 02:55 AM
    Good to know. Thanks for the update.

    --
    regards
    Sankar Natarajan

    This electronic communication and the information and any files transmitted with it, or attached to it, are confidential and are intended solely for the use of the individual or entity to whom it is addressed and may contain information that is confidential, legally privileged, protected by privacy laws, or otherwise restricted from disclosure to anyone else. If you are not the intended recipient or the person responsible for delivering the e-mail to the intended recipient, you are hereby notified that any use, copying, distributing, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited. If you received this e-mail in error, please return the e-mail to the sender, delete it from your computer, and destroy any printed copy of it.