Execution Time Mapping Reference

This reference describes the mapping expression used to populate the execution time of imported test case and test step runs. Configure this mapping in the automation template to associate an XML attribute or element with the QMetry Execution Time field.

This section maps the start time, end time, and elapsed time for test case and test step runs. It also sets the date format and the duration unit that QMetry uses to interpret the time values. The following table describes each field.

Table 54. Map Execution Time Fields

QMetryField

Example Expression

Description

Test Case Run Start Execution Time

${testsuites.testsuite.testcase:starttime}

Maps the test case start time.

Test Case Run End Execution Time

${testsuites.testsuite.testcase:endtime}

Maps the test case end time.

Test Case Run Execution Time

${testsuites.testsuite.testcase:elapsedtime}

Maps the test step start time.

Test Step Run Start Execution Time

${testsuites.testsuite.testcase.step:starttime}

Maps the test step start time.

Test Step Run End Execution Time

${testsuites.testsuite.testcase.step:endtime}

Maps the test step end time.

Test Step Run Execution Time

${testsuites.testsuite.testcase.step:elapsedtime}

Maps the test step elapsed time.

Date Format

yyyy-MM-dd'T'HH:mm:ss'Z' (Default)

Duration values is always displayed in milliseconds, regardless of the unit you selected in the template.

If your XML file uses a different format, update the Date Format in the JSON template before importing the results.

Duration Unit

Nanoseconds, Milliseconds, Seconds, Minutes, Hours

Select the unit that matches the values in your XML file.

The Duration Unit specifies the unit used to interpret execution time values.



Date Format and Duration Unit

QMetry maps the date format and the duration unit in the field mapping and includes them in the JSON. You can change either value in the JSON.

By default, the date format is yyyy-MM-dd'T'HH:mm:ss'Z' and the duration unit is seconds. The allowed duration units are nanoseconds, milliseconds, seconds, minutes, and hours.

Publication date: