v8.37.0 — Tags support!
🚀 Improvements
Tags support for tests is now available. See the documentation for details.
You can now add tags to tests like this:
describe("test tags", { tag: ["common"] }, () => {
describe("test tags", { tag: ["main"] }, () => {
it("Feature A", { tag: ["desktop", "uniq"] }, async ({browser}) => {
await browser.addTag("dynamic tag");
})
it("Feature B", { tag: ["desktop", "smoke", "slow"] }, async ({browser}) => {
// test...
})
it("Feature C", { tag: "old" }, async ({browser}) => {
// test...
})
it("Another test", { tag: ["smoke"] }, async ({browser}) => {
// test...
})
})
})and then run only the needed tests using the --tag option:
npx testplane --tag "old"
Logical operators are also supported:
npx testplane --tag "smoke&desktop"
npx testplane --tag "old|desktop"
npx testplane --tag "!slow"