Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Succesfull test in SOATest fails with SOATestcli.exe

jpmorin
jpmorin 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.

Comments

  • benken_parasoft
    benken_parasoft Posts: 1,228 ✭✭✭
    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.

  • Vinay
    Vinay 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. \

  • jpmorin
    jpmorin 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!

  • ssawale
    ssawale Posts: 3

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

  • benken_parasoft
    benken_parasoft Posts: 1,228 ✭✭✭

    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.

  • benken_parasoft
    benken_parasoft Posts: 1,228 ✭✭✭
    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}"