Custom Property Position

First, the custom properties (CUST_01, CUST_02, etc.) are associated according to the position they are configured for every artifact. For example, we can see below that a text field called “Additional Data” in the first position and a list field called “Step Type” in the second position. This information helps in picking the correct custom property in the ESQL query developed.

 

Custom Reporting for Test Steps with Custom Properties

As part of developing your custom report, add a custom section, give a name to this section, and write the following query. Preview the query results. If the result set is fine, then create the default template for this query and save the custom section added.

select R.TEST_CASE_ID, R.TEST_CASE_NAME, R.TEST_STEP_ID, R.DESCRIPTION, R.EXPECTED_RESULT, R.SAMPLE_DATA, R.CUST_01, R.CUST_02, C.NAME AS CUST_02_NAME, R.EXECUTION_STATUS_NAME AS TEST_STEP_STATUS from SpiraTestEntities.R_TestSteps as R
left join SpiraTestEntities.R_CustomListValues as C on cast (R.CUST_02 as decimal) = C.CUSTOM_PROPERTY_VALUE_ID and R.PROJECT_ID = C.PROJECT_ID
where R.PROJECT_ID = ${ProjectId}

This query brings the custom properties, CUST_01 and CUST_02, based on the positions they were added to the TEST_STEP artifact in the picture shown before. Since CUST_02 is a custom list property, the actual list value can be mapped to the custom list value data as shown in the query.

Result

TEST_CASE_ID

TEST_CASE_NAME

TEST_STEP_ID

DESCRIPTION

EXPECTED_RESULT

SAMPLE_DATA

CUST_01

CUST_02

CUST_02_NAME

TEST_STEP_STATUS

2

Ability to create new book

1

Call

 

 

 

 

 

N/A

2

Ability to create new book

2

User clicks link to create book

User taken to first screen in wizard

 

No more data

0000000019

Verification Point

Passed

2

Ability to create new book

3

User enters books name and author, then clicks Next

User taken to next screen in wizard

Macbeth, William Shakespeare

Some Data

0000000018

Scenario Step

Passed

2

Ability to create new book

4

User chooses book genre and sub-genre from list

User sees screen displaying all entered information

Play, Tragedy

No more data

0000000019

Verification Point

Passed