How to integrate Allure reporter in Codeceptjs

Hi Team,

Could you please any one suggest me (steps) how to integrate Allure reporter in Codeceptjs?

1 Like
  1. Add in your codecept.conf file:

    allure: {
    enabled: true
    },

  2. In the script that you run your tests add the parameter --plugins allure. For example:

"test": "codeceptjs run --plugin allure"

  1. Run the tests with npm test
  2. Run the command allure serve output. By the way I don’t know what magic does this command do, but it creates one xml file per Feature and saves it in the output folder. This folder is overwritten after every run.
  3. -> an webpage is expected to open with the results.

Also, the documentation here is quite descriptive https://codecept.io/plugins/#allure :slight_smile:

Yeah…I tried but that screenshots are not use full.

I need report like below screenshot

This command should start a server that hosts the report you want:

What happens when you run that?

But how can the folder with this html file be generated? The allure serve output just uses the xml files and spins up the browser. What I would like to understand is were is this folder with all the magic hidden? Thanks K:)

It runs the Allure web server. The Allure reports are xml files. The Allure web server is able to process those xml report files into a nice, easy to read format

On the other hand, there are other reports such as mochawesome that generate a static report file that doesn’t need a proprietary server to view the reports for. On the other hand, as recommended in the CodeceptJS documentation, I’ve found that the Allure reports are more comprehensive than mochawesome.

Ah, so you’re looking for a static version of the Allure Report? There is an allure generate command for that. Link to the docs: https://docs.qameta.io/allure/#_usage_8

That’s how I generate reports in CI and save them in a zip for historical results. I’m not sure if this is still an issue, but there’s a flag that makes the generated report work in Chrome: https://github.com/allure-framework/allure2/issues/755#issuecomment-420376918

That’s good to know that the allure reports can also be generated statically @kboers. Thank you for those links. I prefer the Allure report output over Mochawesome because Allure output generates the steps dynamically, whereas Mochawesome reports just show the scenario source code.

correct.Mochawesome reports just showing the scenario source code but I need step by step pass/fail and total count.


Could you please suggest any one.?

when running this command ```
npx codeceptjs run --plugins allure


     Could not download https://selenium-release.storage.googleapis.com/3.14/IEDriverServer_x64_3.14.0.zip: Error: write EPROTO 20556:error:1408F10B:SSLroutines:ssl3_get_record:wrong version number:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:332:

How to run tests in parallel using run-workers and allure?