As explained in the doc I am trying to configure a setup and teardown test file.
It works fine only when the setup project is named "setup", any other name doesn't works, I mean it doesn't even appears in the UI.
Also the teardown for the same reason doesn't work.
Configuration:
export default defineConfig({
testDir: './tests',
testMatch: '**/*.@(spec|test).?(c|m)[jt]s?(x)',
projects: [
{
name: 'setup',
testMatch: /global\.setup\.ts/,
teardown: 'teardown',
},
{
name: 'teardown',
testMatch: /global\.teardown\.ts/,
},
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
dependencies: ['setup'],
},
],
});```
This thread is trying to answer question "Why does the setup and teardown configuration only work with specific project names and why don't they appear in the UI?"
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].