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.

Use two different .tst files for single assertion

bharatbarz
bharatbarz Posts: 44

Hi Team, We have a scenario in which we have to query the DB just before to Batch Job run and store the results in a data bank. Then after the batch is completed using the previously queried results, we have to check the DB for processed results. Can we write 2 different .tst for these and can we refer to the previous .tst databank in second .tst file or how this can be achieved. Please share your guidance.

Tagged:

Best Answers

  • jakubiak
    jakubiak Posts: 795 admin
    Answer ✓

    You should be able to create a referenced test suite that references the .tst file that has the data bank, and then refer to the column name in the Fixed field using the ${} syntax.

  • jakubiak
    jakubiak Posts: 795 admin
    Answer ✓

    Add the same writable data source using the same name to TEST3.tst.

Answers

  • bharatbarz
    bharatbarz Posts: 44

    Thanks a lot. it worked.

  • bharatbarz
    bharatbarz Posts: 44

    Hi Jakubiak, My TEST1 test suite populates more than one record in a databank. I created TEST2 test file referencing TEST1 and when i referenced TEST1 Databank field using ${}, I am able to access only first row. How to make the databank of TEST1 as Datasource in TEST2, so that all rows can be accessed ?

  • jakubiak
    jakubiak Posts: 795 admin

    I'm not sure I fully understand your scenario, but if you are populating more than one record in a databank, you need to write the values to a Writable Data Source. You can still reference the values, but you need to include the same writable data source with the same settings and same name in both .tst files.

  • bharatbarz
    bharatbarz Posts: 44

    I have done my test setup (TEST1.tst and TEST3.tst) as in attached. But I am not able to choose TEST1.tst writable datasource as a drop down value in TEST3.tst. Please do let me know, if you need any further details.

  • bharatbarz
    bharatbarz Posts: 44

  • bharatbarz
    bharatbarz Posts: 44

    Thanks. It worked.

Tagged