4

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?

Stefan Birkner
  • 24,059
  • 12
  • 57
  • 72
Sergei Podlipaev
  • 1,331
  • 1
  • 14
  • 34
  • 1
    Possible duplicate of [getting 404 error when generating allure report in protractor using allure command line tool](https://stackoverflow.com/questions/53138595/getting-404-error-when-generating-allure-report-in-protractor-using-allure-comma) – Bharath Kumar S Dec 24 '18 at 17:28
  • have you tried using `allure serve test-results` command instead of `generate`? `serve` should generate and automatically open/serve report for you – Dmitry Mayer Dec 25 '18 at 09:34

1 Answers1

5

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.

Johnykutty
  • 12,091
  • 13
  • 59
  • 100