Created
November 30, 2011 10:43
-
-
Save antony/1408625 to your computer and use it in GitHub Desktop.
Running functional tests with Xephyr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
includeTargets << grailsScript("_GrailsInit") | |
display = ':65' | |
resolution = '-screen 1024x768' | |
target('default': "Run tests with xephyr") { | |
List parsedArgs = args.split() as List | |
exec (executable: 'Xephyr', spawn: true) { | |
arg(line:display) | |
arg(line:resolution) | |
} | |
event("ExecCommand", ['env', ["DISPLAY=${display}", 'grails']+parsedArgs, 'Xephyr Failed: Could not execute task in embedded X display']) | |
exec (executable:'killall') { | |
arg(line:'Xephyr') | |
} | |
} |
this is awesome, thanks
It's seems to solve the same thing that textbox by @doktor500 and @mgryszko with a different approach.
Did you try vnc4server? I think it does the same (adds a headless X server), but it allows you to connect with VNC to the server. You can watch tests being executed and record them.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Running grails functional tests with Xephyr.
The reason you'd want to run with Xephyr is so that your functional tests never lose focus, you can continue using the machine whilst your test suite runs.
then place this file into your grails app's scripts directory, and prefix any targets you use with 'xephyr' - i.e: