%% Last Updated: - [[2021-02-23]] - [[2021-02-10]] - [[2020-12-08]] %% Puppeteer is a [[NodeJS]] library that can be used as a [[Browser-based testing|browser-based]] functional or [[Load Testing Tool|load testing tool]]. It is developed by [[Google]], and works by controlling [[Chrome]] or [[Chromium]] through [[Chrome DevTools|DevTools]]. [[Flood Element]] is a flavor of [[Puppeteer]] that is focused on load testing, but vanilla Puppeteer can be used for load testing directly as well. [Site](https://developers.google.com/web/tools/puppeteer/) [Repo](https://github.com/puppeteer/puppeteer) Rather than using the WebDriver protocol, as [[Selenium WebDriver]] does, Puppeteer uses the [[DevTools]] protocol. [[Puppeteer vs Playwright]] ## Key features of a load testing tool ## Scripting ### Creating a script - [ ] [[Recorder]] - [ ] [[Exclude third-party or configured domains]] - [ ] [[Sample script packaged in]] - [ ] [[GUI Test Builder]] - [x] [[Code-based scripting]] - [ ] [[Protocol-based load testing]] - [x] [[Browser-based testing]] ### Making the script robust - Protocols Supported - [ ] [[HTTP/1.1] - [ ] [[HTTP/2] - [ ] [[WebSockets]] - [ ] [[gRPC] - [ ] [[Citrix ICA] - [ ] [[LDAP] - [ ] [[Modify headers]] - [x] [[Response assertions]] - [[Error handling]] - [x] [[Output to log upon error]] - [x] [[Screenshots]] - [x] [[Continue on error or restart iteration]] - [[Debugging]] - [x] [[See request and response headers and bodies on single iteration]] - [x] [[Change log levels]] - [x] [[Transaction groups]] - [x] [[Custom functions or test fragments]] ### Making the script realistic - [[Correlation of dynamic values]] - [x] [[JMeter Regular Expression Extractor]] - [x] [[CSS Selector]] - [x] [[JSON Extractor]] - [x] [[Dynamic think time and pacing]] - [x] [[Conditional logic]] - [x] [[Parallel execution of requests]] - [x] [[Download embedded resources]] - [x] [[Follow redirects]] - [x] [[Network bandwidth throttling]] - [[Network bandwidth throttling in Puppeteer]] capitalizes on its ability to access [[Chrome DevTools]]' network throttling options. [[Network throttling in Chrome DevTools]] - [x] [[Cache management]] - [x] [[Startup and teardown thread groups]] ### Test data - [x] [[Static test data]] - [x] [[Unique data generation during runtime]] - [ ] [[Virtual Table Server]] ### Collaborating on a script - [x] [[Version Control System]] - [x] [[Test Scaffolding]] ## Execution ### [x] [[Test Scenarios]] ### [x] [[Configurable Load profile]] - [x] [[Number of virtual users]] - [x] [[Duration]] - [ ] [[Origin or Region]] - [x] [[Ramp-up]] - [x] [[Ramp down]] - [x] [[Number of iterations]] - [x] [[Fully customizable load profile]] ### SLAs - [ ] [[Set multiple thresholds]] ### [x] [[Execution Parameters]] ### Memory consumption benchmark Probably similar to [[Flood Element]]'s, which is up to 40 users on an [[AWS]] m5.xlarge according to [[flood.io]]. ## Analysis ### Dashboard - [ ] [[Pre-generated reports]] - [ ] [[Custom dashboard creation]] - [ ] [[Reusable dashboards]] - Easy error troubleshooting - [x] [[Screenshots]] - [x] [[Response bodies]] - [x] [[Assertion success or failure]] - [x] [[Log for transaction failure]] ### Metrics - [x] [[Response time]] - [x] [[Request throughput]] - [x] [[Number of virtual users]] - [x] [[Error rate]] - [ ] [[Network throughput]] - [ ] [[Load generator CPU]] - [ ] [[Load generator memory]] ### Graphs - [ ] [[Different Graph Types]] - [ ] [[View by transaction]] - [ ] [[View by load generator or region]] - [ ] [[Custom views]] ### Results - [x] [[Raw data]] - [x] [[At least 1s granularity]] - [x] [[Export as plain text]] ## Continuous Load Testing - [x] [[Jenkins]] - [x] [[Azure Pipelines]] - [x] [[Travis CI]] - [x] [[CircleCI]]