Xray Cloud uses nanoseconds as the unit of time for the duration field in test execution data. If you input the duration in a different time unit (e.g., seconds), it may cause the value to be misinterpreted or displayed incorrectly in the UI.

To properly import a test execution with the correct duration, follow this time unit conversion:

For example, if the test execution duration is 12 seconds, the equivalent value in nanoseconds would be:

Let’s say you want to import a test execution with a duration of 5 seconds. Here’s the correct format:

In the JSON file for the test execution, you should input:

{
  "duration": 5000000000
}


If you input an incorrect duration, such as a value too small or in an unsupported format, Xray may display 0 in the UI.