-
Couldn't load subscription status.
- Fork 129
Description
Describe the bug
If you’re using allurectl v2.17.0 together with the allure-playwright adapter v 3.3.3, you may encounter an issue originating here.
It seems that allurectl automatically sets the environment variable ALLURE_TESTPLAN_PATH to either null or some non-empty value. If you don’t actually have a testplan.json file, this behavior leads to readFileSync/JSON.parse throwing an error, which in turn forces execution into the catch block.
catch (e) {
// eslint-disable-next-line no-console
console.error(`could not parse test plan ${testPlanPath}`, e);
return undefined;To Reproduce
- install allurectl v2.17.0
- install allure-playwright v 3.3.3
- install playwright v 1.55.0 (no matter about the version)
- add report adapter to the pw config like this:
reporter: [
[
'allure-playwright',
{
resultsDir: 'output',
},
],
],
- run playwright cli via allurectl
allurectl watch -- npx playwright test --pass-with-no-tests --project=api --grep-invert '@ignore'
you will get an issue from the catch block.
Expected behavior
This issue does not occur if the ALLURE_TESTPLAN_PATH variable is simply absent from your environment and file testplan.json is exist somewhere.
I don’t have visibility into the internals of your CLI since it’s hosted in private repositories, but from the outside it looks like either:
- ALLURE_TESTPLAN_PATH shouldn’t be set when there’s no test plan, or
- the parseTestPlan function should be updated to handle this case more gracefully.
Screenshots
