ftlabs / perf-widget

22 stars 2 forks source link

Mutated URL causes tests to be run on multiple occasions #15

Closed seanmtracey closed 8 years ago

seanmtracey commented 8 years ago

Issue

If the URL is modified on a page after we've begun the benchmarks, the tests are run again despite the page's content being the same.

Steps to reproduce

  1. Load any Next FT article page (that has not been benchmarked) with FTLabs URL Sharing enabled
  2. As soon as the page has loaded, trigger the PerfWidget bookmarklet
  3. Observe that the PerfWidget dialog informs you that 'the page has been added to the queue'
  4. Notice also, that after 5 seconds, we modify the URL of the page to include a sharecode
  5. After some time (around a minute currently, the benchmarks take a while) the benchmarks for the page will have been added to the database, however, clicking the bookmarklet opens a dialog that again informs you that 'the page has been added to the queue'
  6. Open the same article page in another tag and click the bookmarklet again (before the sharecode is again appended), this time, the dialog will show the benchmarks acquired from the initial press

    Proposed solution

Remove query parameters and hash values from the URL submitted to the service for testing

JakeChampion commented 8 years ago

:clap: This is a great issue, I really like the format, we should use it for more issues in the future.

Some pages alter their response based on query parameters. If we implement your proposal, we should ensure to document this on our homepage.

@AdaRoseEdwards & @railsagainstignorance, what do you think about @seanmtracey's proposal?

JakeChampion commented 8 years ago

I think we should look to close this issue

AdaRoseCannon commented 8 years ago

I agree, removing query params would mean that we are analysing a different page.