Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.
 

Elapsed time for test "0.000s" reported by TestRail causing error

Some of my Postman/Newman tests have an elapsed time of 0.000s which causes TestRail to throw the error: “Field :elapsed is not in a valid time span format.”. It is particularly prevalent on cases that test invalid requests to an endpoint i.e tests that tend to run quickly. This is using Newman to run the tests during an Octopus deployment of the service.

Is there some minimum elapsed time that TestRail can accept and if its any faster than that the elapsed time will be rounded down? Even if this were the case it seems unlikely that the test would run faster than 0.001 seconds.

The tests run fine through Postman on my machine.

EDIT: I should probably also mention that when this happens, the test appears as ‘Untested’ in the test run.
EDIT2: In one of the test suites that this issue occurs, the error is thrown for the only case that takes less that 100ms to run (13ms) when I run it through the Postman desktop client.

Hi Alex,

This is a known issue with the current TestRail versions where sending a elapsed time of less than 1 second would cause issues. The workaround at this time is to either remove the elapsed time if less than 1 second or simply round your timestamp up to the nearest second.

That being said, we are looking into changing the Elapsed field to either accept 0s or milliseconds. We definitely understand that this would be useful to have and we want to look into this. I appreciate the additional feedback and have added your vote to this feature entry.

Hi vtran, i work with Alex, the submitter of this ticket. Is there any news on a fix / enhancement for this? Would be nice if Elapsed could handle 0.000s! :upside_down_face:

Many thanks, Simon