Search code examples
jenkinswebdriver-ioallure

Getting access to the allure report statistics in Jenkins (tests with Webdriverio)


I have a set of tests which run within Jenkins and at the end of the tests (in the post section) I generate an allure report. The tests are created with Webdriverio.

The last time I did anything like this, I was using standard selenium running with Junit and due to that combination, the Jenkins Rest API had access to things like failedCount, skipCount, passes and failed counts. This however seems to only be possible with JUnit.

Does allure expose this to Jenkins somehow - or am I going to have to try and scrape the statistics from a pre-generated report?

(as a side note, I have tried to configure a second reporter in webdriverio, but while that seems to create some xml files locally, the folder I configure is not appearing on Jenkins. Also, webdriverio doesn't support JUnit as a framework - currently it's using mocha.)


Solution

  • I eventually managed to figure this out.

    There is url which you can go to to get a json file with the summary information.

    So if you report is at /allure - then you navigate to /widgets/summary.json