Forum Discussion

freedark's avatar
freedark
Occasional Contributor
15 years ago

Multiple JDBC Datasources conflict when included in a testcase together

If I have more than one JDBC Datasource included in a testcase they will not run synchronously.  If I run them individually they each work however if I attempt at runtime the first one will work and each one afterwards will fail.  The ability to have multiple JDBC Datasources is important for the test cases I am writing and fast resolution of this if possible would be greatly appreciated.  I am e-mailing an XML of the test case to support@eviware.com

3 Replies

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,
    Problem here is with Preparing JDBC statements at the beginning of TestCase for all DataSources (where the Property expansion is done ) . So your second DataSourceTestStep doesn’t actually get the result property value to be expended, from the first one. The workaround would be to add a GroovyTestStep to prepare statement for the particular DataSourceTestStep just before it’s run, for example for “DataSource - Validate Celebs” you would need to add GroovyTestStep before it with the next code:

    testRunner.testCase.testSteps["DataSource - Validate Celebs"].prepare( testRunner, context )


    Please let us know if this works.

    Regards,
    /Dragica
    Eviware.com
  • freedark's avatar
    freedark
    Occasional Contributor
    This did not resolve my problem.  I've re-written my queries to account for this.
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi!

    ok.. then can you please send us the rewritten testcase so we can try to reproduce?

    regards!

    /Ole
    eviware.com