Skip to content

v8.37.0 — Tags support!

Choose a tag to compare

@sonic16x sonic16x released this 03 Dec 14:23
· 4 commits to master since this release

🚀 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"