Timestamps for test start / completion

Since ~9th Oct responses to calls to /testStatus.php? seem to be returning less detail than before, and specifically (ie the bit that’s breaking my code) are no longer returning a value for startTime. Is this intentional?

For eg:

An older test (from August): https://www.webpagetest.org/testStatus.php?test=200820_D0_1dca59727e1865d521dd679bcb610ca5&f=json

{
  "statusCode": 200,
  "statusText": "Test Complete",
  "data": {
    "statusCode": 200,
    "statusText": "Test Complete",
    "id": "200820_D0_1dca59727e1865d521dd679bcb610ca5",
    "testInfo": { ... },
    "testId": "200820_D0_1dca59727e1865d521dd679bcb610ca5",
    "runs": 3,
    "fvonly": 1,
    "remote": false,
    "testsExpected": 3,
    "location": "London_EC2",
    "startTime": "08/20/20 21:05:03",
    "elapsed": 51,
    "completeTime": "08/20/20 21:05:54",
    "testsCompleted": 3,
    "fvRunsCompleted": 0,
    "rvRunsCompleted": 0
  }
}

vs a more recent test: https://www.webpagetest.org/testStatus.php?test=201018_Di3P_965e5ef3280318bf6d704b4630e8d178&f=json

{
  "statusCode": 200,
  "statusText": "Test Complete",
  "data": {
    "statusCode": 200,
    "statusText": "Test Complete",
    "id": "201018_Di3P_965e5ef3280318bf6d704b4630e8d178",
    "completeTime": 1603186019
  }
}

In addition the timestamp currently being returned for completeTime in the 2nd example above also now seems to be a different value from the timestamp of data.completed in the full JSON response, whereas for the older test these values are equivalent.

Any thoughts?

Thanks for a very helpful tool btw!

Sorry about the delay. It should be better now. I added a fast-path for test status on the server that got rid of some race conditions but the responses weren’t what they were before. I just fixed the timestamps and added a bunch of the missing fields. The different “completed” test counts aren’t reported but hopefully that’s not an issue.

Fantastic, thanks Patrick - really appreciate you taking a look at this. Everything I was using is now back where it was (the “completed” count wasn’t something I was looking at personally). Thanks again!

Hi Patrick. Since 22 Jan I’m seeing something similar to this from a few months ago, where the content of the status response has changed. It seems a value is no longer being returned for startTime (also elapsed, but I’m not using that field personally).

Eg: https://www.webpagetest.org/testStatus.php?test=210127_DiWE_5a4c310d55c84502bca54008747acad5

{
  "statusCode": 200,
  "statusText": "Test Complete",
  "data": {
    "statusCode": 200,
    "statusText": "Test Complete",
    "id": "210127_DiWE_5a4c310d55c84502bca54008747acad5",
    "completeTime": "01/28/21 10:20:13",
    "testInfo": {},
    "remote": false,
    "testsExpected": 3,
    "runs": 3,
    "fvonly": 1,
    "location": "London_EC2"
  }
}

If this isn’t intentional, any chance this field could be restored at some point please? Alternatively, please let me know if we should expect further changes to this object going forwards - in which case I suppose I’ll just need to update at our end so we’re not expecting the shape to stay consistent.

Thanks in advance!

The shape of any of the api’s won’t necessarily remain consistent. The startTime should be there when the test is progressing (as well as elapsed) but once it is completed there is only the completeTime.

started/elapsed are useful for knowing how long it has been since the test has started and has been waiting for a result but once a result is available it is no longer available.

Thanks for clearing that up Patrick, appreciate it. I’ve updated at our end to remove the dependency.