Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with webpagetest batch method #143

Open
cweekly opened this issue Jun 28, 2021 · 4 comments
Open

Problems with webpagetest batch method #143

cweekly opened this issue Jun 28, 2021 · 4 comments

Comments

@cweekly
Copy link

cweekly commented Jun 28, 2021

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. :)

@cweekly
Copy link
Author

cweekly commented Jul 2, 2021

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

@tkadlec
Copy link
Contributor

tkadlec commented Jul 2, 2021

@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?

@cweekly
Copy link
Author

cweekly commented Jul 3, 2021

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

@cweekly
Copy link
Author

cweekly commented Jul 3, 2021

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants