Forum Discussion

pimh's avatar
pimh
New Contributor
10 years ago

Testrunner: does not switch the JDBC connection while using the environment option

Hi,
I"m using Ready! API 1.4.1 in combination with Jenkins. The project has several enviroments defined in wich only one JDBC database connection is specified. For the different enviroments this definition is used; where per environment the real JDBC connections is set to a corresponding endpoint.

 

Hence, I use different back-end databases and use the environment option to swith the JDBC to the correct one. That seems to work fine in the GUI. However, while running the project at the commandline via the testrunner faciltity, the environment is not switched at all. It seems to use the active enviroment that was used last time within the project.

 

Commandline (using symbolic link SmartBear to resolve path version indepedent): /opt/SmartBear/soapUI/bin/testrunner.sh -r -j -M -f ./testresults -E postgres93  -c VerifyService datahub_integration_test.xml

 

I'm using the -E option and the environment 'postgres93' here. It is defined as well so no errors during execution. Only switching JDBC using enviroments i.c.w. testrunner is not possible?

 

Any help is appreciated!

  • pimh's avatar
    pimh
    New Contributor

    Searching the history showed that this seems to be an old bug? For CI it is important that JDBC settings are swapped as well while using different environments. In the UI it works. Using testrunner it does not. Kind of frustrating. Tried to use this technique: http://ryanoglesby.net/2014/06/04/environment-swapping-in-soapuipro-from-commandline/

     

    Alas, it did not work out properly in all cases.

     

    In the end I just replace all JDBC connection details (connectionString & driver) in the project file using scripting to make it fit for the environment. Ugly.