Search the web
Sign In
New User? Sign Up
jsunit
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
browser kill command is not used for StandaloneTest   Message List  
Reply | Forward Message #1221 of 1225 |
We were trying to get our jsunit tests running on the ci machine using firefox
running in xvfb. The tests seem to run fine but leave xvfb and the browser
running after the test completes. We tracked it down to the fact that the
browser kill command is not used because of the following line of code in the
suite method of StandaloneTest.

suite.addTest(new StandaloneTest(new
DelegatingConfigurationSource(originalSource) {
public String browserFileNames() {
return browser.getFileName();
}
}));

In the above code, browser.getFileName() has had the original kill command
stripped off.

When using firefox, this is not a problem because even if the kill command is
NULL, jsunit ends up destroying the firefox process via the java process object
in JsUnitStandardserver, like so:

if (browserProcess != null &&
configuration.shouldCloseBrowsersAfterTestRuns()) {
if (launchTestRunCommand.getBrowserKillCommand() != null) {
try {
processStarter.execute(new
String[]{launchTestRunCommand.getBrowserKillCommand()});
} catch (IOException e) {
e.printStackTrace();
}
} else {
browserProcess.destroy();
try {
browserProcess.waitFor();
} catch (InterruptedException e) {
e.printStackTrace();
}
waitUntilProcessHasExitValue(browserProcess);
}
}

Bottom line is-- we never see browser kill command executed. We always see
browserProcess.destroy() which does *not* work for us when we use xvfb.

Thanks,
Manish





Mon Jun 29, 2009 9:55 pm

manish_khettry
Offline Offline
Send Email Send Email

Forward
Message #1221 of 1225 |
Expand Messages Author Sort by Date

We were trying to get our jsunit tests running on the ci machine using firefox running in xvfb. The tests seem to run fine but leave xvfb and the browser...
Manish Khettry
manish_khettry
Offline Send Email
Jun 30, 2009
12:50 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help