Developer FAQ

This page contains questions asked by developers as they come up to speed on the code.  Feel free to add questions and improve answers.

Q: What is the 'key' parameter sent by wptdriver when it requests work?
A: The key is a shared secret between the driver on the agent and the server.  It needs to be configurable on the client.  In the windows client, it is configurable by adding the following lines to wptdriver.ini:

Q: How does the agents get work from the server?
A: The test agents call "<location-id>&key=<key-secret>" to get work for its location. The server returns a line-separated set of "key=value" pairs, which contains various configuration parameters required for the test. The very critical parameter for the test is "url=<url-to-test".

Test ID=111006_2K_WF
Adding &f=json to the URL gives the same information formatted as JSON:
  "Test ID": "111006_2K_WF",
  "url": "",
  "runs": 1,
  "browser": "Chrome",
  "pngScreenShot" 1
Q: How does the agents post the results back to the server?
A: Once the page-load numbers are calculated, the results file is written to local disk in a file named as <num_run>_IEWPG.txt where num_run is the test run number. Then file is zipped into a zip-file named "" and posted (HTTP POST) along with other parameters like id, done (which is true after test is done), location and key.

Q: The server returns a blank or incomplete page with no errors.  What's going on?
A: The "error_reporting(0)" command in www/ is used to disable error reporting to improve user experience in production.  If you want to see errors, add the "debug" parameter to your URL.