-
Notifications
You must be signed in to change notification settings - Fork 83
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
[BUG]: Summary not generated unless script is terminated #2120
Comments
@tekno0ryder If an error occurs before the engine is closed, the summary may not be created, so it's best to close the engine in a 'finally' clause to cover both success and failure cases. See more examples in the README. |
@tekno0ryder Just to avoid ambiguity, you have to call the |
@shunguoy @tombrunet Thanks for the response, I am sure no exception is thrown and I made sure to call "close" but that was not enough to generate summaries. The example I tried is from boilerplate "batch-scan" and by just adding an infinite loop at the end you can reproduce it |
Need to update the document to point out that the report is generated only if the engine is properly closed. If the script keeps running (such as a while (true)) without closing the engine, no report will be generated. |
@tekno0ryder Note that |
@tombrunet True but having a service like Express.js or ZeroMQ like in my case it's expected to be a long running process that never terminates. |
@tekno0ryder have you tried in your while (true) to construct the checker, run getCompliance(), then close the engine for each test case? in this case, each test is run independently though it's not desirable performance-wide. |
A more realistic test case would be something like:
So, it would keep the Node environment running, but also allow Node to be able to process other things on the call stack. That said, digging into the code, it looks like the report generation isn't currently happening as part of the |
Project
extension-checker
Description
I am working on a JS server that utilizes
accessibility-checker
to intercept chrome debugging session whenever needed to rungetCompliance()
on the page and save result.Issue
I had really hard time trying to generate summary reports either in
xlsx
orcsv
until I figured out the script has to be terminated in order to generate them, closing the engine was not enough.Solution
There was emphasize on closing the engine but terminating script was never mentioned in the docs.
1- Either generate summary when closing engine itself.
2- If above is a huge breaking change then improving the docs to demonstrate this point.
Thanks
Steps to reproduce
1- Run getCompliance().
2- Close the engine.
3- Keep the server running
while(true){}
The text was updated successfully, but these errors were encountered: