Forum Discussion
I also got the same problem.
Did you found any solution?
The system hangs each time (Currently using 5.1.3)
// Properties def testSuite = 'testsuite.html' //Code def projectPath = context.expand('${projectDir}') def seleniumTestSuite = new File(projectPath, testSuite).toString() seleniumTestSuite = "\"$seleniumTestSuite\"" def reportPath = new File(projectPath, 'report').toString() reportPath = "\"$reportPath\"" def baseUrl = context.expand('${#Project#home}') def process = "cmd /c java -jar ext\\selenese-runner.jar --baseurl \"$baseUrl\" --html-result $reportPath $seleniumTestSuite".execute() process.waitFor() def exitValue = process.exitValue() //System hangs log.info(exitValue )
- nmrao9 years agoChampion Level 3Just curious to know, when you can run the same command using a batch file / command-line directly, any reason for using from soapUI?
- nmrao9 years agoChampion Level 3Anyways, never mind.
Here is what you looking for
http://stackoverflow.com/questions/15199119/runtime-exec-waitfor-doesnt-wait-until-process-is-done- michel20169 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