9

I have the free version of Soap UI and several different workspaces. I would like to set up several shortcuts to Soap UI with each shortcut including a start-up parameter indicating which workspace to load, but I can't find what the actual parameters are to do that. I looked over the documentation, and I saw a reference to the fact that there are start-up parameters available, but I couldn't find where they were listed.

Is there a way to do this (similar to eclipse's "-data" parameter)?

thanks.

Jeremy
  • 1,015
  • 4
  • 11
  • 20
  • Has anyone found a list of start-up parameters for `SoapUI-.exe`? I am inclined to ask a separate question to find as much (being that this question and the accepted answer are really workspace focused despite the question's title) but figured I would check with a follow-up comment first. – J0e3gan Nov 21 '13 at 02:46
  • Following @kiprainy's advice below, I checked the SoapUI source, specifically `SoupUI.java`. According to `initSoapUIOptions()`, `SoapUI-.exe` command-line options include `w` (`"Specified the name of the workspace xml file"`) as @kiprainy describes and `p` (`"Sets project name and its password in format :"`). – J0e3gan Nov 22 '13 at 01:41

2 Answers2

9

You can do this fairly easily by creating a workspace file that references your project, and then starting soapui from the command line or a batch file. The switch you need to specify a workspace file is -w.

soapui-4.5.1 -w "c:\path to my workspace file"

All your workspace file needs, in turn, is a single node with your project name and the path to your project file.

<con:soapui-workspace xmlns:con="http://eviware.com/soapui/config" soapui-version="4.5.1" name="Projects"> <con:description/> <con:settings/> <con:project name="My Project Name">D:/path to my project.xml</con:project> </con:soapui-workspace>

I know this is old, but I had the same question, and was frustrated that I couldn't specify a startup project. I downloaded the SoapUI source code, and dug around until I found the answer.

kiprainey
  • 3,241
  • 4
  • 29
  • 29
  • Thank you! This works great. For myself, I didn't have to modify the workspace file (but I'm only interested in starting up with a specific workspace, not so worried about the project). – Jeremy Oct 03 '12 at 21:21
  • My pleasure. Now if I could only figure out how to do the same thing with LoadUI. – kiprainey Oct 03 '12 at 23:22
  • I use testrunner.bat. Why do you choose here to not run with that method? – djangofan Apr 29 '13 at 20:29
  • The method that I've suggested was the easiest way I found to specify a workspace file and startup project. If you're using a batch file, you could easily include the paramater in there as well. – kiprainey Apr 30 '13 at 00:22
  • Very cool. How did you learn of the `-w` command-line option? Do you know of a list of command-line options for `SoapUI-.exe`? – J0e3gan Nov 21 '13 at 02:49
  • 1
    @J0e3gan I had to download the source code and poke around to find the command line options. I wasn't able to find documentation anywhere. – kiprainey Nov 21 '13 at 13:39
  • Thanks for the tip. I didn't think of that option. It's unfortunate that command-line options for `SoapUI-.exe` are not documented like those for `testrunner.bat` (which are documented very well), but examining the `SoapUI-.exe` source will work. – J0e3gan Nov 21 '13 at 19:39
  • 1
    A +1 to you, good sir, simply for downloading the SoapUI code and going through it to find the solution. – Ellesedil Aug 20 '14 at 19:07
  • By the way, you didn't happen to notice a switch for specifying a global settings file path, did you? I'd even settle for a switch that allows me to override the user's home directory for SoapUI. [I found a way via the installed batch files](http://forum.loadui.org/viewtopic.php?p=38121#p38121), but I need to find something that's a little easier to edit. If you didn't, it's looking like I might need to do the same steps you took to find the solution. – Ellesedil Sep 03 '14 at 20:32
  • @Ellesedil, I'm afraid I didn't notice anything for specifying a global settings file path. If I recall correctly, I had to log on to our build server as the user that executes our SOAP UI tests, open the app, and specify a path. It's less than ideal, obviously. – kiprainey Sep 03 '14 at 20:41
  • Thanks. I'll do some more searching, but I suspect I'm a few hours away from pulling the source down myself. – Ellesedil Sep 03 '14 at 20:42
0

You can achieve this by having a different soapui-settings.xml file for each worksapce, then overwriting the SOAPUI_HOME soapui-settings.xml with the appropriate setting file when you startup Soapui.
Create a simple wrapper shell/bat script to do the copying before kicking off soapui.sh, and copy the modified version back if necessary.

justAnotherUser
  • 181
  • 1
  • 6
  • 1
    I'm afraid I can't find a sopaui-settings.xml file in my install (Win 7 x64). I also dug around the ProgramData and Appdata folders... – Jeremy Feb 17 '11 at 20:48
  • @Jeremy: My `soapui-settings.xml` file (running Win 7 x64) is in `C:\Users\myusername` - in case it helps anyone who is similarly snagged. – J0e3gan Nov 21 '13 at 02:35