Puppetry
3.2.2
3.2.2
  • Welcome Puppetry
  • Getting Started
  • Project
  • Suite
  • Group
  • Target
    • Simple Target
    • iFrame Target
    • ShadowDOM Target
    • Chained Target
    • Shared Target
  • Test Case
  • Test Step / Action
    • Page Commands
    • Page Assertions
    • Target Commands
    • Target Assertions
  • Managing Records
  • Snippets
  • Running tests
    • Interactive Mode
    • Troubleshooting
  • Test Report
  • Export
    • Exporting as Jest Project (CI-friendly)
    • Exporting as Test Specification
  • Settings
  • Template Expressions
  • Testing Techniques
    • Testing Dynamic Content
    • Exhaustive Testing
    • Performance Testing
    • Visual Regression Testing
    • Testing Shadow DOM
    • Testing Google Analytics tracking code
    • Testing Chrome Extensions
    • Testing REST API
    • Mocking HTTP/S Requests
    • Testing Transactional Emails
      • Example with Restmail.net
      • Example with Mailinator
      • Example with IMAP bridge
      • Example with Google API
    • Testing Forms with Captcha
  • Version Control
  • Tips and Tricks
    • Embrace the Power of CSS
  • Command API
  • Test Application
Powered by GitBook
On this page
  • Milestone timings
  • Quantity-based metrics

Was this helpful?

  1. Testing Techniques

Performance Testing

PreviousExhaustive TestingNextVisual Regression Testing

Last updated 5 years ago

Was this helpful?

If you don’t want users leaving the app you have to think of performance. In fact nowadays if you site is not fast enough you get even “honored” with from Google. Thus is one of the aspects we address with end-to-end tests and include in CI/CD pipeline to ensure new releases do comply our requirements.

With Puppetry we can assert that:

  • Page loading times comply given restrictions

  • Total weight of assets (JavaScript, CSS, images, media, fonts, XHR) requested on the page satisfies given budget.

  • Total number of requested of assets satisfies given budget

Milestone timings

With page.assertPerformanceTiming method we can establish budget for loading times. Namely:

  • Page loading: the whole process of navigation and page load

  • Redirection: the time taken by document request redirections

  • Network latency: the time taken to fetch app cache, lookup domain, establish TCP connection, send request, receive response

  • Page processing: the time taken for page load once the page is received from the server

In case of assertion failure we get a report like this:

Quantity-based metrics

With page.assertPerformanceAssetWeight method we can assert the total weight of assets (JavaScript, CSS, images, media, fonts, XHR) requested on the page

In case of assertion failure we get a report like this:

By clicking on Download performance report

we can get the network activity details

With page.assertPerformanceAssetCount method we can assert the total number of assets (JavaScript, CSS, images, media, fonts, XHR) requested on the page

the badge of shame
performance budget
Asserting page loading times
Page loading budget report
Asserting total weight of requested assets
Assertion failed
Download performance report button
Performance report as a text file
Asserting total number of requested assets