Knowledge Base Article

Home Page > Knowledge Base > Spira Platform

Home Page > Knowledge Base > Spira Platform > SpiraTeam

Home Page > Knowledge Base > Spira Platform > SpiraTest

Article Creating a Report of Test Cases and Test Runs in Hierarhical Order

by Adam S on Monday, July 27, 2015

Sometimes you want to get a report of all the tests executed along with their test cases with the tests organized by the order in which they are displayed in SpiraTest. The custom reporting system in Spira allows you to create a custom report of all the test runs and test run steps sorted by test case order. This articles describes the process for creating such a report.

The steps are:

  1. Create a new custom report in Administration. Make sure Excel is listed as one of the output formats
  2. Add a new custom section to the report
  3. In this custom section, add the following ESQL query:

    select TC.TEST_CASE_ID, TC.NAME, TR.EXECUTION_STATUS_NAME as RUN_STATUS, TR.END_DATE as EXECUTION_DATE, TS.POSITION, TS.DESCRIPTION as STEP_DESCRIPTION, TS.EXPECTED_RESULT, TS.EXECUTION_STATUS_NAME as STEP_STATUS, TS.ACTUAL_RESULT, TC.INDENT_LEVEL + '-' + cast (TR.TEST_RUN_ID as string) + '-' + cast (TS.POSITION as string) as location
    from SpiraTestEntities.R_TestRuns as TR inner join SpiraTestEntities.R_TestCases as TC on TR.TEST_CASE_ID = TR.TEST_CASE_ID
    inner join SpiraTestEntities.R_TestRunSteps as TS on TS.TEST_RUN_ID = TR.TEST_RUN_ID where TC.PROJECT_ID = ${ProjectId}
    order by location


  4. Click on the button to 'Create Default Template'. Now save your custom report.
  5. Go to Reports
  6. Choose your new report
  7. Choose MS-Excel as the output format
  8. Click on the button to generate the report
  9. You now have an Excel sheet with the required list of test runs and test steps:
TEST_CASE_IDNAMERUN_STATUSEXECUTION_DATEPOSITIONSTEP_DESCRIPTIONEXPECTED_RESULTSTEP_STATUSACTUAL_RESULTlocation
1Functional TestsFailed2003-12-01T10:45:201User logs in to applicationUser taken to main menu screenPassedAAA-1-1
1Functional TestsFailed2003-12-01T10:45:202User clicks link to create bookUser taken to first screen in wizardPassedAAA-1-2
1Functional TestsFailed2003-12-01T10:45:203User enters books name and author, then clicks NextUser taken to next screen in wizardFailedAn error page is displayed - "No such object or with block variable at line 473"AAA-1-3
1Functional TestsCaution2003-12-01T11:50:551User logs in to applicationUser taken to main menu screenPassedAAA-10-1
1Functional TestsCaution2003-12-01T11:50:552User clicks link to view existing booksList of active books in system displayedPassedAAA-10-2
1Functional TestsCaution2003-12-01T11:50:553User clicks on link to edit a specific bookUser taken to edit book details screenCautionScreen loads correctly, but is very slowAAA-10-3
1Functional TestsBlocked2003-12-01T12:35:551User logs in to applicationUser taken to main menu screenPassedAAA-11-1
1Functional TestsBlocked2003-12-01T12:35:552User clicks link to view existing authorsList of active authors in system displayedPassedAAA-11-2
1Functional TestsBlocked2003-12-01T12:35:553User clicks on link to edit a specific authorUser taken to edit author details screenBlockedCannot get to screen as the create authors failed, so no authors in listAAA-11-3
Attachments
Article Info
Last Updated: 7/27/2015
Article ID: KB110
# Views: 1239
Powered by KronoDesk v1.1.0.15 | © Copyright Inflectra Corporation 2011-2016 | Licensed to Inflectra Corporation.