Sergei Podlipaev
Sergei Podlipaev

Reputation: 1421

Allure report is empty after generation

I'm using allure 2.8.1. I've installed it with NPM into my docker container. After it I run allure generate test-results command to generate allure report from junit xml's, that are generated with newman tool.

In report directory there appears an empty directory data/attachments and directory data/test-cases with all test cases from junit xml's.

Example of test-case xml:

<?xml version="1.0" encoding="UTF-8"?>
<testsuites name="test-collection-2" tests="1" time="0.463">
  <testsuite name="Test succeed request" id="b3ce6542-d493-4206-b67b-e74e4ca58fde" tests="2" failures="0" errors="0" time="0.463">
    <testcase name="Status code is 200" time="0.463"/>
    <testcase name="Content-Type is present" time="0.463"/>
  </testsuite>
</testsuites>

After I open generated input html there appears nothing. enter image description here

Can you please assist me with this problem?

Upvotes: 4

Views: 5940

Answers (1)

Johnykutty
Johnykutty

Reputation: 12829

Allure needs a web server to open reports. After generating we cannot simply open the index.html file. To open generated report in your local machine, there are two ways

  1. Allure's default open command.
allure open path/to/report

This will open the report in your default web browser.

  1. Run a simple HTTP server in the reports folder, and open it in a browser.
python -m SimpleHTTPServer 8626

now open 0.0.0.0:8626 in your browser.

If you are uploading the generated webserver directory, this will work without any problem.

Upvotes: 7

Related Questions