Skip to content

Problems with webpagetest batch method  #143

Open

Description

@cweekly

Given a private instance MY-WPT-SERVER with apiKey MY-API-KEY and a plaintext batch-tests.txt file containing:

test https://example.com -k MY-API-KEY -l us-east-1-linux:Chrome.FIOS -L MY-TEST-LABEL-DESKTOP -r 3 -v 
test https://example.com -k MY-API-KEY -l us-east-1-linux:Chrome.FIOS -L MY-TEST-LABEL-MOBILE -r 3 -v -W --device Nexus7

I'd expect running:
webpagetest batch batch-tests.txt -s MY-WPT-SERVER
to return a JSON array with 2 objects, e.g.

[
  {
    "statusCode": 200,
    "statusText": "Ok",
    "data": {
      "testId": "210628_T8_1",
      "jsonUrl": "MY-WPT-SERVER/jsonResult.php?test=210628_T8_1",
      "xmlUrl": "MY-WPT-SERVER/xmlResult/210628_T8_1/",
      "userUrl": "MY-WPT-SERVER/result/210628_T8_1/",
      "summaryCSV": "MY-WPT-SERVER/result/210628_T8_1/page_data.csv",
      "detailCSV": "MY-WPT-SERVER/result/210628_T8_1/requests.csv"
    }
  },
  {
    "statusCode": 200,
    "statusText": "Ok",
    "data": {
      "testId": "210628_YQ_2",
      "jsonUrl": "MY-WPT-SERVER/jsonResult.php?test=210628_YQ_2",
      "xmlUrl": "MY-WPT-SERVER/xmlResult/210628_YQ_2/",
      "userUrl": "MY-WPT-SERVER/result/210628_YQ_2/",
      "summaryCSV": "MY-WPT-SERVER/result/210628_YQ_2/page_data.csv",
      "detailCSV": "MY-WPT-SERVER/result/210628_YQ_2/requests.csv"
    }
  }
]

but what I get instead is a 200 OK for the 1st test, and a 400 - Invalid location... for the 2nd test
-- even though they use the same location.

[
  {
    "statusCode": 200,
    "statusText": "Ok",
    "data": {
      "testId": "210628_T8_1",
      "jsonUrl": "MY-WPT-SERVER/jsonResult.php?test=210628_T8_1",
      "xmlUrl": "MY-WPT-SERVER/xmlResult/210628_T8_1/",
      "userUrl": "MY-WPT-SERVER/result/210628_T8_1/",
      "summaryCSV": "MY-WPT-SERVER/result/210628_T8_1/page_data.csv",
      "detailCSV": "MY-WPT-SERVER/result/210628_T8_1/requests.csv"
    }
  },
  {
    "statusCode": 400,
    "statusText": "Invalid Location, please try submitting your test request again."
  }
]

Reversing the order of the 2 tests in the .txt file results in the same behavior (ie, whichever is listed 1st works, whichever is listed 2nd fails).

So I'm thinking this has to be a bug in the wrapper.

Thanks in advance for taking a look -- and more generally for creating this awesome, useful tool. :)

Activity

  1. cweekly commented on Jul 2, 2021

    @cweekly
    Author

    @tkadlec , @pmeenan , @marcelduran, or anyone else, I'd be really grateful for a response.
    In any case have a great weekend!

  2. tkadlec commented on Jul 2, 2021

    @tkadlec
    Contributor

    @cweekly Do you get the same error if you run against the WPT public instance? I'm having no luck reproducing the issue against the public instance so far and trying to pinpoint if it's the private instance that seems to be tripping it up or something else?

  3. cweekly commented on Jul 3, 2021

    @cweekly
    Author

    I don't have a public instance API key :/

  4. cweekly commented on Jul 3, 2021

    @cweekly
    Author

    I'm guessing the problem relates to the authZ step on first-ever test run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions