Share datasource across referenced test cases

goofy78270goofy78270 Posts: 71

While I can run individual tsts on their own, when I link them as referenced test cases, the datasource from the original tst is used. Is it possible to set the datasource for a referenced tst to that of the current tst, so only one update is needed when changing row references similar to how environments work with referenced tsts?

Comments

  • jakubiakjakubiak Posts: 598 admin

    There is a section in the SOAtest documentation that shows how to do this - see https://docs.parasoft.com/display/SOA9108/Advanced+Strategies, especially steps 9-11.

  • goofy78270goofy78270 Posts: 71

    So for all variables in my datasource(s), I need to define them as test suite variables, in order to use them in reference tst files?

  • jakubiakjakubiak Posts: 598 admin

    Yes you do, if you would like to pass data source values into the referenced test suites.

  • goofy78270goofy78270 Posts: 71
    edited November 2019

    ok...that may not be ideal for my case as i switch datasources based on environment, but I will keep that in mind for other tests in the future.

  • goofy78270goofy78270 Posts: 71

    I think it would be beneficial if at a test level, the datasource flag had an option to "Use value from parent test suite (if defined)." rather than individual fields or if the DS was only used from the parent test suite similar to the environments.

  • jakubiakjakubiak Posts: 598 admin

    Thank you for the suggestions!

Sign In or Register to comment.