Forum Discussion
nmrao
Champion Level 1
4 years agoMay be you want do it (calling qtest api programmatically) from tear down script instead of events.
Because, the events are triggered even before the assertions are run; so will not have the status of the test.
Because, the events are triggered even before the assertions are run; so will not have the status of the test.
- Sritharan4 years agoOccasional Contributor
Yes . But keeping it at the teardown , the scripts there will run once all my data row has finished running. But we want to update qtest for each data row. So we have kept the script to update qtest as a test step itself
Anyway, thanks for the reply rao
- ChrisAdams4 years ago
Champion Level 1
Hi,
I'm not quite sure how you would actually update QTest, but in your data driven test, you could add a Groovy script within the loop that could update QTest on each iteration of the loop.
With Groovy script you can pretty much do whatever you want.
- nmrao4 years ago
Champion Level 1
If you want to update for each row, hold the data (which you need to update in qtest) and create the list and update the same (list) from teardown. If qtest can support updating bulk data, then you can send all the data (which was build above in the list) in single call. Otherwise, you have to iterate thru the list and make multiple calls.
Like ChrisAdams suggested, you can do that as well after itearation of your data driven test.