Stony
16 years agoNew Contributor
How to create Property Transfers in the Java API
Hi.
I've had the pleasure to work with SoapUI for some time now, and I now need to make some java-code to autogenerate some SoapUI projects based on some XML input.
Doing that I also need to create some property transfers, and I think I've got the code right, but for some reason I only get an empty Property Transfer in the final SoapUI project.
===== code snippet start =====
TestStepConfig transferStepConfig = new PropertyTransfersStepFactory().createNewTestStep(testCase, "cfg");
PropertyTransfersTestStep transferStep = (PropertyTransfersTestStep)testCase.addTestStep("transfer", "InitValues");
transferStep.setConfig(transferStepConfig);
transferStep.afterLoad();
PropertyTransfer currentTransfer = transferStep.addTransfer("Property Transfer"+ counter);
currentTransfer.setSourceStepName(sourceTestStepName);
currentTransfer.setSourcePropertyName("Response");
currentTransfer.setSourcePath("");
currentTransfer.setTargetStepName(targetTestStepName);
currentTransfer.setTargetPropertyName("Request");
currentTransfer.setTargetPath("");
===== code snippet end =====
What am I missing?
Oh, and on a sidenote. I've got a Pro license, but how do I upgrade my account here to get the advantages of that?
I've had the pleasure to work with SoapUI for some time now, and I now need to make some java-code to autogenerate some SoapUI projects based on some XML input.
Doing that I also need to create some property transfers, and I think I've got the code right, but for some reason I only get an empty Property Transfer in the final SoapUI project.
===== code snippet start =====
TestStepConfig transferStepConfig = new PropertyTransfersStepFactory().createNewTestStep(testCase, "cfg");
PropertyTransfersTestStep transferStep = (PropertyTransfersTestStep)testCase.addTestStep("transfer", "InitValues");
transferStep.setConfig(transferStepConfig);
transferStep.afterLoad();
PropertyTransfer currentTransfer = transferStep.addTransfer("Property Transfer"+ counter);
currentTransfer.setSourceStepName(sourceTestStepName);
currentTransfer.setSourcePropertyName("Response");
currentTransfer.setSourcePath("");
currentTransfer.setTargetStepName(targetTestStepName);
currentTransfer.setTargetPropertyName("Request");
currentTransfer.setTargetPath("");
===== code snippet end =====
What am I missing?
Oh, and on a sidenote. I've got a Pro license, but how do I upgrade my account here to get the advantages of that?