Forum Discussion

ssbsts's avatar
ssbsts
Occasional Contributor
9 years ago

Launch Composite Project from testrunner.bat using custom settings.xml

I am trying to figure out if there is a way for me to launch my composite project from testrunner.bat and tell it to use a settings.xml file that is in a custom location, not the one located in the composite projects root level directory.  Is this possible?

 

I can call it just fine using the command below and using the settings.xml in the project directory.

 

cmd.exe /C testrunner.bat -s"%soapUITestSuite%" -c"%soapUITestCase%" -t"%soapUIPropDir%\test-settings.xml" -E"Default environment" %soapUIProject%

 

But I can't figure out if its possible to tell it to use a settings.xml located somewhere else.

 

Thanks

4 Replies

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Ssbsts,

     

    Judging by you command line, you are using the –t command line parameter. As far as I know, this parameter allows specifying a file with custom SoapUI settings. However, that file and the settings.xml file located in a composite project are different.

    Could you please clarify what information is stored in your test-settings.xml, which you want to pass to SoapUI?

     

    • ssbsts's avatar
      ssbsts
      Occasional Contributor

      After further reading it seems to me (unlesss i misinterpreted) that the '-t' flag is to allow you to load a different "soapui-settings.xml" file (located in C:\Users\<user>\soapui-settings.xml".  Not the "settings.xml" file that is a per project file for each composite project. 

       

      From my experience the settings.xml file located in my composite projects directory holds the name of the project and the associated properties for that specific project.  What I would like to do is call this project but i have different environments that I am running the same project in, so having the ability to load the settings.xml file of my choosing at runtime is what I am after.  I dont do any configuraiton or anything at all with C:\Users\<user>\soapui-settings.xml.

      • TanyaYatskovska's avatar
        TanyaYatskovska
        SmartBear Alumni (Retired)

        Thanks for the explanation.

         

        Ready! API provides the Environments feature that allows you to quickly change test setup. You can easily control your target environments by changing the –E parameter of TestRunner’s command line. Does it work for you?