Last Run report
Is there any way to get last run report with step status report. I have query but it brings all the runs associated with test instance but I just need the latest run.
Any query or vbs script to do that . I couldn't find any solution for this in the forum.
Thanks in Advance . We are using HP ALM
Re: Last Run report
In very general terms, if you have identified the Test Instance you want to report on, then in a SQL query you would use something like the MAX function to get the newest Run record associated with the Test Instance, and from there you can get the Steps associated with the Run.
What sort of report are you trying to get - verbage or counts or ...?
For instance, here's a query (built in ALM v11 Dashboard Excel Reports) that produces an Excel spreadsheet with the following columns:
- Test Set Folder Name
- Test Set Name (test sets in the folder)
- Test Case Name (test cases in test set)
- Test Plan Folder Name (where the Test Case exists)
- No. of Test Steps in Plan (because a test that has been added to a test set but hasn't been run in the lab has no associated steps yet)
- Status of Most Recent Run of Test
- Tester Name
- RN_RUN_ID (the ID of the Run, left in when I was debugging)
- Passed (number of steps in Run with a status of Passed)
- Failed (number of steps in Run with a status of Failed)
- No Run (number of steps in Run with a status of No Run)
I developed this in response to another post on another forum.
As written, it will include only Test Set Folders that actually contain a Test Set, and it will no provide full path information for those folders.
And note that it does not include all possible test step statuses. The original post that I developed this for wanted only Passed, Failed, and No Run.
<font class="small">Code:</font><hr /><pre>
CF_ITEM_NAME AS "Test Set Folder Name",
CY_CYCLE as "Test Set Name",
TS_NAME as "Test Case Name",
AL_DESCRIPTION as "Test Plan Folder Name",
TS_STEPS as "No. of Test Steps in Plan",
RN_STATUS as "Status of most recent Run of Test",
RN_TESTER_NAME as "Tester",
[Test Instance ID],
[MAX RUN ID],
ST_ID AS "ST_ID2",
rn_testcycl_id as "Test Instance ID" ,
max(rn_run_id) AS "MAX RUN ID"
LEFT OUTER JOIN STEP on rundata.[MAX RUN ID]=STEP.ST_RUN_ID
left outer join testcycl on rundata.[Test Instance ID]=TESTCYCL.TC_TESTCYCL_ID
LEFT OUTER JOIN TEST ON TESTCYCL.TC_TEST_ID=TEST.TS_TEST_ID
LEFT OUTER JOIN CYCLE ON TESTCYCL.TC_CYCLE_ID = CYCLE.CY_CYCLE_ID
LEFT OUTER JOIN CYCL_FOLD ON CYCLE.CY_FOLDER_ID=CYCL_FOLD. CF_ITEM_ID
LEFT OUTER JOIN ALL_LISTS ON TEST.TS_SUBJECT=ALL_LISTS.AL_ITEM_ID
left outer join RUN ON rundata.[MAX RUN ID]=RUN.RN_RUN_ID
count(SOURCE.ST_ID) FOR SOURCE.ST_STATUS
in ([Passed],[Failed],[No Run])
) as pvt
order by CF_ITEM_NAME, CY_CYCLE, TS_NAME asc
(Opinions and information contained in this post are wholly my own and do not reflect the opinions of my employer.)