Dealing with multiple environments for a a piece of software is something most of us do. At the very least, you'll have a testing environment that is separate from your production environment. In many cases there will be a lot of testing environments, representing the different stages of quality assurance.
Some examples might be:
- Developer sandbox
- Internal test
- External test
- Acceptance test
I am using the jtds driver, enabling Windows authentication for SQL server using Soap UI.
Now you'll end up with an empty Groovy script code window. I'll break my script up into pieces to make it easier to read. Sorry about the images, but I couldn't get syntax coloring otherwise...
The text version is here.
Then lets just do an if-statement, checking which is the selected environment, keeping in mind that someone may have entered something incorrectly.