Testrunner, Script and "isCommandLine"
[Edit: Clearing up quite a bit] Hi, I am using the latest SoapUI 5.2.1 with its testrunner.bat Manual steps should be ignored from commandline - at least according to the source code of SoapUI 4.0. However, in latest SoapUI they fail. 15:32:09,094 INFO [SoapUITestCaseRunner] running step [Restart ESB (clear state)] 15:32:09,099 ERROR [AbstractTestRunner] Exception during Test Execution java.lang.NullPointerException at com.eviware.x.form.XFormFactory.createDialogBuilder(XFormFactory.java:21) at com.eviware.x.form.support.ADialogBuilder.buildDialog(ADialogBuilder.java:66) at com.eviware.x.form.support.ADialogBuilder.buildDialog(ADialogBuilder.java:51) at com.eviware.soapui.impl.wsdl.teststeps.ManualTestStep.run(ManualTestStep.java:117) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:211) at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:47) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:138) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:46) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:129) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.start(AbstractTestRunner.java:77) at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase.run(WsdlTestCase.java:595) at com.eviware.soapui.tools.SoapUITestCaseRunner.runTestCase(SoapUITestCaseRunner.java:565) at com.eviware.soapui.tools.SoapUITestCaseRunner.runRunner(SoapUITestCaseRunner.java:397) at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:204) at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:139) at com.eviware.soapui.tools.AbstractSoapUIRunner.runFromCommandLine(AbstractSoapUIRunner.java:114) at com.eviware.soapui.tools.SoapUITestCaseRunner.main(SoapUITestCaseRunner.java:120) For circumventing the error, I have tried to write a groovy script which tests whether it is called in commandline or not. I've got the condition from http://www.soapui.org/scripting---properties/tips---tricks.html. However, "isCommandLine" is always false in my tests. Groovy Script: def isCommandLine = com.eviware.soapui.SoapUI.isCommandLine log.info("isCommandLine:" + isCommandLine) if (isCommandLine) { log.info("in cmdl"); testRunner.gotoStepByName( "GetStates is Empty" ); } I had a small glimpse on the 4.0 and 5.2.0 source code. I did not find a problem, however. Luckily, I found there the "isStandalone" static property, which seem to contain the correct information. :-) My question: Is "isStandAlone" the correct property to use nowadays? Did I mistake the isCommandline somehow or is there any known bug? MFG (Best regards) Heiko Studt2.4KViews0likes7CommentsSoapUI 5.1.3 Bug: SoapUI.isCommandLine() not working as expected
Hi SmartBear team I am not sure if this is the right place to file a bug - please let me know if this post belongs elsewhere :) I developeda listener for SoapUI, and used the SoapUI.isCommandLine() command to detect when the tool is invoked from the command line. This was working fine with version 5.0.0 for which I developed the listener originally. I upgraded recently to 5.1.3 and noticed that this particular command is not working as expected. The command always returns False, regardless of whether I run the tool from the UI or the command line. Please let me know if you need further details.1.3KViews0likes3Comments