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:

  • 1 second = 1,000,000,000 nanoseconds (1e9)

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

  • 12 seconds = 12 * 1,000,000,000 = 12,000,000,000 nanoseconds

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

  • Duration in seconds: 5s
  • Duration in nanoseconds: 5,000,000,000 ns

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.