PerformanceTotal Service
wdio-performancetotal-service is a 3rd party package, for more information please see GitHub | npm Note:
For WebdriverIO v9 use version 4.x.x.
For WebdriverIO v8 use version 3.x.x.
For WebdriverIO v7 use version 2.x.x.
For WebdriverIO v6 use version 1.x.x.
With this plugin for webdriver.io you can easily add performance analysis to any flow in your tests, whether it's a pure UI, API, or a combination of both. This plugin provides a simple and efficient way to measure the response times of various procedures and identify potential bottlenecks in your application. With this information, you can make informed decisions about optimizations and improvements to enhance the overall performance of your application.
Installation
The easiest way to install this module as a dev dependency is by using the following command:
npm install wdio-performancetotal-service --save-dev
Usage
Add wdio-performancetotal-service to your wdio.conf.js
:
exports.config = {
// ...
services: ['performancetotal']
// ...
};
...or with the service options:
exports.config = {
// ...
services: [
['performancetotal',
// The options (with default values)
{
disableAppendToExistingFile: false,
performanceResultsFileName: "performance-results",
dropResultsFromFailedTest: false,
performanceResultsDirectory: "performance-results",
analyzeByBrowser: false,
recentDays: 0
}]
]
// ...
};
Options
disableAppendToExistingFile
When set to true
, new test runs will start fresh and overwrite any existing performance data.
When set to false
(default), performance data will be added to the existing data.