Creating the Custom Report
The following Entity SQL (ESQL) should be used in the Spira custom report writer:
select
'RQ' + cast (RQ.REQUIREMENT_ID as String) as REQUIREMENT_ID,
RQ.NAME as REQUIREMENT_NAME,
'TC' + cast (TC.TEST_CASE_ID as String) as TEST_CASE_ID,
TC.NAME as TEST_CASE_NAME,
'TR' + cast (TR.TEST_RUN_ID as String) as TEST_RUN_ID,
TR.EXECUTION_STATUS_NAME,
'IN' + cast (TRI.INCIDENT_ID as String) as INCIDENT_ID
from SpiraTestEntities.R_Requirements as RQ
join SpiraTestEntities.R_RequirementTestCases as RT on RQ.REQUIREMENT_ID = RT.REQUIREMENT_ID
join SpiraTestEntities.R_TestCases as TC on RT.TEST_CASE_ID = TC.TEST_CASE_ID
join SpiraTestEntities.R_TestRuns as TR on TR.TEST_CASE_ID = TC.TEST_CASE_ID
join SpiraTestEntities.R_TestRunIncidents as TRI on TR.TEST_RUN_ID = TRI.TEST_RUN_ID
where RQ.PROJECT_ID = ${ProjectId}
That will generate the following output:
REQUIREMENT_ID | REQUIREMENT_NAME | TEST_CASE_ID | TEST_CASE_NAME | TEST_RUN_ID | EXECUTION_STATUS_NAME | INCIDENT_ID |
---|
RQ4 | Ability to add new books to the system | TC2 | Ability to create new book | TR38 | Not Run | IN21 |
RQ4 | Ability to add new books to the system | TC2 | Ability to create new book | TR38 | Not Run | IN29 |
RQ4 | Ability to add new books to the system | TC2 | Ability to create new book | TR38 | Not Run | IN32 |
RQ4 | Ability to add new books to the system | TC2 | Ability to create new book | TR1 | Failed | IN7 |
RQ4 | Ability to add new books to the system | TC2 | Ability to create new book | TR61 | Failed | IN66 |
RQ4 | Ability to add new books to the system | TC2 | Ability to create new book | TR77 | Failed | IN67 |
RQ4 | Ability to add new books to the system | TC2 | Ability to create new book | TR276 | Failed | IN77 |
RQ4 | Ability to add new books to the system | TC44 | Sample Test for ZF | TR90 | Failed | IN70 |
RQ7 | Ability to associate books with different subjects | TC4 | Ability to create new author | TR4 | Failed | IN2 |
RQ7 | Ability to associate books with different subjects | TC4 | Ability to create new author | TR28 | Failed | IN62 |