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

Unable to open the tabs on the generated htmlextra report #381

Closed
1 task done
Escape147 opened this issue Apr 8, 2022 · 11 comments
Closed
1 task done

Unable to open the tabs on the generated htmlextra report #381

Escape147 opened this issue Apr 8, 2022 · 11 comments
Labels
state: triaged This issue has been triaged type: bug Something isn't working

Comments

@Escape147
Copy link

Escape147 commented Apr 8, 2022

Is There An Existing Issue

What Are You Seeing

After the report is generated, the Request/Test details cannot be viewed by clicking on the 'Total Requests' or 'Failed Tests' or 'Skipped Tests' tabs
20220408_101630

Steps To Reproduce The Issue

  1. Run Newman using command in terminal 2. Open new htmlextra report in browser window 3. Click on 'Total Requests' or 'Failed Tests' or 'Skipped Tests' tab 4. Nothing happens...

Full Newman Command Or Node Script

newman run **.postman_collection.json -e **.postman_environment.json -r htmlextra --reporter-htmlextra-export result0408-0900.html

HTMLEXTRA Version

1.22.8

Newman Version

5.3.2

Additional Context

No response

@Escape147 Escape147 added state: needs-triage This issue needs to be triaged type: bug Something isn't working labels Apr 8, 2022
@Escape147 Escape147 changed the title 生成htmlextra报告后,点击上方tab无效:不能查看Requests(Tests)详情 After generating the htmlextra report, clicking the upper tab is invalid: Cannot view Requests (Tests) details Apr 8, 2022
@Escape147
Copy link
Author

Still using the Interactive Example Report on github
20220408_132742

@DannyDainton
Copy link
Owner

Are you able to send me the report file that's failing, please?

You might need to change the file type to .txt to send through Github.

Also, if you open the Dev Tools, do you see any error in the console?

@DannyDainton DannyDainton added state: triaged This issue has been triaged state: awaiting-response Waiting the for the author to respond and removed state: needs-triage This issue needs to be triaged labels Apr 8, 2022
@DannyDainton DannyDainton changed the title After generating the htmlextra report, clicking the upper tab is invalid: Cannot view Requests (Tests) details Unable to open the tabs on the generated htmlextra report Apr 8, 2022
@Escape147
Copy link
Author

报错如下
image
失败的报告文件
result0407-1559.txt

@DannyDainton
Copy link
Owner

DannyDainton commented Apr 11, 2022

The default template uses external CDNs for most of the JavaScript and the report layout styling. It looks from the console output that these are not fully loading on your connection. This would cause actions like opening the tabs to fail.

I've seen issues in the past where certain Google CDNs are blocked in China and changed a couple to accommodate that.

#64

I'm not sure about which CDNs would be allowed in your region and the ones that are allowed can be added on your side with a custom template.

I won't be making any changes to the reporter from my side.

@DannyDainton DannyDainton removed the state: awaiting-response Waiting the for the author to respond label Apr 11, 2022
@Escape147
Copy link
Author

Escape147 commented Apr 12, 2022

@DannyDainton
Hi, thanks for your reply.
I have checked your reply and #64 in detail, but I don't know how to do it. Could you please describe the solution in detail? ?
Oh, I'm also in China

@DannyDainton
Copy link
Owner

This is the template file that generates the final report:

https://github.com/DannyDainton/newman-reporter-htmlextra/blob/main/lib/dashboard-template.hbs

It the file, there are a series of URLs which are the CDNs for libraries like bootstrap, clipboard, jquery etc.

If you make a new copy of this file, change those URLs to one's that would work in China you can use that with the reporter.

You would need to use the --reporter-htmlextra-template flag to reference that custom file:

newman run collection.json -r htmlextra --reporter-htmlextra-template <your new template file>

@Escape147
Copy link
Author

@DannyDainton
Thank you very much, I finally solved this problem and won't be killed by the leader

@DannyDainton
Copy link
Owner

Awesome! 👏

Did you want to share how you solved this or what you used?

Just incase others run into the same problem.

@Escape147
Copy link
Author

Escape147 commented Apr 12, 2022

Awesome! 👏

Did you want to share how you solved this or what you used?

Just incase others run into the same problem.

  • Open the generated html report file in text form
  • Batch replace the CDN domain(cdnjs.cloudflare.com) that is not available externally with the one that is available in China (cdn.bootcdn.net)
  • After saving and reopening the report, it can be used normally

@Escape147
Copy link
Author

Another option:

  • Add Google Plugin - Switchomege
  • Set up proxy and connect
  • Normal access to reports and switching tabs

@github-actions
Copy link

github-actions bot commented Jun 5, 2022

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
state: triaged This issue has been triaged type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants