Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting empty allure report #518

Open
sonalidwivedi opened this issue Oct 19, 2022 · 15 comments
Open

Getting empty allure report #518

sonalidwivedi opened this issue Oct 19, 2022 · 15 comments

Comments

@sonalidwivedi
Copy link

sonalidwivedi commented Oct 19, 2022

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
Copy link
Author

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

@Tallyb
Copy link
Owner

Tallyb commented Oct 22, 2022

@sonalidwivedi
Copy link
Author

sonalidwivedi commented Oct 22, 2022

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.

@Tallyb
Copy link
Owner

Tallyb commented Oct 22, 2022

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

@sonalidwivedi
Copy link
Author

sonalidwivedi commented Oct 22, 2022

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
Copy link
Author

Hi @Tallyb ,
Please help me with this issue.

@Tallyb
Copy link
Owner

Tallyb commented Oct 23, 2022

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

@sonalidwivedi
Copy link
Author

sonalidwivedi commented Oct 23, 2022

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

@Tallyb
Copy link
Owner

Tallyb commented Oct 23, 2022

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

@sonalidwivedi
Copy link
Author

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
Copy link
Author

sonalidwivedi commented Oct 23, 2022

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
Copy link
Author

Hi @Tallyb ,

Anything that i can try for resolving this issue?

@sonalidwivedi
Copy link
Author

Hi @Tallyb,

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

@javillegas2
Copy link

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

@NerdishShah
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants