Applying Rules to Runs
Learn how to enable the Currents Automation Rules to influence runs
This feature is in beta
Currents allows you to define Rules from the dashboard, that can apply actions during Playwright test runs.
The following actions are supported when a rule matches:
Skip Test - Playwright will not run the test at all
Quarantine Test - Playwright will run the test, but will ignore any reported failures
Setting up the rule engine to apply while running your Playwright tests consists of 3 steps:
Setting up the project
Configuring Playwright Rules fixtures
Updating the tests code
Creating rules in Currents dashboard
Setting up the Currents Reporter
Requires @currents/playwright
v1.9.0+
Install and configure Currents reporter following Your First Playwright Run. Make sure that @currents/playwright reporter is configured with the right Record Key and Project ID.
Playwright Fixtures for Rules Engine
@currents/playwright
provides a Playwright fixture for applying the actions from matched rules.
It is a good practice to extend the default Playwright test
method, for example to enable Page Object Model, sharing a state between multiple tests etc. See Currents Playwright fixtures for more information.
Update tests to use new test method
Import and use the extended test
for every test case to enable the rules engine for that test.
Any rules that match your test will now automatically apply.
Creating Rules in Currents Dashboard
Last updated