Highlighted
Valued Contributor.. Valued Contributor..
Valued Contributor..
62 views

Query that captures number of times test cases were executed in test lab

I'm new to ALM and I'm hoping someone can help me build a simple query in the Query Builder for the number of times each testcases in the Test lab (in the current project only) has been run.

0 Likes
3 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Query that captures number of times test cases were executed in test lab

If you are talking about test case execution times, you can refer to below query:

SELECT rn_test_id, count(*) FROM RUN group by rn_test_id

0 Likes
Highlighted
Valued Contributor.. Valued Contributor..
Valued Contributor..

Re: Query that captures number of times test cases were executed in test lab

Hi Roddy,
Is there a way that we can set the query based on folder path with Test instance ID.
0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Query that captures number of times test cases were executed in test lab

Replace the 9 in below query to the folder ID you want to query. The syntax is for Oracle. If you are working for an SQL server, replace "||" with "+".

SELECT
    RN_TEST_ID,
    COUNT(*)
FROM
    RUN
    INNER JOIN TESTCYCL ON RN_TESTCYCL_ID = TC_TESTCYCL_ID
    INNER JOIN CYCLE ON TC_CYCLE_ID = CY_CYCLE_ID
    INNER JOIN CYCL_FOLD ON CY_FOLDER_ID = CF_ITEM_ID
WHERE
    CF_ITEM_PATH LIKE (SELECT CF_ITEM_PATH FROM CYCL_FOLD WHERE CF_ITEM_ID = 9) || '%'
GROUP BY RN_TEST_ID

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.