Quantcast
Channel: New board topics in SmartBear Community
Viewing all articles
Browse latest Browse all 21061

java.lang.NullPointerException when testRunner.runTestStepByName("StepName") used

$
0
0

Hi,  I am getting java.lang.NullPointerException when I used testRunner.runTestStepByName("Update"+requiredField[j]) to run a specific step.  The script able to execute the step in test case but through error.

 

Here the copy of script

 

 

import com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner

ArrayList ar = new ArrayList()
jdbcXml = context.expand('${JDBCRequestForCheckingCommandPropertyID#ResponseAsXml}')
def root = new XmlSlurper().parseText(jdbcXml)
root.ResultSet.Row.each{row->
ar.add(row["COMMANDPROPERTYID"].toInteger())
}

ArrayList requiredField = new ArrayList()
requiredField.add(61)
requiredField.add(276)
requiredField.add(605)

	for (j=0; j<requiredField.size();j++)
	{	
		if (ar.contains(requiredField[j]))
		{	
			testRunner.runTestStepByName("Update"+requiredField[j])
		}
		else
		{   
			testRunner.runTestStepByName("Add"+requiredField[j])
		}
	}

Regards,

 

 

 


Viewing all articles
Browse latest Browse all 21061

Trending Articles