Generic Test can't be setup to run third party app in directory with space in it (C:\Program Files)

Locked Generic Test can't be setup to run third party app in directory with space in it (C:\Program Files)

  • 2012年3月27日 22:21
     
     
     

    I have read multiple postings and walk-throughs on creating and running generic tests, such as the following but am still stuck:

    http://msdn.microsoft.com/en-us/library/ms182626.aspx

    http://msdn.microsoft.com/en-us/library/ms404706(v=VS.100).aspx

    All the examples I find are regards to “perfect world” scenarios where the application being called exists in a folder path without spaces and not passing a series of parameters that might also include spaces.

    This is what I want to call in a generic test, a SoapUI test suite that I would like to execute as part of a generic test: 

    "C:\Program Files (x86)\SmartBear\soapUI-4.0.1\bin\testrunner.bat" -ehttps://qa.services.testsite.com/TestService.svc/basic -r -a -j   -fC:\Users\Public\Documents\QA\Reporting\Services -g C:\Services\XML\ServiceTestQA_edit-soapui-project.xml -s"BasicHTTP _TestService Test Set Codes"

    Please do not recommend calling Microsoft services directly since we already have a significant test bed built out in SoapUI I am not ready to rebuild and according to the instructions this should be possible with generic tests:

     I have tried a couple variations on these examples below with no luck:

    Attempt A:

    Program:

    C:\Program Files (x86)\SmartBear\soapUI-4.0.1\bin\testrunner.bat

    Command-line arguments:

    -ehttps://qa.services.testsite.com/TestService.svc/basic -r -a -j   -fC:\Users\Public\Documents\QA\Reporting\Services -g C:\Services\XML\ServiceTestQA_edit-soapui-project.xml -s"BasicHTTP _TestService Test Set Codes"

    ---

    This is what I get for the results whether I specify a working directory or not:

    'C:\Program' is not recognized as an internal or external command, operable program or batch file.

    If I use the same command enclosed in double quotes such as this:

    "C:\Program Files (x86)\SmartBear\soapUI-4.0.1\bin\testrunner.bat"

    I get this as my results:

    The specified program '"C:\Program Files (x86)\SmartBear\soapUI-4.0.1\bin\testrunner.bat"' is invalid: Illegal characters in path.

    ---

    Attempt B:

    Program:

    C:\Windows\System32\cmd.exe

    Command-line arguments:

    /c "Start /wait C:\Program Files (x86)\SmartBear\soapUI-4.0.1\bin\testrunner.bat" -ehttps://qa.services.testsite.com/TestService.svc/basic -r -a -j   -fC:\Users\Public\Documents\QA\Reporting\Services -g C:\Services\XML\ServiceTestQA_edit-soapui-project.xml -s"BasicHTTP _TestService Test Set Codes"

    ---

    Here I get the following error as well:

    'C:\Program' is not recognized as an internal or external command, operable program or batch file.

    ---

    All I do know is I am upset with whoever decided to change windows default program directory from “C:\Programs” to “C:\Program Files” with a space in it to make command line calls such as this a  big pain to get setup right.

    Any help in getting this command in a generic test straightened out would be appreciated.

すべての返信

  • 2012年3月29日 4:05
    モデレータ
     
     回答済み

    Hello Tim,

    I am sorry that, yes, I can reproduce your issue on my machine. Once I have one or many white spaces in the path, I can't run the generic test successfully. I think you can consider one feedback on the Microsoft Connect site here:

    https://connect.microsoft.com/VisualStudio/feedback/CreateFeedback.aspx

    In addition, one trick you may consider using is that you can copy the testrunner.bat into another path which does not have white spaces in it. And then re-specify the path in your generic test.

    Thanks.


    Vicky Song [MSFT]
    MSDN Community Support | Feedback to us