cucumber-playwright icon indicating copy to clipboard operation
cucumber-playwright copied to clipboard

Getting empty allure report

Open sonalidwivedi opened this issue 2 years ago • 15 comments

I am using cucumber-playwright with typescript framework and have followed same steps for generating allure report. After execution, allure-report folder is getting created but there is nothing inside data -> test-cases and i am getting "ALLURE REPORT UNKNOWN". I am using below dependencies: "@cucumber/cucumber": "^8.7.0",
"playwright": "^1.26.0", "allure-cucumberjs": "^2.0.0-beta.19",

Attaching relevant files for the reference. Please let me know if i am missing any detail. Screenshot 2022-10-19 at 09 36 24 Screenshot 2022-10-19 at 09 36 50 Screenshot 2022-10-19 at 09 36 56 Screenshot 2022-10-19 at 09 37 48 Screenshot 2022-10-19 at 09 38 01 Screenshot 2022-10-19 at 09 30 00

sonalidwivedi avatar Oct 19 '22 07:10 sonalidwivedi

I have also cloned the same code but allure-result folder is not getting generated.

sonalidwivedi avatar Oct 20 '22 07:10 sonalidwivedi

https://github.com/Tallyb/cucumber-playwright#to-choose-a-reporter

Tallyb avatar Oct 22 '22 07:10 Tallyb

Hi Tallyb, Thank you for your reply! I have already used USE_ALLURE=1 in test.yml file as an env parameter and then using "npx cucumber-js && npm run allure" to execute the test but getting report with 0 test cases. It says Allure Report Unknown. Please let me know if any additional dependency is required.

sonalidwivedi avatar Oct 22 '22 11:10 sonalidwivedi

did you make sure allure is installed? does it work locally?

Tallyb avatar Oct 22 '22 12:10 Tallyb

Screenshot 2022-10-22 at 16 14 15 Yes, "allure-commandline": "^2.18.1","allure-cucumberjs": "2.0.0-beta.19", is installed. Locally it does not work, i am getting empty report only. Attaching screenshot for the execution. I am using Mac, i am not sure if that would make any difference. Screenshot 2022-10-22 at 16 06 41

sonalidwivedi avatar Oct 22 '22 13:10 sonalidwivedi

Hi @Tallyb , Please help me with this issue.

sonalidwivedi avatar Oct 23 '22 13:10 sonalidwivedi

The error is quite clear: no directory. Create the reports/allure-results folder

Tallyb avatar Oct 23 '22 13:10 Tallyb

Hi @Tallyb ,

Already tried creating allure-results folder. allure-results is empty, and getting the same issue of 0 test cases.

Note : I have cloned https://github.com/Tallyb/cucumber-playwright repo and tried executing the code. Screenshot 2022-10-23 at 15 32 55 Screenshot 2022-10-23 at 15 33 17 Screenshot 2022-10-23 at 15 33 31

sonalidwivedi avatar Oct 23 '22 13:10 sonalidwivedi

Is the folder in the comment fill? Any chance it is folder permissions?

Tallyb avatar Oct 23 '22 13:10 Tallyb

You mean Allure-Report folder? It looks like this. I do not see any permission issue Screenshot 2022-10-23 at 15 47 59

sonalidwivedi avatar Oct 23 '22 13:10 sonalidwivedi

I just checked allure-report in finder. It looks like this. I created a new folder in "allure-report" locally, so it does not look like permission issue. Screenshot 2022-10-23 at 16 27 13 Screenshot 2022-10-23 at 16 37 49

sonalidwivedi avatar Oct 23 '22 14:10 sonalidwivedi

Hi @Tallyb ,

Anything that i can try for resolving this issue?

sonalidwivedi avatar Oct 24 '22 03:10 sonalidwivedi

Hi @Tallyb,

Please suggest if you have any resolution, it is bit urgent.

sonalidwivedi avatar Oct 24 '22 15:10 sonalidwivedi

The problem is solved by installing dotenv and including import dotenv from "dotenv"; dotenv.config(); because apparently it was not reading the configuration made in the .env

javillegas2 avatar Dec 30 '22 21:12 javillegas2

The problem is solved by installing dotenv and including import dotenv from "dotenv"; dotenv.config(); because apparently it was not reading the configuration made in the .env

Those who are using .env file should follow @javillegas2 steps mentioned above and for others pass the CLI option as

USE_ALLURE=1 npm test (Mac & Linux) set USE_ALLURE=1&&npm test (Windows)

or update npm scripts in package.json as "test": "USE_ALLURE=1 cucumber-js", (Mac & Linux) "test": "set USE_ALLURE=1&&cucumber-js", (Windows)

NerdishShah avatar Jan 18 '23 01:01 NerdishShah