1

i'am using the allure-reporter with the wdio framework and in the Allure-results folder i get 490 file for each run and after a number of run it start generating false results and it's normal since the Allure-results folder contain about 75000 file i use the following version : "@wdio/allure-reporter": "^5.13.2"

someone has an idea about how to force it to erase the previous results at every new run ?

mehdi
  • 47
  • 1
  • 8
  • Hi, Please try this answer https://stackoverflow.com/questions/48822720/remove-tests-that-were-not-executed-from-allure-report/48976667#48976667 – Naveen Thiyagarajan Feb 06 '20 at 06:55

1 Answers1

2

I am using WDIO with cucumber framework along with allure reporting. I got the same issue.

I used an external npm package called "clean-dir" to achieve this.

I installed cleandir as dev dependencies and added the following to the "package.json" file:

 "test": "npm run cleandir && wdio",
 "cleandir": "cleandir ./reports/allure/allure-results",

So whenever i trigger the test, it first cleans the existing results of allure.

I am not sure whether this is the best way but it simply solves my requirement.

P.S: I am posting the same answer because that question was with TestNG and not with WDIO.

  • thank you very much for this solution, but meanwhile i have added some other feature files and i have a total of 9 and the problem is that in the allure-results file i have now 1200 file for each run and cleandir throw an error because it can not delete all these files – mehdi Feb 07 '20 at 13:24
  • it's : "spawn ENAMETOOLONG" but when i try to delete a single file it works – mehdi Feb 07 '20 at 16:52
  • i disabled the stepsreporter and i got rid of all json files now it works – mehdi Feb 08 '20 at 18:26