Glenn_Halstead
16 years agoOccasional Contributor
java error when running from command line
Hi folks,
I have a problem I hope someone can help with...
I have a groovy step that writes to a Project property using
Thus works fine when run in SoaupUI but when I run the same test case from the command line I get an error...
cmd line:
error:
does anyone have any pointers?
thanks
Glenn
I have a problem I hope someone can help with...
I have a groovy step that writes to a Project property using
def testProject = testRunner.testCase.testSuite.project.workspace.getProjectByName("ViewingCardManager_v15B4.0")
testProject.properties["mqResponse"].value = "blahblah"
Thus works fine when run in SoaupUI but when I run the same test case from the command line I get an error...
cmd line:
C:\Program Files\eviware\soapUI-2.5.1\bin>testrunner.bat -P "environment=D11" -c "requestViewingCard_UK1 TestCase" -r -a
-j -f C:\Osprey_Results "C:\Service_Testing\SCMS\SoapUI\ViewingCardManager_v15B4.0-soapui-project_gh.xml"
error:
13:43:51,631 ERROR [SoapUI] An error occured [Cannot invoke method getProjectByName() on null object], see error log for
details
java.lang.NullPointerException: Cannot invoke method getProjectByName() on null object
at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:77)
at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:784)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:758)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:170)
at Script1.run(Script1.groovy:10)
at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:59)
at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:148)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runTestStep(WsdlTestCaseRunner.java:273)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.run(WsdlTestCaseRunner.java:182)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.start(WsdlTestCaseRunner.java:81)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase.run(WsdlTestCase.java:534)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase.run(WsdlTestCase.java:50)
at com.eviware.soapui.tools.SoapUITestCaseRunner.runTestCase(SoapUITestCaseRunner.java:484)
at com.eviware.soapui.tools.SoapUITestCaseRunner.runSuite(SoapUITestCaseRunner.java:443)
at com.eviware.soapui.tools.SoapUITestCaseRunner.runRunner(SoapUITestCaseRunner.java:279)
at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:127)
at com.eviware.soapui.tools.AbstractSoapUIRunner.runFromCommandLine(AbstractSoapUIRunner.java:72)
at com.eviware.soapui.tools.SoapUITestCaseRunner.main(SoapUITestCaseRunner.java:92)
13:43:51,662 ERROR [SoapUITestCaseRunner] putMQMesg failed, exporting to [C:\Osprey_Results\ViewingCardBinding_TestSuite
-requestViewingCardUK1_TestCase-putMQMesg-0-FAILED.txt]
13:43:51,693 INFO [SoapUITestCaseRunner] Finished running soapUI testcase [requestViewingCard_UK1 TestCase], time taken
does anyone have any pointers?
thanks
Glenn