New Ranks & Badges For The Community!
Notice something different? The ranks and associated badges have gone "Star Fleet". See what they all mean HERE
Highlighted
Absent Member.
Absent Member.
356 views

testcases in excel report

I would like to be able to pull out all Test Case as one excel report. Can you tell me how to do this? Thanks and kind regards
0 Likes
16 Replies
Highlighted
Absent Member.
Absent Member.

Without the Step details:
Module Test Lab, View Test Grid, (optional: Select Columns, arrange them, Favorites Add...), right click on any test Export All.
0 Likes
Highlighted
Absent Member.
Absent Member.

1) Login to QC and go to Tools --> Excel reports.
2) Create a new report and paste the "Query 1" given below.
3) Generate the report. But note that it may take a long time to run if there are many test cases. I would recommend using "Query 2" and generate the report for the folders that you want. This will be faster compared to getting all the test cases. But, if you really want everything in the project, then use "Query 1"

Query 1 (All test cases in a project):
Select TS_NAME as Name, TS_DESCRIPTION as Description,
DS_STEP_NAME as Step_Name, DS_DESCRIPTION as Step_Description, DS_EXPECTED as Expected_Result

from TEST, DESSTEPS, ALL_LISTS

where DS_TEST_ID=TS_TEST_ID and TS_SUBJECT=AL_ITEM_ID

order by TS_NAME, DS_STEP_NAME



Query 2 (Test cases from particular folder and its sub-folders):
Replace 'AAAAAPAAFAAB%' with the path of the folder that you want.
To find out the path, use this query - SELECT AL_ABSOLUTE_PATH
FROM all_lists where ALL_LISTS.AL_DESCRIPTION ='folder name'

Remember to use the % symbol

Select TS_NAME as Name, TS_DESCRIPTION as Description,
DS_STEP_NAME as Step_Name, DS_DESCRIPTION as Step_Description, DS_EXPECTED as Expected_Result

from TEST, DESSTEPS, ALL_LISTS

where DS_TEST_ID=TS_TEST_ID and TS_SUBJECT=AL_ITEM_ID
and AL_ITEM_ID in (SELECT ALL_LISTS.AL_ITEM_ID from ALL_LISTS where AL_ABSOLUTE_PATH like 'AAAAAPAAFAAB%')

order by TS_NAME, DS_STEP_NAME
0 Likes
Highlighted
Absent Member.
Absent Member.

Thanks a lot to both of you.
Have a nice day.
0 Likes
Highlighted
Absent Member.
Absent Member.

Sorry Shivaraj

i´m triying to search the menu:

Tools-->Excel reports

but i only see:

Tools--> Document Generator

I´m using QC 10.0, ¿can you help me? it´s necesary install some pulg-in or similar to use "Excel reports"

Thanks
0 Likes
Highlighted
Absent Member.
Absent Member.

Its built in to QC9.2 onwards. Check with your site admin.
0 Likes
Highlighted
Absent Member.
Absent Member.

Thanks.

I found the option in dashboard module :

Menu Analisys--> New Excel Report.

A lot of thanks
0 Likes
Highlighted
Absent Member.
Absent Member.

One correction in the queries that i provided. Do not use "order by DS_STEP_NAME". One of my friends found that this messes up the order in which the steps are displayed.
0 Likes
Highlighted
Absent Member.
Absent Member.

Thanks Shivaraj

I executed the Query and run OK, but it only pull out to excel Test who has test_steps

How can i pull out in the same report also for Test without steps?

Thanks
0 Likes
Highlighted
Absent Member.
Absent Member.

Hello


maybe basically try this code :):

SELECT * FROM TEST

or something like this:

SELECT
TEST.TS_TEST_ID as TEST_ID,
TEST.TS_NAME as TEST_NAME,
TEST.TS_DESCRIPTION as DESCRIPTION,
TEST.TS_STATUS as STATUS
............
............
FROM TEST

Regards,
J.
0 Likes
Highlighted
Absent Member.
Absent Member.

Try this query:

Select TS_NAME as Name, TS_DESCRIPTION as Description,
DS_STEP_NAME as Step_Name, DS_DESCRIPTION as Step_Description, DS_EXPECTED as Expected_Result

from TEST left join DESSTEPS on test.ts_test_id=dessteps.ds_test_id

Order by Test.TS_Name


Imran


0 Likes
Highlighted
Absent Member.
Absent Member.

A lot of thanks

This is that i need.
Only two question more,

How can i execute the Select only for a especific Folder of Test Plan?

And, It´s possible modify the Select to include the complete path of the test?

Sorry for the inconvenience of my questions, which may be silly to you, but SQL is not my strong point
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.