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

Include test info in UA #548

Closed
rviscomi opened this issue Jan 6, 2016 · 3 comments
Closed

Include test info in UA #548

rviscomi opened this issue Jan 6, 2016 · 3 comments

Comments

@rviscomi
Copy link
Contributor

rviscomi commented Jan 6, 2016

See http://www.webpagetest.org/forums/showthread.php?tid=14152

The test ID, run number, and cache state should be included in the UA string. This would make it possible to reconstruct a link to the test results page from the web server's logs. One practical application of this is using existing RUM tools for synthetic monitoring.

@pmeenan
Copy link
Contributor

pmeenan commented Jan 7, 2016

Should be easy enough to pull off but I would want to make it an optional opt-in feature. I already have problems from time to time where sites break even using the current UA string and I'm a bit concerned that adding more to it might break even more sites.

Current thought is to have a new field that lets you specify additional (arbitrary) information to be added to the UA string and have it support a few substitution strings for things like test ID, run and cache state.

Something like: WPT/%TESTID%.%RUN%.%CACHE%

the resulting UA could look like:

Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36 PTST/257 WPT/160107_QC_87f4a655744f286f1cb4f49c71b8dbe6.1.0

@pmeenan
Copy link
Contributor

pmeenan commented Jan 7, 2016

That also solves any issues of knowing which test system the tests came from in case you are running a private instance, testing from public (and maybe using SpeedCurve). Otherwise you wouldn't know which system the test ID was good for.

@pmeenan pmeenan closed this as completed in f8401ba Jan 7, 2016
@pmeenan
Copy link
Contributor

pmeenan commented Jan 7, 2016

Also live on the public instance now. API-only though.

Here is a sample test: http://www.webpagetest.org/result/160107_HS_XQN/

Passed uastring=WPT/%TESTID%.%RUN%.%CACHED%
(appropriately URL encoded)
Resulting UA String: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36 PTST/258 WPT/160107_HS_XQN.1.0

With the run and cached state changing for each of the runs.

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