16 years ago
Java.Lan.NullPointer Exception Cannot invoke method :SetPropertyValue() error
Hi,
I'm currently new to SOAP UI PRO and evaluating it for my project.I tried executing the below groovy script but it throws an execption ,Java.Lan.NullPointer Exception Cannot invoke method :SetPropertyValue
do I need to set any class paths to make this script work?
log.info("In the WeatherTestCase Setup Script")
props = new java.util.Properties()
fis = new FileInputStream ("C:/Basic/testprops2.txt")
props.load (fis)
today = props.getProperty ( "today" )
zipCode = props.getProperty ( "zipCode" )
targetStep = testRunner.testCase.getTestStepByName( "Properties" )
// transfer all properties
targetStep.setPropertyValue( "startDate", today)
targetStep.setPropertyValue( "zipCode", zipCode)
log.info(today)
log.info(zipCode)
I'm currently new to SOAP UI PRO and evaluating it for my project.I tried executing the below groovy script but it throws an execption ,Java.Lan.NullPointer Exception Cannot invoke method :SetPropertyValue
do I need to set any class paths to make this script work?
log.info("In the WeatherTestCase Setup Script")
props = new java.util.Properties()
fis = new FileInputStream ("C:/Basic/testprops2.txt")
props.load (fis)
today = props.getProperty ( "today" )
zipCode = props.getProperty ( "zipCode" )
targetStep = testRunner.testCase.getTestStepByName( "Properties" )
// transfer all properties
targetStep.setPropertyValue( "startDate", today)
targetStep.setPropertyValue( "zipCode", zipCode)
log.info(today)
log.info(zipCode)