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 Sets, Test Cases and Test Steps in Hierarchical Order

by Adam S on Monday, July 4, 2016

Sometimes you want to get a report of all the test sets with their included test cases along with their test steps 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 cases (by test set) and test steps sorted by test case order. This articles describes the process for creating such a report.

(There are different versions of the ESQL query to use based on the version of Spira that you are using)

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:

    (Spira v4.x)

    select TX.NAME AS TEST_SET_NAME, TC.NAME AS TEST_CASE_NAME, TC.DESCRIPTION AS TEST_CASE_DESC, TS.POSITION AS TEST_STEP_NUMBER, TS.DESCRIPTION as STEP_DESCRIPTION, TS.EXPECTED_RESULT, TX.INDENT_LEVEL + '-' + TC.INDENT_LEVEL + '-' + cast (TS.POSITION as string) as location
    from SpiraTestEntities.R_TestSets as TX  inner join SpiraTestEntities.R_TestSetTestCases as TT on TX.TEST_SET_ID = TT.TEST_SET_ID inner join SpiraTestEntities.R_TestCases as TC on TT.TEST_CASE_ID = TC.TEST_CASE_ID
    inner join SpiraTestEntities.R_TestSteps as TS on TS.TEST_CASE_ID = TC.TEST_CASE_ID where TC.PROJECT_ID = ${ProjectId}
    order by location 


    (Spira v5.0+)

    select TX.NAME AS TEST_SET_NAME, TC.NAME AS TEST_CASE_NAME, TC.DESCRIPTION AS TEST_CASE_DESC, TS.POSITION AS TEST_STEP_NUMBER, TS.DESCRIPTION as STEP_DESCRIPTION, TS.EXPECTED_RESULT, TX.NAME + '-' + TC.NAME + '-' + cast (TS.POSITION as string) as location
    from SpiraTestEntities.R_TestSets as TX  inner join SpiraTestEntities.R_TestSetTestCases as TT on TX.TEST_SET_ID = TT.TEST_SET_ID inner join SpiraTestEntities.R_TestCases as TC on TT.TEST_CASE_ID = TC.TEST_CASE_ID
    inner join SpiraTestEntities.R_TestSteps as TS on TS.TEST_CASE_ID = TC.TEST_CASE_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 sets, test cases, and test steps:
TEST_SET_NAMETEST_CASE_NAMETEST_CASE_DESCTEST_STEP_NUMBERSTEP_DESCRIPTIONEXPECTED_RESULTlocation
Testing Cycle for Release 1.0Ability to create new bookTests that the user can create a new book in the system1Call
AAAAAA-AAAAAA-1
Testing Cycle for Release 1.0Ability to create new bookTests that the user can create a new book in the system2Call
AAAAAA-AAAAAA-2
Testing Cycle for Release 1.0Ability to create new bookTests that the user can create a new book in the system3Call
AAAAAA-AAAAAA-3
Testing Cycle for Release 1.0Ability to create new bookTests that the user can create a new book in the system4User clicks link to create bookUser taken to first screen in wizardAAAAAA-AAAAAA-4
Testing Cycle for Release 1.0Ability to create new bookTests that the user can create a new book in the system5User enters books name and author, then clicks NextUser taken to next screen in wizardAAAAAA-AAAAAA-5
Testing Cycle for Release 1.0Ability to create new bookTests that the user can create a new book in the system6User chooses book's genre and sub-genre from listUser sees screen displaying all entered informationAAAAAA-AAAAAA-6
Testing Cycle for Release 1.0Ability to create new bookTests that the user can create a new book in the system7User clicks submit buttonConfirmation screen is displayedAAAAAA-AAAAAA-7
Testing Cycle for Release 1.0Ability to edit existing bookTests that the user can login, view the details of a book, and then if he/she desires, make the necessary changes1Call
AAAAAA-AAAAAB-1
Testing Cycle for Release 1.0Ability to edit existing bookTests that the user can login, view the details of a book, and then if he/she desires, make the necessary changes2User clicks link to view existing booksList of active books in system displayedAAAAAA-AAAAAB-2
Testing Cycle for Release 1.0Ability to edit existing bookTests that the user can login, view the details of a book, and then if he/she desires, make the necessary changes3User clicks on link to edit a specific bookUser taken to edit book details screenAAAAAA-AAAAAB-3
Attachments
Article Info
Last Updated: 7/4/2016
Article ID: KB188
# Views: 716
Powered by KronoDesk v1.1.0.15 | © Copyright Inflectra Corporation 2011-2016 | Licensed to Inflectra Corporation.