question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[SOLVED] allure-reports does not accumulate the files (under /1, /2, /3)

See original GitHub issue

When I run the pytest example as-is from GitHub, everything works as expected.

When I copy the docker-container yaml file, the json files are created a bit differently.

In the example: allure-docker-python-pytest-example/allure-reports/1 allure-docker-python-pytest-example/allure-reports/2 allure-docker-python-pytest-example/allure-reports/… allure-docker-python-pytest-example/allure-reports/latest

But in my project: MyProjectRepo/allure-reports/<some_hashed_file_name>.json MyProjectRepo/allure-reports/<some_hashed_file_name>.json MyProjectRepo/allure-reports/<some_hashed_file_name>.json …

So when I run the container, it can’t find the report and the view is empty.

Why does it happen and how can I fix it?

Thanks Screen Shot 2020-12-03 at 15 24 14 Screen Shot 2020-12-03 at 15 24 35


services:
  allure:
    image: "frankescobar/allure-docker-service"
    environment:
      CHECK_RESULTS_EVERY_SECONDS: 1
      KEEP_HISTORY: 1
    ports:
      - "5050:5050"
    volumes:
      - ${PWD}/results/allure-results:/app/allure-results
      - ${PWD}/results/allure-reports:/app/default-reports

  allure-ui:
    image: "frankescobar/allure-docker-service-ui"
    environment:
      ALLURE_DOCKER_PUBLIC_API_URL: "http://localhost:5050"
      ALLURE_DOCKER_PUBLIC_API_URL_PREFIX: ""
    ports:
      - "5252:5252"

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:20 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
nusnusoncommented, Dec 3, 2020

Found it! @fescobar

So I was working on creating a patch to apply on top of the official example so it would be easy to reproduce without making a whole new package etc. As I was doing so, I couldn’t “break” the example for some reason and everything worked.

Then I noticed this little difference between my patch and my original project: GOOD: pytest tests/*.py --alluredir=./results/allure-results vs BAD: pytest tests/*.py --alluredir=results/allure-results

Assuming I have the container running, I want to be able to do pytest --alluredir=results/allure-reports src/tests and everything would be under root/results @fescobar

As you can see, I tried the BAD version (without ./results) and this made the whole mess. I also tried to verify it on the example project and make the most minimal changes to reproduce this case and it was indeed reproduced in the example. So, when I fixed it in my own project, everything worked as expected.

Thank you very much and I hope this thread would be useful for others who run into this issue.

P.S Maybe you can add a note about it to the README file @fescobar 😉

In any case - great project! very useful and thank you!

0reactions
fescobarcommented, Dec 3, 2020

I have 1 million of users using this. I think you have to read doc. Can you share a mini version of your project? Use gitter to chat with me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Allure Framework
Allure Framework is a flexible lightweight multi-language test report tool that not only shows a very concise representation of what have ...
Read more >
allure-gradle/README.md at master - GitHub
By default, allure-gradle would detect all of them and apply all the listeners yielding 3 reports. If you need only one or two,...
Read more >
Test Automation Reporting with Allure in .NET Projects
1. Run tests with any test runner. Generated Allure reports will appear in directory you configured with allureConfig.json ; 2. Generate the report...
Read more >
Practical guide for making tests execution result reports more ...
In this article we will examine how to make tests execution reports more comprehensive, using a specific tool – Allure, created by Yandex ......
Read more >
How to Build Your First Allure Report From Scratch
Allure Report is an open-source multi-language test reporting tool. ... Allure 2 supports history for tests in the report.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found