You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you want to use Cloud reporter, you need to specify cloud option:
// playwright.config.tsimport{PlaywrightTestConfig}from'@playwright/test';constconfig: PlaywrightTestConfig={reporter: [['playwright-zephyr/lib/src/cloud',{projectKey: 'JARV',// <-- Replace with your project keyauthorizationToken: process.env.ZEPHYR_AUTH_TOKEN,// <-- Replace with your authorization token}],],}
If your test cycle requires custom fields, you can specify them in testCycle option:
// playwright.config.tsimport{PlaywrightTestConfig}from'@playwright/test';constconfig: PlaywrightTestConfig={reporter: [['playwright-zephyr/lib/src/cloud',{projectKey: 'JARV',// <-- Replace with your project keyauthorizationToken: process.env.ZEPHYR_AUTH_TOKEN,// <-- Replace with your authorization tokentestCycle: {name: `Automated Playwright Run - ${newDate().toISOString()}`,customFields: {Browser: 'Google Chrome',Device: 'MacOS',},},}],],}
Also, your playwright tests should include unique ID inside square brackets [J79] of your Zephyr test case:
// ↓ Zephyr test case ID inside square bracketstest('[J79] basic test',async({ page })=>{awaitpage.goto('https://playwright.dev/');consttitle=page.locator('.navbar__inner .navbar__title');awaitexpect(title).toHaveText('Playwright');});
Then run your tests with npx playwright test command and you'll see the result in console:
✅ Test cycle JARV-C2901 has been created
👇 Check out the test result
🔗 https://jira.your-company-domain.com/secure/Tests.jspa#/testPlayer/JARV-C2901