Permalink
Browse files

[#1017] Add a property "%test.headlessBrowser" in application.conf to…

… choose the browser version used by htmlunit in auto-test mode.
  • Loading branch information...
1 parent 30ec20e commit d3987c659c78dcfaaccd73fd23967b77cc75c6ac @yjaigu yjaigu committed Aug 7, 2011
View
@@ -16,6 +16,7 @@ framework/src/play/version
framework/tests/test-application/db
framework/play-*.jar
framework/docs
+samples-and-tests/*/test-result/
# IDE and editors
*~
@@ -220,6 +220,10 @@ def autotest(app, args):
# Run FirePhoque
print "~"
+ headless_browser = ''
+ if app.readConf('headlessBrowser'):
+ headless_browser = app.readConf('headlessBrowser')
+
fpcp = [os.path.join(app.play_env["basedir"], 'modules/testrunner/lib/play-testrunner.jar')]
fpcp_libs = os.path.join(app.play_env["basedir"], 'modules/testrunner/firephoque')
for jar in os.listdir(fpcp_libs):
@@ -228,7 +232,7 @@ def autotest(app, args):
cp_args = ':'.join(fpcp)
if os.name == 'nt':
cp_args = ';'.join(fpcp)
- java_cmd = [app.java_path(), '-classpath', cp_args, '-Dapplication.url=%s://localhost:%s' % (protocol, http_port), 'play.modules.testrunner.FirePhoque']
+ java_cmd = [app.java_path(), '-classpath', cp_args, '-Dapplication.url=%s://localhost:%s' % (protocol, http_port), '-DheadlessBrowser=%s' % (headless_browser), 'play.modules.testrunner.FirePhoque']
try:
subprocess.call(java_cmd, env=os.environ)
except OSError:
Oops, something went wrong.

0 comments on commit d3987c6

Please sign in to comment.