★ wanayoo — archive 1999 https://github.com/allure-framework/allure2/issues/1111Nouvelle recherche | Portail wanayoo
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cache busting to generated HTML report #1111

Open
marklagendijk opened this issue Jul 15, 2020 · 0 comments
Open

Add cache busting to generated HTML report #1111

marklagendijk opened this issue Jul 15, 2020 · 0 comments

Comments

@marklagendijk
Copy link

@marklagendijk marklagendijk commented Jul 15, 2020

Is your feature request related to a problem? Please describe.
Currenlty the HTML report requests the json files with paths such as widgets/history-trend.json. Some web servers which host Allure reports will cache these data files or have the browser cache them (based on response headers). Because of this outdated data will be shown.

My specific case for this is hosting the Allure results on GitLab. As part of a CI/CD pipeline I publish the test results to GitLab pages. This way you can always see the latest test results for the master branch. However because of above issue, and since you cannot modify the caching headers for GitLab pages, you end up with outdated test results being shown.

Describe the solution you'd like
Implement a Cache Busting mechanism in the Allure HTML report generation. All three mechanisms would work:

  • File name versioning (e.g. history-trend.1136c7f0-a7f2-4897-85b1-93a7a174af11.json)
  • File path versioning (e.g. /1136c7f0-a7f2-4897-85b1-93a7a174af11/history-trend.json)
  • Query strings (e.g. history-trend.json?v=1136c7f0-a7f2-4897-85b1-93a7a174af11)

The 'version' could be a random string, that is generated once for every report, and used in all names / paths / query strings.

Describe alternatives you've considered
Fixing the issue server side. There are two issues with that:

  1. You first need to find out that the issue exists, understand what causes the issue, understand how you could fix it, and then you could apply the fix.
  2. There are cases, such as GitLab Pages, where the issue can't be fixed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.