Service Virtualization

 View Only
Expand all | Collapse all

Execute External Command

  • 1.  Execute External Command

    Posted Sep 20, 2017 03:40 PM

    Hi All,

     

    Please help!!

     

    I am trying to execute vbs file from execute external command Step. When I am trying to run from local path its working fine. But when tried providing server path it failed saying Could not create directory Z.....(path to my vbs file)

     

    Thanks for help in advance!!



  • 2.  Re: Execute External Command

    Broadcom Employee
    Posted Sep 20, 2017 05:25 PM

    Hi,

     

    Is it failing when you try to execute the test from the Simulator or from the Workstation?

     

    If you're trying to run from the simulator, the problem might be:

    1. The executable does not exist at that location on the server, or
    2. The ID the Simulator is executing under might not have permission to read the executable.

     

    --Mike



  • 3.  Re: Execute External Command

    Posted Sep 21, 2017 01:40 PM

    Hi Mike,

     

    file is present on server as well as on local also. I tried to run it from workstation as well as from Server but no luck.

    Please find the snapshot of what I am trying to do. I mapped my server location to Z drive and then pressed execute button

     

     

    but when iam trying to run it from server or trying to run from ITR it giving cant create the path (path in execute from directory).



  • 4.  Re: Execute External Command

    Broadcom Employee
    Posted Sep 21, 2017 02:48 PM

    Is "Invoke.vbs" on the classpath?

     

    "Execute from directory" simply indicates the "current working directory" that should be used when running the executable..  It doesn't indicate where to find the executable.

     

    Please try using a fully qualified path to Invoke.vbs.

     

    --Mike



  • 5.  Re: Execute External Command

    Posted Sep 21, 2017 03:13 PM

    Mike,

     

    I had already tried that also, when i execute/ test it by execute button in test step..it ran properly but when i tried to run it through ITR ...it again gave error could not create directory at path...

     

    Thanks for your patience and helping me out



  • 6.  Re: Execute External Command

    Broadcom Employee
    Posted Sep 21, 2017 03:30 PM

    Hmmm.  I'm stumped.

     

    Does the vbs executable need to create a file?  I'm trying to figure out if it's Workstation that can't create something, or if it's your executable that can't create something.  Either way, it seems permissions related.

     

    Are you seeing a stack trace in Workstation.log?  If so, can you share it?

     

    --Mike



  • 7.  Re: Execute External Command

    Posted Sep 22, 2017 09:59 AM

    Mike,

    please my comments and help .. Thanks in Advance!!



  • 8.  Re: Execute External Command

    Broadcom Employee
    Posted Sep 21, 2017 05:36 PM

    Can you share what the error is showing in the ITR?



  • 9.  Re: Execute External Command

    Posted Sep 22, 2017 09:57 AM

    Hi Mike and Marcy,

     

    Mike you are not stumped but you were right

    I could remove that "could not create directory" error by giving blank value for execute from directory field.

    But you were right, I have next error as "could not open the Excel file".

    In my vbs script, I am trying to open an Excel file, so just wanted to check whether i need to set any special permission in LISA. however, I had provided the PATH value = place where vbs file and Excel file is present(both have same location as of now). Please find the attached snapshot for more clarity.

     

     

    FYI, file is present at location and its not used by any other program

    Thanks in Advance for help!! have a great weekend.



  • 10.  Re: Execute External Command

    Broadcom Employee
    Posted Sep 22, 2017 11:55 AM

    You probably do not have access to the network drive.  Is it mapped so that the application can access it?



  • 11.  Re: Execute External Command

    Posted Oct 18, 2017 08:11 AM

    No its still not resolved.

    I do have access to network drive, even if i have my test case at server location and when iam trying to run test case using LISA Invoke, it giving timeout error .

     

    As Iam getting error : Error while opening file 1004 Microsoft Excel cant access the file.



  • 12.  Re: Execute External Command

    Broadcom Employee
    Posted Oct 19, 2017 04:16 PM

    Make sure you have the right permissions on the Server.  Also are you just reading the file or having to write to it?



  • 13.  Re: Execute External Command

    Posted Nov 06, 2017 03:51 AM

    Hi Marcy,

    Thanks a lot  

    you were 100% right, My bad

    there was some issue in server permissions...I tried on different server and it worked fine...Thanks a lot