liip / TheA11yMachine

The A11y Machine is an automated accessibility testing tool which crawls and tests pages of any web application to produce detailed reports.
https://www.liip.ch/
621 stars 66 forks source link

Option to dump the dashboard #70

Closed QuingKhaos closed 7 years ago

QuingKhaos commented 8 years ago
Q A
Bug? no
New Feature? yes
Version used 0.8.3

Actual Behavior

At the moment a11ym-dashboard must be running to access the dashboard, which requires a running installation of it, if you want to monitor CI reports.

Expected Behavior

A --dump option, which dumps the required index.html into the --root reports directory (or maybe another dump directory, which copies all reports over)

Use case

  1. Fetch old reports dir from some cache (depends on CI server)
  2. Generate new report entry with a11ym
  3. Cleanup too old reports (e.g. only last 8 reports, the max of the graph)
  4. Dump with a11ym-dashboard --dump ... :grinning:
  5. Push dumped dashboard and reports to cache/S3/GCS/whatever or somehow include into Jenkins build report.
Hywan commented 7 years ago

Hello :-),

So what you are asking is a “dump” of the a11ym-dashboard output, something like a static version of it.

If yes, this is a good idea. I am not sure that it's a11ym to us to push the reports onto another locations (like S3 & co.). It seems to be out of the scope of this project. Thoughts?

QuingKhaos commented 7 years ago

Hi, in the use case described only step 4 is done with a11ym-dashboard. Pulling, cleanup and pushing is outside of the scope of a11ym-dashboard. That was a example why a dump would be useful and it which context this could be used. I edited the step 4 to be more clear.

Hywan commented 7 years ago

Finally, it's merged 😃. Quoting https://github.com/liip/TheA11yMachine#watch-the-dashboard:

Run the a11ym-dashboard command to serve the dashboard. The dashboard is an overview of several reports generated by the a11ym command. The command can serves the dashboard over HTTP, or over static files. In addition to requiring a root directory, it requires: In the first case, an address, and a port, in the second, nothing more than just a flag. For instance, if the reports are generated with the following command:

$ ./a11ym --output my_reports/`date +%s`/ http://example.org/A http://example.org/B

Then, the root directory is my_reports/ and thus the dashboard will be started over HTTP with the following command:

$ ./a11ym-dashboard --root my_reports

Browse 127.0.0.1:8080 (by default) to see the dashboard!

Or to generate static files:

$ ./a11ym-dashboard --root my_reports --static-output

Open my_reports/index.html, and do the same!

Bonus: Use the --open option to automatically open the dashboard in your favorite browser.