Windows equivalent of Linux export DISPLAY for GUI app testing?
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
Comments are currently closed for this discussion. You can start a new one.
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
1 Posted by Lucie OUVRIER-B... on 24 Jul, 2018 12:42 PM
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 Posted by Ilya Finkelshte... on 24 Jul, 2018 01:15 PM
How would you do this on your local Windows machine?
3 Posted by Lucie OUVRIER-B... on 24 Jul, 2018 02:29 PM
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 Posted by Ilya Finkelshte... on 24 Jul, 2018 02:39 PM
Try to add RDP at
init
stage and connect to VM when it stuck. Maybe you will see why it stuck right away.5 Posted by Lucie OUVRIER-B... on 26 Jul, 2018 02:21 PM
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 Posted by Ilya Finkelshte... on 26 Jul, 2018 02:29 PM
Thanks a lot for the update!
7 Posted by Lucie OUVRIER-B... on 26 Jul, 2018 02:44 PM
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
Ilya Finkelshteyn closed this discussion on 27 Aug, 2018 06:19 PM.