allure-framework / allure-framework/allure-js

Support playwright library only

Open
#1,273 2 comments 0 reactions 0 assignees View on GitHub
theme:cucumberjs theme:playwright type:bug
Dominant language
TypeScript
Stars
281
Forks
137
Avg merge
1d 11h
Merged PRs (30d)
13

Description

**Describe the bug**
Playwright is comprised of Playwright library and playwright test runner. often used together, but not necessarily, as Playwright library may be used with other runners (e.g. cucumberjs), it will import playwright based on `globalThis._playwrightInstance` which is playwright library, and then will try to attach items to test.info which is a playwright runner.

**To Reproduce**
You can enable allure cucumberjs formatter in this repo https://github.com/Tallyb/cucumber-playwright
you will get the following error:
```
[cause]: Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'allure-playwright' imported from .../node_modules/allure-js-commons/dist/esm/sdk/runtime/runtime.js
```
if you will install it, you will get errors when trying to attach to test.info, from here for example: https://github.com/allure-framework/allure-js/blob/2520ffec0c10b99c371862e073ff66828a851b38/packages/allure-playwright/src/runtime.ts#L17

**Expected behavior**
allow using playwright library with or without playwright test runner.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
allure 3.2.0

**Additional context**
Add any other context about the problem here.

Contributor guide

Open the contributing guide

Research direction

Start with the cucumber-playwright reproduction and inspect packages/allure-playwright/src/runtime.ts, especially its test.info usage, alongside the runtime.js import path shown in the error. Done means the Playwright library can be used with cucumberjs or another runner without requiring allure-playwright or attaching to Playwright Test runner state.

Written by the indexing model from the issue text.

Assessment

Tech stack
playwright, typescript
Domain
testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.