Marcel was telling me about some weird hack he had to allow tests to be cancelled via his wrapper.
Suspect he really needs a cancel endpoint in the API that takes the test id and api key
Marcel was telling me about some weird hack he had to allow tests to be cancelled via his wrapper.
Suspect he really needs a cancel endpoint in the API that takes the test id and api key
That was a documentation (lack of) problem. I just documented the cancellation entrypoint: https://sites.google.com/a/webpagetest.org/docs/advanced-features/webpagetest-restful-apis#TOC-Cancelling-Tests
Right now it spits back HTML but it is trivial to also add JSON support.
Cool, Thanks
I’m trying to implement a call to the canceltest API, and I always seem to get the following message:
“
The test I’m trying to cancel right now says “Testing: Waiting behind 22 other tests.”
I guess my question is: Why won’t it let me cancel the test, even though that test isn’t running right now, it’s just sitting in a queue?
BTW, I think it’s great you added this feature, I can’t wait to add this to eliminate tests that are “mistakes”
I was speaking to a developer who’s been using the API for awhile, and he mentioned once it’s picked up, even if it’s sitting in a queue, it can’t be cancelled. Is it possible to get the agent to poll for cancelled tests before running the test, or remove it from the queue (maybe by polling or removing it from the list)?
I just tested to be sure and the canceling looks to be working fine. Are you trying to cancel a test that was run through a relay? If so that isn’t currently supported. Tests managed by the local server should cancel fine as long as they are still in the queue (I just tested it on the public instance to be sure: http://www.webpagetest.org/result/130719_R7_5c6ac75ee4f073343b0021703e5fa095/ )