Most of Horizon tests don't work without graphics display

Bug #1656818 reported by Dennis Dmitriev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Stepler
Fix Committed
High
Sergei Chipiga

Bug Description

To reproduce the bug:

1. Login by SSH to an Ubuntu 16.04 server
2. Run tests from https://github.com/Mirantis/stepler/tree/master/stepler/horizon

Result:

 Most of Horizon tests use the fixture 'video_capture', which is trying to get os.environ['DISPLAY'] and fails with:

> raise KeyError(key)
E KeyError: 'DISPLAY'

Expected behaviour:
* Check if the *requirements* are suitable to use the *video recorder*. Show the link to the documentation/FAQ/example usage in other case.
* It would be nice to have an additional example in the documentation to avoid such errors on CI:
"E WebDriverException: Message: Can't load the profile. Profile Dir: /tmp/tmpw6BEat If you specified a log_file in the FirefoxBinary constructor, check it for details"

description: updated
Changed in stepler:
importance: Undecided → High
status: New → Confirmed
Changed in stepler:
assignee: nobody → Sergei Chipiga (schipiga)
Revision history for this message
Sergei Chipiga (schipiga) wrote :

It's obvious, that Horizon dashboard requires a browser, a browser requires graphic display (X11 on linux). Without X11 display horizon tests can't be launched. If X11 display is present the environment variable `DISPLAY` is defined.

With patch https://review.gerrithub.io/#/c/343393 readable error messages are added, if X11 display and video capture toolkit are absent:

    * "Environment variable `DISPLAY` is undefined. Can't determine X11 display to capture video. Be sure that you have installed X11 display or xvfb. More details in http://stepler.readthedocs.io/horizon.html#tests-launching."

    * "`avconv` is not found on current system. Be sure that you have installed `avconv` to capture video. More details in http://stepler.readthedocs.io/horizon.html#tests-launching."

Changed in stepler:
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.