Remove tests that were not executed from Allure report

前端 未结 2 714
礼貌的吻别
礼貌的吻别 2021-01-27 06:33

While running test I use different test-suites (xml files with list of tests to execute). E.g. I need to run smoke-tests so I choose corresponding xml with simplest tests (login

2条回答
  •  醉话见心
    2021-01-27 07:11

    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.

提交回复
热议问题