lastFailed
Overview
Testplane can rerun tests that failed in the last run. To do this, it saves a JSON file with information about the failed tests after each run.
With the lastFailed section, you can configure the location of this file and other options.
To run only the failed tests from the CLI, use the --last-failed-only option or the environment variable testplane_last_failed_only=true.
Setup
The lastFailed section has the following format:
testplane.config.ts
import type { ConfigInput } from "testplane";
export default {
// ...
lastFailed: {
only: false,
input: [".testplane/failed.json"],
output: ".testplane/failed.json",
},
} satisfies ConfigInput;