Closed saurabh-openstack closed 3 years ago
Hi @saurabh-openstack thanks for reporting, would you mind open PR with a fix?
@figo Thanks a lot. I was just about to fix this but observed it is already fixed. [FixLink]. So marking this issue as fixed.
"duration" in "_class": "hudson.tasks.junit.TestResult" is coming 0. The type incorrectly configured to int64 while from Jenkins it is float. -- Jenkins API output {Jenkins URL}{JOB}testReport/api/json "_class": "hudson.tasks.junit.TestResult", "testActions": [], "duration": 343.131, <--- float "empty": false, "failCount": 0, "passCount": 394, "skipCount": 0,
--gojenkins sdk func (b Build) GetResultSet() (TestResult, error)
type TestResult struct { Duration int64
json:"duration"
. <---- int64 Empty booljson:"empty"
FailCount int64json:"failCount"
PassCount int64json:"passCount"
SkipCount int64json:"skipCount"
Due to mismatch of type the duration returned by GetResultSet() is coming to 0.