The build in reports in SpiraTest / SpiraTeam are primarily geared to display the # passes, # fails, etc. from the perspective of test cases. It assumes that even a single fail / block / caution of any of the steps constitutes a failure of the entire test case. However some of our customers were looking for ways to display the execution information at the test step level. This articles describes how to create a simple custom report to display this.
The desired report we'd like to have looks something like:

Inside SpiraTeam or SpiraTest, go to Administration > System > Edit Reports.
Now do the following:
- Create a new custom report
- Give it a name and description
- You can leave the header and footer blank for now
- Enable the various formats that you want to be made available (typically include HTML and Excel for this kind of tabular report)
- Set the category as "Test Case Reports"
- Add a custom section. Give the section a name (the description, header, footer can be left blank).
- Paste the ESQL code displayed below into the Query field
- Click 'Preview Results' to display the results of the query
- Click 'Create Default Template' to generate a simple tabular grid to display the data.
- Now save the section
- Now save the report
The Query to Use
The following Entity SQL (ESQL) should be used:
select TC.TEST_CASE_ID, TC.NAME,
SUM(CASE WHEN TS.EXECUTION_STATUS_ID = 1 THEN 1 ELSE 0 END) as NUMBER_FAILED,
SUM(CASE WHEN TS.EXECUTION_STATUS_ID = 2 THEN 1 ELSE 0 END) as NUMBER_PASSED,
SUM(CASE WHEN TS.EXECUTION_STATUS_ID = 5 THEN 1 ELSE 0 END) as NUMBER_BLOCKED,
SUM(CASE WHEN TS.EXECUTION_STATUS_ID = 6 THEN 1 ELSE 0 END) as NUMBER_CAUTION,
SUM(CASE WHEN TS.EXECUTION_STATUS_ID = 3 THEN 1 ELSE 0 END) as NUMBER_NOT_RUN
from SpiraTestEntities.R_TestCases as TC
inner join SpiraTestEntities.R_TestSteps as TS
on TC.TEST_CASE_ID = TS.TEST_CASE_ID
where TC.PROJECT_ID = ${ProjectId}
group by TC.TEST_CASE_ID, TC.NAME
The Finished Report
The following report will be generated:
TEST_CASE_ID | NAME | NUMBER_FAILED | NUMBER_PASSED | NUMBER_BLOCKED | NUMBER_CAUTION | NUMBER_NOT_RUN |
---|
2 | Ability to create new book | 1 | 0 | 0 | 0 | 3 |
3 | Ability to edit existing book | 0 | 1 | 0 | 1 | 0 |
4 | Ability to create new author | 1 | 1 | 0 | 0 | 2 |
5 | Ability to edit existing author | 0 | 1 | 1 | 0 | 0 |
8 | Book management | 0 | 0 | 0 | 0 | 0 |
9 | Author management | 0 | 0 | 0 | 0 | 0 |
12 | Person loses book and needs to report loss | 0 | 0 | 0 | 0 | 3 |
16 | Open Up Web Browser | 0 | 1 | 0 | 0 | 0 |
17 | Login to Application | 0 | 2 | 0 | 0 | 0 |
48 | Tests the archiving of data in the system | 1 | 0 | 0 | 0 | 0 |
Selected files will be attached to any email sent on saving ticket.
file selected
files selected
()
Delete Selected
Uploading
…
There was an error.
Try again?
Save to upload the selected file(s)
Spira Helps You Deliver Quality Software, Faster and With Lower Risk

And if you have any questions, please email or call us at +1 (202) 558-6885