Contributions
SoapUI Pro Command-Line: Can I pass in test case properties directly instead of through prop files?
It appears that only project level properties can be passed in directly via the command-line. It doesn't appear that test case properties can be passed in directly from the command-line. It appears that to update test case properties you have to create a property file then pass that file into the command-line with the system parameter. Can anyone confirm if there is a way to pass in test case properties directly without having to create the property file? I'm in a unique situation where we have an external data source so all of our SoapUI test cases have a data ID that is added as a test case property. We are going to automate the execution of our tests via Jenkins which will call the SoapUI tests from the command-line. It appears I'm going to have to create hundreds of property files with all of the various data IDs, store those in source control, then reference those property files within the Jenkins job's SoapUI command-line call. Isn't there an easier way to do this and update test case properties directly from the command-line without the property files? :) Michelle10 years agoPlace ReadyAPI QuestionsReadyAPI Questions788Views0likes1CommentRe: How do I get property transfer step information via Groovy?
Oh! Yes, I see. You are right. I don't need to use PropertyTransferTestStep at all. I didn't notice those property inherited methods for teststep on the documentation. So this works just fine, which I will shortly change to be a loop. def propTxfr = tStep.getTransferAt(0) log.info "GetName: " + propTxfr.getName() log.info "GetSourcePath: " + propTxfr.getSourcePath() log.info "GetSourcePropertyName: " + propTxfr.getSourcePropertyName() log.info "GetSourceStepName: " + propTxfr.getSourceStepName() log.info "GetTargetPath: " + propTxfr.getTargetPath() log.info "GetTargetPropertyName: " + propTxfr.getTargetPropertyName() log.info "GetTargetStepName: " + propTxfr.getTargetStepName() Many, many thanks!1.9KViews0likes0CommentsRe: How do I get property transfer step information via Groovy?
Paul - Thank you so much for the tip! I sincerely appreciate it! By any chance do you have further knowledge on that class? I wrote the following basic steps. I can tell that my test case is grabbing properly. When I log the tStepConfig it also has all of the configuration for the test step, including my property transfer that is on the step. However,something is not right with the PropertyTransfersTestStep because I get a null pointer exception when I try to get the count of the transfers. import com.eviware.soapui.impl.wsdl.teststeps.PropertyTransfer import com.eviware.soapui.impl.wsdl.teststeps.PropertyTransfersTestStep def tCase = testRunner.testCase.testSuite.testCases[testRunner.testCase.name] def tStep = tCase.testSteps["PropertyTransfer"] def tStepConfig = tStep.getConfig() def propTxfrTestStep = new PropertyTransfersTestStep(tCase,tStepConfig,false) log.info tCase.name log.info tStepConfig log.info propTxfrTestStep.getTransferCount()1.9KViews0likes0CommentsHow do I get property transfer step information via Groovy?
Hi - I'm looking for examples using PropertyTransfer and I don't see any that are working for me. I want to grab information on the Property Transfer test step I have via Groovy. Below is just a very scaled down script as an example. I have a Property Transfer test step with just one transfer within it. When I run the script below, everything is null. I assume it's because there can be more than one transfer within a Property Transfer test step. However, I don't see a way to pass in the index into any of the methods. I also don't see anything that would allow me to iterate through the various transfers within the Property Transfer test step (i.e. something like: for (def prop in propTxfr()) or any methods that bring back a 'list' of transfers. Does anyone know how to do this? import com.eviware.soapui.impl.wsdl.teststeps.PropertyTransfer def tCase = testRunner.testCase.testSuite.testCases[testRunner.testCase.name] def tStep = tCase.testSteps["PropertyTransfer"] def propTxfr = new PropertyTransfer(tStep) log.info "GetName: " + propTxfr.getName() log.info "GetSourcePath: " + propTxfr.getSourcePath() log.info "GetSourcePropertyName: " + propTxfr.getSourcePropertyName() log.info "GetSourceStepName: " + propTxfr.getSourceStepName() log.info "GetTargetPath: " + propTxfr.getTargetPath() log.info "GetTargetPropertyName: " + propTxfr.getTargetPropertyName() log.info "GetTargetStepName: " + propTxfr.getTargetStepName()2.1KViews0likes7Comments[Resolved] Getting "Run TestCase" options from API
Hi - I'm wondering if it's possible to get the "Run TestCase" test step options selected via the API? Specifically, I'd like to grab the properties that the user would like returned from the called test. I've perused the API documentation thinking maybe it would be part of settings, but it doesn't appear to be. I can't get anything to popup in searches. Would it be possible just to point me to the right API document? Michelle10 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.1KViews0likes2CommentsRe: Run TestCase from Groovy isn't returning properties
This turned out to be two issues: 1) Problems with our code. 2) In all the tweaking we'd done we'd been changing all kinds of settings trying to get it to work. The run selection for the "Run TestCase" options needs to be set at : "Run primary TestCase (wait for running to finish, Thread-Safe)". Since we're executing all of the steps via Groovy, this option needs to be set in order for it to properly wait for it to be finished.1.1KViews0likes0CommentsRe: Run TestCase from Groovy isn't returning properties
It doesn't look like it's the .cancel that is preventing the properties from returning to the calling test. I put a final step in the test that is just a Groovy test step called 'End'. There is nothing in it. Instead of doing testRunner.cancel, I did testRunner.gotoStepByName("End") to skip to the end after it executes them all through the Groovy step. Even after removing the testRunner.cancel, the properties are still not being returned to the calling test. Should executing a "Run TestCase" step via Groovy return the properties? Is there something I'm not doing correctly in the call to the step?1.1KViews0likes0Comments