codeceptjs
Version:
Supercharged End 2 End Testing Framework for NodeJS
45 lines (30 loc) • 963 B
Markdown
permalink: /plugins/heal
editLink: false
sidebar: auto
title: heal
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
## heal
Self-healing tests with AI.
Read more about healing in [Self-Healing Tests][1]
```js
plugins: {
heal: {
enabled: true,
on: 'fail',
}
}
```
More config options are available:
* `healLimit` - how many steps can be healed in a single test (default: 2)
* `on` - trigger mode. `fail` (default), `file` (filter to a path), `url` (filter to a URL pattern).
#### `on=` modes
Heal always runs on step failures; `on=` narrows when it engages.
* **fail** — heal any failing step (default)
* **file** — heal only failures in `path=...[;line=...]`
* **url** — heal only failures when the current URL matches `pattern=...`
`on=step` and `on=test` are not supported and are rejected with an error.
### Parameters
* `config`
[1]: https://codecept.io/heal/