Forum Discussion
- scassel_1New ContributorHi
After some %?&#@ I found out that testrunner.bat must be executed from the bin directory _or_ I have to add CD command before execute the bat:
cd "C:\Program Files (x86)\SmartBear\soapUI-4.5.0\bin"
testrunner.bat -sxxxxxx -cxxxxxx C:\Projects\xxxxxx\SoapUI\xxxxx---Outbound-soapui-project.xml
Hope this helps
Stephan - scassel_1New ContributorOr even better:
"%soapui_bin%testrunner.bat" [...............]
soapui_bin is a System variable pointing at the soapui bin directory
Stephan - r3nrutOccasional ContributorI've tried the direct path to testrunner.bat approach and I'm still receiving the error. Did this fix the problem for anyone else? I'm using soapUI Pro 4.5.
Thanks! - Brickhead009New ContributorI have also tried running the batch file from within the bin dir, and still the JDBC driver is not found.
Can we define the JDBC connection as a project property, using the -P option, etc?
Should Smartbear add a command line option to Testrunner.bat for pointing to the JDBC?
We need to solve this issue. - Brickhead009New ContributorA. On Windows
The solution is to specify a path to the JDBC driver in the CLASSPATH in soapui-pro.bat in C:\Program Files (x86)\SmartBear\soapUI-Pro-4.5.1\bin, as follows:
set CLASSPATH=%SOAPUI_HOME%soapui-pro-4.5.1.jar;%SOAPUI_HOME%..\lib\*;%SOAPUI_HOME/bin/ext/sqljdbc4.jar
B. On Linux:
try to edit soapui-pro.sh. Just add this line to the end of soapui_classpath:
SOAPUI_CLASSPATH=$SOAPUI_CLASSPATH:$SOAPUI_HOME/bin/ext/ojdbc14.jar
C.
You also should be able to change environments and point to different instances of DB connection strings and drivers, using scripts as follows:
def env = project.getPropertyValue("EnvironmentVar")
log.info "Environment param = " + project.getPropertyValue("EnvironmentVar")
log.info "Pointing to environment = " + project.getActiveEnvironmentName()
if (env != null && env != "") {
project.setActiveEnvironment(env)
log.info "Now Pointing to environment = " + project.getActiveEnvironmentName()
}
Or by including the following in your groovy script:
com.eviware.soapui.support.GroovyUtils.registerJdbcDriver("org.sqlite.JDBC")
Thanks,