Forum Discussion

minu_cet's avatar
minu_cet
Occasional Contributor
6 years ago

Getting error com.eviware.soapui.impl.wsdl.teststeps.PropertyTransfer.readSourceValue

Hi,

 

I have written Customized code to run SOAPUI Test Suites and publish result.

The Code is working fine for HHTP Steps and Property Transfer related to XPath.

But when same Code was ran against REST Steps and Property Transfer step related to JSONPath. Then getting error.

 

SOAPUI Version 5.3.0

Java Version 1.7

POM details

<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/com.jayway.jsonpath/json-path -->
<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path</artifactId>
<version>2.2.0</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui-maven-plugin</artifactId>
<version>5.1.0</version>
</dependency>

<repositories>
<repository>
<id>smartbear</id>
<name>smartbear repository</name>
<url>http://smartbearsoftware.com/repository/maven2</url>
</repository>
</repositories>

 

PropertyTransfer for JSONPath where Source is RestStep Response and Target is TestSuite Property

Test Case is run using TestCase Runner

TestCaseRunner runner = testCase.run(new PropertiesMap(), false);

 

Then this Method captures Property Transfer Result details

public void runPropertyTransfer(PropertyTransferResult transferresult)
{
for (int c = 0; c < transferresult.getTransferCount(); c++) {
PropertyTransferConfig transfer = transferresult.getTransferAt(c);
stepRequest = stepRequest + "Transfer name: " + transfer.getName() + " Source Step: " + transfer.getSourceStep() + " Source Property: " + transfer.getSourceType() + " Source Path: " + transfer.getSourcePath() + " Type : " + transfer.getType() +
" Target Step: " + transfer.getTargetStep() + " Target Path: " + transfer.getTargetPath() + " Tagert Property: " + transfer.getTargetType() + "\n";
stepResponse = stepResponse + "Transfer name: " + transfer.getName() + " Transfer value: " + Arrays.toString(transferresult.getTransferredValuesAt(c)) + "\n";
}
execMillis = transferresult.getTimeTaken();
status = transferresult.getStatus().toString();
message = getErrorDetails(transferresult.getMessages());
}

 

Error : -

2018-03-20 11:25:15 - Exception during Test Execution
java.lang.NoClassDefFoundError: com/jayway/jsonpath/spi/JsonProvider
at com.eviware.soapui.impl.wsdl.teststeps.PropertyTransfer.readSourceValue(PropertyTransfer.java:345)
at com.eviware.soapui.impl.wsdl.teststeps.PropertyTransfer.transferProperties(PropertyTransfer.java:315)
at com.eviware.soapui.impl.wsdl.teststeps.PropertyTransfersTestStep.run(PropertyTransfersTestStep.java:125)
at com.eviware.soapui.impl.wsdl.teststeps.PropertyTransfersTestStep.run(PropertyTransfersTestStep.java:103)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:213)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:47)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:139)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:47)
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:592)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase.run(WsdlTestCase.java:77)

No RepliesBe the first to reply