NullPointerException at com.eviware.soapui.impl.wsdl.teststeps.RestTestRequestStep
I am stuck with below error . I am calling a groovy test step from assertion of a Test Step and this groovy test step is calling another test case . it is running but below exception is coming . Just sample code . Test Step 1 - > In assertion calling another test step based on some conditions context.testCase.getTestStepByName("VerifyAddress").run(context.testRunner,context) Test step 2 (VerifyAddress) //calling another step based on few conditions def key = context.testCase.testSuite.project.testSuites['Keywords_Addresses'].testCases['ApproveAdress'] key.setPropertyValue("city",city) def runner = key.run( null, true ) runner.waitUntilFinished() Thu Apr 29 22:53:32 IST 2021: ERROR: java.lang.NullPointerException java.lang.NullPointerException at com.eviware.soapui.impl.wsdl.teststeps.RestTestRequestStep.run(RestTestRequestStep.java:921) at com.eviware.soapui.model.testsuite.TestStep$run$0.call(Unknown Source) at Script7.run(Script7.groovy:14) at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:94) at com.eviware.soapui.support.scripting.groovy.SoapUIProGroovyScriptEngineFactory$SoapUIProGroovyScriptEngine.run(SoapUIProGroovyScriptEngineFactory.java:83) at com.eviware.soapui.impl.wsdl.teststeps.assertions.basic.GroovyScriptAssertion.assertScript(GroovyScriptAssertion.java:150) at com.eviware.soapui.impl.wsdl.teststeps.assertions.basic.GroovyScriptAssertion.internalAssertResponse(GroovyScriptAssertion.java:186) at com.eviware.soapui.impl.wsdl.teststeps.WsdlMessageAssertion.assertResponse(WsdlMessageAssertion.java:164) at com.eviware.soapui.impl.wsdl.teststeps.RestTestRequest.assertResponse(RestTestRequest.java:150) at com.eviware.soapui.impl.wsdl.teststeps.RestTestRequest.setResponse(RestTestRequest.java:141) at com.eviware.soapui.impl.support.panels.AbstractHttpRequestDesktopPanel.afterSubmit(AbstractHttpRequestDesktopPanel.java:606) at com.eviware.soapui.impl.wsdl.panels.teststeps.RestTestRequestDesktopPanel.afterSubmit(RestTestRequestDesktopPanel.java:365) at com.eviware.soapui.impl.wsdl.WsdlSubmit.notifyListenersAfterSubmit(WsdlSubmit.java:111) at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:157) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:835)Solved2.1KViews0likes4CommentsNullPointerException for running threads with 'Run TestCase' step
I am using SoapUI Basic 5.2.1 for testing SOAP APIs using threads to call 'Run TestCase' step through groovy script . I got a test case (Primary) where I have written a groovy script for data reading through external file, reading each row and setting it into properties of 'Run TestCase' step in my primary test case. 'Run TestCase' step executes target testcase which contains certain SOAP requests.I am using threads from ExecutorService to call target test case and 'Run TestCase' step is set to execute it with isolated copy for each run through its setting. During execution i see some of my threads miss to log output from my target test case and I get an exception which doesn't provide any message or stacktrace . Within my thread process i am using 'testRunner.runTestStepByName("Run TargetTestCase") ' to execute. I referred in community posts for any such concerns but didn't get any satisfactory results. I tried various options of executing this but all ends up with same issue. I checked with previous versions of SoapUI to see if issue is pre-existing and i see same issue in those as well. Surprisingly i got related error log with v5.1.3 as given below. Please let me know if we can get it sorted out. Wed Jun 15 15:20:47 IST 2016:ERROR:java.lang.NullPointerException java.lang.NullPointerException at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.notifyBeforeRun(AbstractTestCaseRunner.java:296) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:111) 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 java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Wed Jun 15 15:20:47 IST 2016:ERROR:java.lang.NullPointerException java.lang.NullPointerException at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.notifyBeforeRun(AbstractTestCaseRunner.java:296) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:111) 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 java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Wed Jun 15 15:20:47 IST 2016:ERROR:java.lang.NullPointerException java.lang.NullPointerException at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.notifyAfterRun(AbstractTestCaseRunner.java:279) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalFinally(AbstractTestCaseRunner.java:176) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalFinally(AbstractTestCaseRunner.java:46) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:150) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Wed Jun 15 15:20:47 IST 2016:ERROR:java.lang.NullPointerException java.lang.NullPointerException at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.setVariable(SoapUIGroovyScriptEngine.java:147) at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase.runTearDownScript(WsdlTestCase.java:894) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTearDownScripts(AbstractTestCaseRunner.java:186) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalFinally(AbstractTestCaseRunner.java:171) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalFinally(AbstractTestCaseRunner.java:46) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:150) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Thanks,922Views0likes0CommentsNullPointerException when adding a custom property after adding a Data Sink
I'm currently developing a test suite in Ready! API 1.2.2, when i noticed that i wasn't able to add custom properties to anything (The project, test suite, test steps etc.). This happened after i added a Data Sink and set DataSink to Groovy. Doing this resulted in ajava.lang.NullPointerException.Creating a new Project, Test Suite, Test Case and adding a Data Sink with Groovy does not reproduce the exception. However, tracking down the error, I was able to produce a very minimal project.This project is stripped down froma much larger project, that i won't be able to share. The excessive line breaks are produced by Ready! API, thus, they were not there, when istripped down the project. Removing the data sink makes it possible to add custom properties again. Edit: Sorry about the smileys, but they are added automatically. <?xml version="1.0" encoding="UTF-8"?> <con:soapui-project id="7e24385f-8a4f-4a20-890d-42a90b1b6dae" activeEnvironment="Default environment" name="NPE project" resourceRoot="${projectDir}" scriptLibrary="" soapui-version="6.0.0" xmlns:con="http://eviware.com/soapui/config"><con:settings/><con:testSuite id="5ceb7db7-d4f1-4476-9380-981d9ff7155f" name="Scenarier"><con:settings/><con:runType>SEQUENTIAL</con:runType><con:testCase failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="UTIL_CreateSessions" searchProperties="true" id="5522cd35-d557-4a87-877e-7159d8471716" disabled="true"> <con:settings> <con:setting id="d834a5f9-5534-4ee1-b86b-6377c41042eafileName">CreateSessions</con:setting> </con:settings> <con:testStep type="datasink" name="DataSink" id="ad576220-bbbd-401d-b56c-5f48b322443e"><con:settings/><con:config xsi:type="con:DataSinkStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:dataSink type="Groovy"><con:configuration><script/></con:configuration></con:dataSink><con:properties/></con:config></con:testStep><con:properties> </con:properties> <con:reportParameters/> </con:testCase><con:properties/><con:reportParameters/></con:testSuite><con:requirements/><con:properties/><con:wssContainer/><con:databaseConnectionContainer/><con:oAuth2ProfileContainer/><con:reporting><con:reportTemplates/><con:xmlTemplates/><con:xmlTemplates/><con:parameters/><con:parameters/></con:reporting><con:reporting/><con:authRepository/></con:soapui-project> The Stack Trace looks like this: java.lang.NullPointerException at java.util.Arrays$ArrayList.<init>(Unknown Source) at java.util.Arrays.asList(Unknown Source) at com.eviware.soapui.impl.wsdl.teststeps.WsdlDataSinkTestStep.getPropertyExpansions(WsdlDataSinkTestStep.java:356) at com.eviware.soapui.model.propertyexpansion.PropertyExpansionUtils.getPropertyExpansions(PropertyExpansionUtils.java:256) at com.eviware.soapui.model.propertyexpansion.PropertyExpansionUtils.getPropertyExpansions(PropertyExpansionUtils.java:272) at com.eviware.soapui.model.propertyexpansion.PropertyExpansionUtils.getPropertyExpansions(PropertyExpansionUtils.java:272) at com.eviware.soapui.model.propertyexpansion.PropertyExpansionUtils.getPropertyExpansions(PropertyExpansionUtils.java:272) at com.eviware.soapui.model.propertyexpansion.PropertyExpansionUtils.renameProperty(PropertyExpansionUtils.java:226) at com.eviware.soapui.impl.wsdl.AbstractTestPropertyHolderWsdlModelItem.renameProperty(AbstractTestPropertyHolderWsdlModelItem.java:127) at com.eviware.soapui.impl.wsdl.panels.teststeps.support.DefaultPropertyHolderTableModel.setValueAt(DefaultPropertyHolderTableModel.java:108) at javax.swing.JTable.setValueAt(Unknown Source) at javax.swing.JTable.editingStopped(Unknown Source) at javax.swing.AbstractCellEditor.fireEditingStopped(Unknown Source) at javax.swing.DefaultCellEditor$EditorDelegate.stopCellEditing(Unknown Source) at javax.swing.DefaultCellEditor.stopCellEditing(Unknown Source) at javax.swing.JTable$GenericEditor.stopCellEditing(Unknown Source) at javax.swing.plaf.basic.BasicTableUI$Actions.actionPerformed(Unknown Source) at javax.swing.SwingUtilities.notifyAction(Unknown Source) at javax.swing.JComponent.processKeyBinding(Unknown Source) at javax.swing.JTable.processKeyBinding(Unknown Source) at javax.swing.JComponent.processKeyBindings(Unknown Source) at javax.swing.JComponent.processKeyEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source) at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source) at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source) at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source) at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$200(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)588Views0likes0Comments