Why is PublishTestResults@2 aborting with "value results in an un-representable DateTime" warning?

102 views Asked by At

I have a test-list which is executed by TOSCA and produces a JUnit compatible test-result. I then use PublishTestResults@2 to import the test-results into DevOps. However I get this error:

Failed to parse result files:  The added or subtracted value results in an un-representable DateTime.

Error Message

It's marked a warning but no test-results are imported. Considering that the test set runs for 2 hour this is quite disappointing.

Does anybody know why this error happen and what can be done about it?

1

There are 1 answers

2
Kevin Lu-MSFT On

Failed to parse result files: The added or subtracted value results in an un-representable DateTime.

The cause of this issue is usually that the time field value in the test result file is too large.

For example:

<testcase name="Global Search" time="xxxxxxxxxxxx.xxx"

The counting unit of time is seconds. If its value is too large (exceeds the current time after conversion). It will show the error message.

For a workaround, you can manually modify the time value to a small number.

For example:

<testcase name="Global Search" time="1"

Then you can use the Publish Test Result task to publish the test result again.

On the other hand, you need to check whether there are settings that will cause huge test time values to be generated when executing tests with TOSCA.