CleanupTotal Service
wdio-cleanuptotal-service is a 3rd party package, for more information please see GitHub | npm
With the cleanup-total
service for webdriver.io, you can easily ensure proper cleanup after each test. The service provides a systematic way to mark entities for deletion immediately after creation. This is particularly useful when tests involve creating complex structures, such as a bank account with an investment plan and a deposit. Without proper cleanup, attempting to delete the account may result in errors, such as a refusal due to the account not being empty. However, with cleanup-total, entities are deleted in the correct order, ensuring that tests clean up after themselves and do not interfere with each other.
Installation
The easiest way to install this module as a (dev-)dependency is by using the following command:npm install wdio-cleanuptotal-service --save-dev
Usage
Add wdio-cleanuptotal-service to your wdio.conf.js
:
exports.config = {
// ... other options
services: ['cleanuptotal']
// ... other options
};