allure-framework / allure2

Allure Report is a flexible, lightweight multi-language test reporting tool. It provides clear graphical reports and allows everyone involved in the development process to extract the maximum of information from the everyday testing process
https://allurereport.org/
Apache License 2.0
4.14k stars 706 forks source link

Unable to delete old generated allure files from all-results and allure report #2269

Closed epszaw closed 8 months ago

epszaw commented 9 months ago

Describe the Bug

Link to https://github.com/allure-framework/allure-js/issues/814

On each run i.e allure generate my-allure-results -o allure-report --clean , i see allure-results folder keeps growing with each new test run, even though I'm using the --clean command.

Steps to Reproduce

  1. I used this command to install npm package of allure report npm i allure-playwright
  2. Made changes in the playwright.config.ts file as reporter: "allure-playwright";
  3. Ran the command to execute tests and generate file to all-results folder npx playwright test --reporter=line,allure-playwright
  4. Ran the command to generate report file allure generate my-allure-results -o allure-report --clean

Expected Behaviour

Upon running the clean command allure-results folder should be cleaned

Screenshots or Additional Context

No response

What Language are you using?

JavaScript

What Framework/Allure Integration you are using?

allure-playwright

What version of Allure Integration you are using?

latest

What version of Allure Report you are using?

latest

Code of Conduct

Pavithraashok12 commented 8 months ago

I am facing the same issue. It would be great if someone could share their thoughts on why it is not clearing the folder.

baev commented 8 months ago

The --clean command isn't supposed to clean the allure-results directory; it's used to remove the report output directory if it exists.

If you want to remove previous results, add a pretest script to remove the allure-results directory.

juandaweed124 commented 5 months ago

Is there any update on this? I can't solve it