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

Elapsed field problem when using api


#1

Hi,

(I have also submitted this as a support request, but thought, maybe the community knows this or is also interessted in)

I try to post automatically results to TestRails via the api.

This is my data for the post

{  
   "results":[  
      {  
         "elapsed":"0.161s",
         "status_id":1,
         "case_id":"1",
         "comment":"Test executed automatically uploaded by Gauge at 27.06.2018 09:43:26. Testcase: 'Vowel counts in single word'"
      },
      {  
         "elapsed":"3.431s",
         "status_id":1,
         "case_id":"2",
         "comment":"Test executed automatically uploaded by Gauge at 27.06.2018 09:43:26. Testcase: 'Vowel counts in multiple word'"
      }
   ]
}

this returns in a

Exception in thread “main” com.gurock.testrail.APIException: TestRail API returned HTTP 400(“Field :results.elapsed is not in a valid time span format.”)

but, when I enter the values 0.161s and 3.431s in the ui in TestRail, they are accepted and shown correctly.

How can I post the exact same values via the api ?

I use the cloud solution and post the results to .sendPost(“add_results_for_cases/”

Thank you very much for help
Andreas


TestRail 5.5.1 Released
#2

Hi Bygones - this is a bug. We expect to have a fix for it very shortly (within the next few days).

Cheers,
Simon


#3

great :slight_smile:
thanks for the fast response and the fast fix


#4

This should be fixed per release notes here: TestRail 5.5.1 Released

Cheers,
Simon