Skip to content

Make existing and freshly created Behave reports available over HTTP

David Jaša requested to merge dj/publish-behave-logs into master

Install:

  • locally: ./setup_pbl.py
  • remotely: ansible-playbook -i host,[host2[,host3]] setup_pbl.yml
    (note the comma in -i option argument to allow arbitrary host)

httpd should now listen on port 8080 and make available existing and freshly created logs. This is done by publish_behave_logs service that monitors /tmp for close_write events and copies report_*.html files to httpd document root with modification time stamp added to file name so that you can don't overwrite old result of repeated test.

Copying is done in parallel (initial with Pool() of processes and in response to event in separate Process()-es), copying after events is delayed by 2 s so that run/runtest.sh has a chance to delete e.g. empty reports of skipped test that'd be copied as FAIL_* reports if copied immediately

Edited by David Jaša

Merge request reports