1

您好有帮助的 HP ALM 专家,

我目前使用以下查询:

SELECT
CF_ITEM_NAME as "Test Set Folder Name",
CY_CYCLE as "Test Set Name",
TS_NAME as "Test Case Name",
RN_STATUS as "Test Case Status",
ST_STEP_NAME as "Test Step Name",
ST_STATUS as "Test Step Status",
ST_DESCRIPTION as "Test Step Description",
ST_EXPECTED as "Test Step Expected Result",
ST_ACTUAL as "Test Step Actual Result",
RN_HOST as "Test Host Name",
RN_TESTER_NAME as "Tester Name",
ST_EXECUTION_DATE as "Test Step Execution Date",
ST_EXECUTION_TIME as "Test Step Execution Time"
FROM STEP a, TEST b, CYCLE c,RUN d,CYCL_FOLD e
where
a.ST_TEST_ID=b.TS_TEST_ID and
c.CY_CYCLE_ID=d.RN_CYCLE_ID and
d.RN_TEST_ID=b.TS_TEST_ID and
e.CF_ITEM_ID=c.CY_FOLDER_ID and
RN_HOST IS NOT NULL and
RN_TESTER_NAME IS NOT NULL and
CF_ITEM_PATH like 'AAAAAG%'
//CF_ITEM_ID like '267%' //Comment this or CF_ITEM_PATH and use the other
ORDER BY TS_NAME,RN_RUN_ID,ST_RUN_ID,ST_EXECUTION_DATE,ST_EXECUTION_TIME ASC

不幸的是,这个查询的问题是它需要我运行一个单独的查询来捕获我的多项目 ALM 项目中的所有 CF_ITEM_PATH 值。然后我必须将该字符串插入“CF_ITEM_PATH like”字段并获取一个列表。

是否可以创建并运行至少返回以下数据的查询?TS_NAME、ST_STEP_NAME、ST_STATUS_ST_DESCRIPTION、ST_EXPECTED、ST_ACTUAL、ST_EXECUTION_DATE

我希望查询为测试计划中最近/最后执行的测试集提取此数据。这可能吗?怎么做到呢?如果无法完成,我可以更改上述查询以使用测试集的运行 ID 值而不是 CF_ITEM_PATH 来获取我想要的信息吗?如何?

请注意,我对 SQL 没有经验,需要详细说明。

谢谢您的帮助!

4

1 回答 1

0
SELECT C1.CY_CYCLE_ID , C1.CY_CYCLE AS TEST_SET_NAME , TC1.TC_TEST_ID , T.TS_NAME
, R1.RN_STATUS , R1.RN_RUN_ID , R1.RN_RUN_NAME, R1.RN_TESTER_NAME ,S1.ST_STEP_NAME , S1.ST_DESCRIPTION , S1.ST_EXPECTED , S1.ST_ACTUAL
FROM CYCL_FOLD CF1 , CYCL_FOLD  CF2 , CYCLE C1 , TESTCYCL TC1 , TEST T , RUN R1 , STEP S1
WHERE
CF1.CF_ITEM_NAME = 'Cycle One' AND
CF2.CF_ITEM_PATH LIKE CONCAT(CF1.CF_ITEM_PATH,'%') AND
C1.CY_FOLDER_ID = CF2.CF_ITEM_ID AND
TC1.TC_CYCLE_ID = C1.CY_CYCLE_ID
AND
T.TS_TEST_ID = TC1.TC_TEST_ID
AND
R1.RN_TESTCYCL_ID = TC1.TC_TESTCYCL_ID
AND
 R1.RN_TEST_ID = TC1.TC_TEST_ID
AND
 S1.ST_RUN_ID = R1.RN_RUN_ID
于 2017-04-27T02:48:09.917 回答