Forum Discussion

TSanghvi's avatar
TSanghvi
New Contributor
13 years ago

[Resolved] help running from command line (mac)

Hi,
I've been trying to run my tests from the command line and i keep getting an error "Missing soapUI project file.."
I've tried running the test from the SoapUI home and from the directory with my project but still get this error.

I noticed that most examples use an xml file for their project file, but i don't have an xml file associated with my project (besides the settings.xml) can I still run my test?

This is the command i copied from the GUI TestRunner, where it seems to run my test fine
sh -c ./testrunner.sh -smyTestSuiteName -cmyTestCaseName -r -a -j -f/Users/me/Desktop/placeForResults -EDefault /Users/me/path/to/my/project/soapui-projects/myProject

Am i missing something? Any suggestions?

9 Replies

  • Westpac_Banking's avatar
    Westpac_Banking
    Occasional Contributor
    Hi Erik,

    I am also facing the same problem while trying to run the SoapUI project file from Terminal.
    Error Message: Missing soapUI project file..
    OS: Mac OS X
    OS Version: 10.7.5
    SOAPUI: SOAPUI-Pro-4.5.1

    Please find the steps followed below.
    1. Right click on SOAPUI project and clicked on Launched TestRunner
    Under Basic Tab
    2. Selected a TestSuite and TestCase.
    3. Clicked on Browse button and selected the bin folder of the soapui pro installation as attached below
    /Applications/SmartBear/soapUI-Pro-4.5.1.app/Contents/Resources/app/bin
    4. Checked "Ignore Errors" checkbox.
    Under Reports Tab
    5. Checked "Print Report" checkbox.
    6. Entered values for Report to Generate and Report Format as below.
    Report to Generate: SonarTestReport
    Report Format: PDF
    7. Clicked on the button "Launch"
    8. SoapUI TestRunner is launched and it executed as expected with the TestCaseRunner Summary as below.
    Running soapUI TestRunner for [SonarWebServices]
    directory: /Applications/SmartBear/soapUI-Pro-4.5.1.app/Contents/Resources/app/bin
    command: sh -c ./testrunner.sh -sSonar-Webservices -cgetCorrespondanceRequest -r -RSonarTestReport -FPDF -EDefault -I /Users/imguser/Desktop/SonarWebService-soapui-project.xml
    Find the full log in the attachment below.

    9. Launched the Terminal
    10. Went to the SoapUI Pro bin directory /Applications/SmartBear/soapUI-Pro-4.5.1.app/Contents/Resources/app/bin
    11. Pasted "sh -c ./testrunner.sh -sSonar-Webservices -cgetCorrespondanceRequest -r -RSonarTestReport -FPDF -EDefault -I /Users/imguser/Desktop/SonarWebService-soapui-project.xml" and enter
    12. Getting error as below.

    imgusers-Mac-mini-37:bin imguser$ sh -c ./testrunner.sh -sSonar-Webservices -cgetCorrespondanceRequest -r -RSonarTestReport -FPDF -EDefault -I /Users/imguser/Desktop/SonarWebService-soapui-project.xml
    ================================
    =
    = SOAPUI_HOME = /Applications/SmartBear/soapUI-Pro-4.5.1.app/Contents/Resources/app
    =
    ================================
    soapUI Pro 4.5.1 TestCase Runner
    usage: testrunner [options] <soapui-project-file>
    -F Report format. Used with -R. Valid options PDF, XLS, HTML, RTF,
    CSV, TXT, and XML (comma-separated)
    -v Sets password for soapui-settings.xml file
    -t Sets the soapui-settings.xml file to use
    -A Turns on exporting of all results using folders instead of long
    filenames
    -D Sets system property with name=value
    -E Sets the environment
    -G Sets global property with name=value
    -I Do not stop if error occurs, ignore them
    -M Creates a Test Run Log Report in XML format
    -P Sets or overrides project property with name=value
    -R Report to Generate
    -S Saves the project after running the tests
    -a Turns on exporting of all results
    -c Sets the testcase
    -d Sets the domain
    -e Sets the endpoint
    -f Sets the output folder to export results to
    -g Sets the output to include Coverage HTML reports
    -h Sets the host
    -i Enables Swing UI for scripts
    -j Sets the output to include JUnit XML reports
    -m Sets the maximum number of TestStep errors to save for each
    testcase
    -o Opens generated report(s) in a browser
    -p Sets the password
    -r Prints a small summary report
    -s Sets the testsuite
    -u Sets the username
    -w Sets the WSS password type, either 'Text' or 'Digest'
    -x Sets project password for decryption if project is encrypted
    Missing soapUI project file..
    imgusers-Mac-mini-37:bin imguser$

    It would be great if you could help me out to resolve this issue.

    Please do let me know in case of any further details required.

    Thanks,
    Udhaya
  • Westpac_Banking's avatar
    Westpac_Banking
    Occasional Contributor
    Hi Erik,
    I have got the response by correcting the command used in point 11 as below.
    a. Remove "sh -c " from command
    b. There should not be any "-" or space in the project/testsuite/testcase name or path
    Modified the command in point 11 as below
    ./testrunner.sh -sSonar_Webservices -cgetCorrespondanceRequest -r -RSonarTestReport -FPDF -EDefault -I /Users/imguser/Desktop/SonarWebService_soapui_project.xml
  • Hi!

    I suppose you are running a composite project since you don't have a file extension?
    What's the content of that folder?

    ---
    Regards
    Erik, SmartBear Support
  • TSanghvi's avatar
    TSanghvi
    New Contributor
    it has settings.xml, element.order and a bunch of folders corresponding to my testSuites
  • Hmm...

    That should work.

    Do you have any spaces in the path to your composite project?

    What version of soapUI are you running? Use the Help -> About SoapUI Pro to find out.
    What version of OS X are you running?

    --
    Regards

    Erik
    SmartBear Sweden
  • TSanghvi's avatar
    TSanghvi
    New Contributor
    Hi Erik,
    Thanks for the help.
    There are no spaces in the path to the project...but there is a '-' character in the folder name one level under the project.

    I'm running SOAPUI Pro 4.5.1
    my osx version is 10.7.5 (lion)
  • Hi!

    We've tried recreating this issue on OS X using a new composite project, but it works as intended.
    Do you get the same issues when you create a new composite project as well? If not, please send us your project (preferably as a zip archive) to: http://www.soapui.org/Support/support-overview.html
    so we see if there's something wrong with your project.

    --
    Regards

    Erik
    SmartBear Sweden
  • Thanks for letting us know what the issue was. Don't hesitate to contact us if you ever have any further problems and we'll happily assist.

    --
    Regards

    Arian
    SmartBear Sweden