Forum Discussion
nmrao
Champion Level 3
Anyways, never mind.
Here is what you looking for
http://stackoverflow.com/questions/15199119/runtime-exec-waitfor-doesnt-wait-until-process-is-done
Here is what you looking for
http://stackoverflow.com/questions/15199119/runtime-exec-waitfor-doesnt-wait-until-process-is-done
michel2016
9 years agoNew Contributor
Hi Rao,
Of course it is possible to run the test from command line. But we want the UI testing be a part of our whole integration test performed by SOAPUI (Auto runned by Jenkins and Maven)
So we also use SOAPUI to fill the DB (by Groovy). Run Rest and Soap calls and now even run UI testing (by Groovy).
In the meantime we found the solution:
def process = "java -jar ext\\selenese-runner.jar --baseurl \"$baseUrl\" --strict-exit-code --timeout 2500 --html-result $reportPath $seleniumTestSuite".execute() process.waitForProcessOutput() def exitValue = process.exitValue() assert (exitValue == 0), "Test failed see report dir for more info about the failed tests ($reportPath)"
process.waitForProcessOutput() did the trick!
- nmrao9 years agoChampion Level 3
michel2016, nice. Glad to know.
Another way could be, if you are using maven, just define a goal for java. Something like, #2 in below link.
http://www.vineetmanohar.com/2009/11/3-ways-to-run-java-main-from-maven/Please ignore this if you already aware about it.
Related Content
Recent Discussions
- 6 days agoemoya