I am looking for a sql query by which i can pull a test lab report with not only the latest run status but also all previous runs status. Kindly help me out.
Does following sql help?
If you want to get runs from test case view:
SELECT TS_NAME, RN_RUN_NAME, RN_EXECUTION_DATE, RN_STATUS FROM RUN inner join TEST on RN_TEST_ID= TS_TEST_ID where TS_TEST_ID=1 order by TS_TEST_ID, RN_TESTCYCL_ID, RN_EXECUTION_DATE
if you want to get runs from test lab view:
SELECT TS_NAME, RN_EXECUTION_DATE, RN_STATUS FROM RUN inner join TESTCYCL on RN_TESTCYCL_ID=TC_TESTCYCL_ID inner join TEST on TC_TEST_ID=TS_TEST_ID where RN_CYCLE_ID=1 order by RN_CYCLE_ID, RN_TESTCYCL_ID, RN_EXECUTION_DATE
Please change the where condition accordingly.