How can we export BPT tests into excel with steps?
Question ID: 105567
0
0

Is there any code or an SQL query that will let us pull BPT tests from test plan into an excel report along with the test steps?

Marked as spam
Posted by (Questions: 98, Answers: 0)
Asked on August 15, 2014 3:06 pm
316 views
Answers (2)
0
Private answer

This can only be done on manual BPT steps and it is possible to bring the tests into excel along with their steps.

You could export the BPT tests into excel using this query in an excel report from the dashboard, see what I have below:

NOTE: You will need to change the ''Folder Name'' value in this line AND AL_DESCRIPTION Like '%Folder Name%' to the value of the name of the folder in the test plan that contains the tests (This needs to be the folder directly above the tests that you are wanting to export, the direct parent folder of the tests)

SELECT TEST.TS_TEST_ID as ''Test ID'', /*Test.Test ID*/
TEST.TS_NAME as ''Test Name'', /*Test.Test Name*/
TEST.TS_SUBJECT as ''Subject'',
TEST.TS_DESCRIPTION as ''Test Desc.'', /*Test.Description*/
TEST.TS_DEV_COMMENTS as ''Comments'',
TEST.TS_TYPE as ''Test Type'', /*Test.Type*/
COMPONENT_STEP.CS_STEP_NAME as ''Step Name'',
COMPONENT_STEP.CS_DESCRIPTION as ''Step Description'',
COMPONENT_STEP.CS_EXPECTED as ''Expected Results''

FROM ALL_LISTS
Left Join TEST on ALL_LISTS.AL_ITEM_ID=TEST.TS_SUBJECT
Left join BPTEST_TO_COMPONENTS on TEST.TS_TEST_ID=BPTEST_TO_COMPONENTS.BC_PARENT_ID
Left join COMPONENT_STEP on BPTEST_TO_COMPONENTS.BC_CO_ID=COMPONENT_STEP.CS_COMPONENT_ID

where
BC_PARENT_ID = TS_TEST_ID
AND AL_ITEM_ID = TS_SUBJECT
AND TS_SUBJECT = ALL_LISTS.AL_ITEM_ID
ORDER BY TS_TEST_ID

NOTE: This will not work on flows only on straight BPT tests, you would need to re write the code to work with flows

Marked as spam
Posted by (Questions: 0, Answers: 364)
Answered on August 15, 2014 3:10 pm
0
Private answer

The way that I have above is out of date, it will not work with ALM versions beyond version 11, for ALM version 11.52 or higher I would recommend using the business views in ALM to do the same thing. I am putting an example DQL query below that you could use to generate this using business views and the business views add in for excel.

NOTE: As before this will not pull back any steps from a BPT test if they are nested in a ''FLOW'' additionally if most of your steps are in a ''FLOW'' test type you could replace the line Where test.subtype_id = 'BUSINESS-PROCESS' and set it equal to 'FLOW' instead of 'BUSINESS_PROCESS' you will need to edit this query to fit your needs and version of ALM

Select test.name,
component_step.description,
component_step.expected,
component_step.name As name1,
component_step.step_order,
test.id,
test.subtype_id
From bp_component
Inner Join component On component.id = bp_component.co_id
Inner Join facet On component.id = facet.parent_id
Inner Join component_step On facet.id = component_step.parent_id
Inner Join test On test.id = bp_component.parent_id And
bp_component.parent_type = 'TEST'
Where test.subtype_id = 'BUSINESS-PROCESS'

Marked as spam
Posted by (Questions: 0, Answers: 364)
Answered on September 22, 2017 10:42 am
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top