# Succesfull test in SOATest fails with SOATestcli.exe

Posts: 5

I am implementing an automated parasoft test solution using soatestcli.exe. Our test suite uses sql query to validate test result. I currently have a probleme where SOATest and SOATestcli.exe gives different results.

SOATest : all test passes
SOATestcli : I get this error

```<Position XPath="/SQLException">
<Subtree Operation="insert" Child="1">
<SQLException>java.sql.SQLException: Unable to instantiate class "com.microsoft.sqlserver.jdbc.SQLServerDriver". Please check the DB driver classname and the jar file locations in Parasoft > Preferences > JDBC Drivers.</SQLException>
</Subtree>
</Position>
```

The JDBC Drivers preference seems ok in parasoft:

What am I not getting? Where does SOATestcli get its JDBC Drivers preference?

I am using parasoft 9.10 64bit on Windows 2008 r2.

Thank you.

• Posts: 890 ✭✭✭
edited November 2017

soatestcli gets preference settings from a java property file you pass for the command line argument "-localsettings path_to_property_file". In your property file, you'll want to set the property "datasources.jdbc.classpath".

For detail, please see Configuring Localsettings.

• Posts: 10

(based on your screenshot) Something like this goes in your property file:
datasources.jdbc.classpath=C:/Program Files/Parasoft/Test/9.10/plugins/sqljdbc4.jar

*If prefer to use backward slash (), make sure to escape it by prepending with another backward slash. e.g. \

• Posts: 5

It works!

I added a `.properties` file to my workspace with the following values. I used escaped special chars as documented in the Configuring Localsettings page .

# C:\Program Files\Parasoft\Test\9.10\plugins\sqljdbc4.jar
# C:\Program Files\Parasoft\Test\9.10\plugins\jtds-1.3.1.jar
datasources.jdbc.classpath=C%3A%5CProgram%20Files%5CParasoft%5CTest%5C9.10%5Cplugins%5Csqljdbc4.jar\nC%3A%5CProgram%20Files%5CParasoft%5CTest%5C9.10%5Cplugins%5Cjtds-1.3.1.jar

Thank you!

• Posts: 3

Is there any way to use these paths as relative to workspace rather than absolute paths?

• Posts: 890 ✭✭✭

Is there any way to use these paths as relative to workspace rather than absolute paths?

You can use variables. In particular, I find "env_var" to be pretty handy. See Using Variables in Preference Settings.

• Posts: 890 ✭✭✭
edited July 2018

You could also try "workspace_loc" variable or "project_loc" variable. If you use "project_loc" then you must give it a project name like "\${project_loc:TestAssets}"