The `wdio-performancetotal-service` is a WebdriverIO plugin designed for integrating performance analysis directly into automated test flows. It enables developers to measure the response times of various procedures—whether UI-based, API-driven, or a combination—to identify and address application bottlenecks. The current stable version is 4.0.7, which offers compatibility with WebdriverIO v9 and includes features like the `recentDays` option. The service generally updates its major versions to align with WebdriverIO's major releases, ensuring ongoing compatibility with the ecosystem. Its key differentiator lies in its seamless integration with WebdriverIO tests, providing `sampleStart` and `sampleEnd` methods to precisely delineate performance measurement spans within test scripts. It also offers configurable options for result aggregation, file naming, directory customization, and analysis by browser, facilitating comprehensive performance monitoring and reporting.
npm install wdio-performancetotal-serviceVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to import and use the `performancetotal` object's `sampleStart` and `sampleEnd` methods within a WebdriverIO test to measure the startup performance of two different websites. Configuration for the service itself is done in `wdio.conf.js`.
Check the README or documentation for the correct service version compatible with your installed WebdriverIO version and update `wdio-performancetotal-service` accordingly.
Ensure you have backed up any critical performance data before enabling `disableAppendToExistingFile`. If you wish to aggregate results over time, keep this option as `false` (default).
Configure `performanceResultsFileName` with a dynamic value, for example: `performanceResultsFileName: `performance-results_${new Date().getTime()}` to ensure unique files are generated for each run.Verify that `wdio-performancetotal-service` is installed (`npm install wdio-performancetotal-service --save-dev`) and that 'performancetotal' (or ['performancetotal', options]) is correctly added to the `services` array in your `wdio.conf.js`.
Ensure you have `import { performancetotal } from 'wdio-performancetotal-service';` at the top of your test file and that the service is properly configured and initialized in `wdio.conf.js`.