Windows equivalent of Linux export DISPLAY for GUI app testing?

Brian Madden's Avatar

Brian Madden

07 Apr, 2016 01:32 AM

Hi Everyone,

We're starting to use AppVeyor for our Windows builds of our GUI Python app which uses SDL2. As it is now, our unit tests can't run in AppVeyor since our app can't get a window.

In Travis-CI, we can use commands like this to create a fake screen which we can use for testing:

 - export DISPLAY=:99.0
 - /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1280x720x24 -ac +extension GLX
 
Does anyone know if there's any kind of equivalent in Windows and/or with AppVeyor?

Thanks!
Brian

  1. 1 Posted by Lucie OUVRIER-B... on 24 Jul, 2018 12:42 PM

    Lucie OUVRIER-BUFFET's Avatar

    HI,

    I have the exact same problem as you had.
    Did you find a solution to launch GUI python tests on AppVeyor?

    Best regards.

    Lucie

  2. Support Staff 2 Posted by Ilya Finkelshte... on 24 Jul, 2018 01:15 PM

    Ilya Finkelshteyn's Avatar

    How would you do this on your local Windows machine?

  3. 3 Posted by Lucie OUVRIER-B... on 24 Jul, 2018 02:29 PM

    Lucie OUVRIER-BUFFET's Avatar

    Hi,

    It's a PyQt5 QApplication, so just launching the script of tests with python command is working on my local machine.

    The project is open source, you can see the repository on GitHub here: https://github.com/populse/populse_sandbox
    More precisely, the AppVeyor file is here: https://github.com/populse/populse_sandbox/blob/master/appveyor.yml
    The script of tests is here: https://github.com/populse/populse_sandbox/blob/master/python/populse_mia/src/scripts/test.py

    When I try to launch the script in AppVeyor, nothing is happening.
    I tried to write a print at the very beginning of the program, but it is not displayed, and the environment is like stuck.

    Best regards

    Lucie

  4. Support Staff 4 Posted by Ilya Finkelshte... on 24 Jul, 2018 02:39 PM

    Ilya Finkelshteyn's Avatar

    Try to add RDP at init stage and connect to VM when it stuck. Maybe you will see why it stuck right away.

  5. 5 Posted by Lucie OUVRIER-B... on 26 Jul, 2018 02:21 PM

    Lucie OUVRIER-BUFFET's Avatar

    Hi,

    I tried what you suggested, it's a very nice tool!

    I saw what the problem is, when I launch the python script, the following popup appears:

    This windows version does not support the required bluetooth api.

    I will try to fix it, thanks!

    Best regards

    Lucie

  6. Support Staff 6 Posted by Ilya Finkelshte... on 26 Jul, 2018 02:29 PM

    Ilya Finkelshteyn's Avatar

    Thanks a lot for the update!

  7. 7 Posted by Lucie OUVRIER-B... on 26 Jul, 2018 02:44 PM

    Lucie OUVRIER-BUFFET's Avatar

    It was just a problem with the version of PyQt5 module.

    PyQt5-5.10 was causing this issue, the valid one is 5.9.2.

    I uninstalled and reinstalled the good version and everything is working well now !

    Thank you again

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac