Forum Discussion

Sritharan's avatar
Occasional Contributor
3 years ago

Event handling to run another API after each data row has completed running

Hi All,


We have a requirement to map our test cases to qtest. Currently we have test cases in excel. For each api, lets say we have 10 test cases inside a workbook. These 10 rows of data in that workbook represents each test case. We have a data driven test suite in place already. 


So, once a row has finished running, we want to go and update the corresponding test case in qtest as pass/fail. We thought of doing this using event handlers. Like, once a row has finished running in readyapi, the event handler will trigger the qtest api and make it pass/fail. But we could not find any events which is present for each data row execution. We could see test run listener, test step, test case


Kindly suggest a way for the above approach, or if there is any other alternative way to complete this, kindly suggest that as well


Thanks in advance:)

5 Replies

  • nmrao's avatar
    Champion Level 3
    May 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.
    • Sritharan's avatar
      Occasional 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

      • ChrisAdams's avatar
        Champion Level 3



        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.