otahp-quality-center

Getting First Run status of Test Scripts in QC through OTA


I would like to have the 'First Run Status' of the scripts present in a path through the OTA.

Ex: If I give a QC Test Lab Path, I would like to see All the Test Scripts along with their First Run Status.

Say, 1234 is a Test Script. It might have either Passed or Failed or any other status on the First Run while executing. Then the next day the same script might have been altered to a new status if it is failed.

I would like to know the First Run Status.

It should access the RUN table to extract ALL RUNS of the Test Script from Test Lab whose path will be got as input from User.


Solution

  • If you have a list of runs (see this post to get it), just iterate over the runs and get the execution date and execution time fields to find the first run:

    exec_date = run.Field("RN_EXECUTION_DATE")
    exec_time = run.Field("RN_EXECUTION_TIME")
    

    When you have the run you want, get the run status:

    status = run.Status