Forum Discussion
Use the point and click feature (right-click > Get data) feature to create the property to another testcase:
- tomaszarmata11 years agoContributor
I mean "right-click" while writing "PPM". So that is what I mentioned and what is not satysfying me.
- GillerM11 years ago
Staff
So if you're not looking at other testcase by name, there should still be some way to reference where you want to get your property value. There's another option of browsing to a testcase by position / order in the project. Here's sample code in Groovy step to do that:
// browse up to project object def proj = testRunner.getTestCase().getTestSuite().getProject() // now browse to positional testcase property by name def propValue = proj.getTestSuiteAt(0).getTestCaseAt(1).getProperty("propertyName") // now browse to positional testcase property by position def propPosition = proj.getTestSuiteAt(0).getTestCaseAt(1).getPropertyAt(0)If that still does not satisfy you, then please be very explicit in what you are trying to achieve. Also in how exactly you look to impletement what you are trying to achieve.
- jbuttimer11 years agoContributor
This is the correct way to do this. You should be able to go all the way up the tree to the top folder and pick up the data anywhere along the way.
If you do not find this to your liking, I wrote a simple groovy script that grabbed the data I needed for other test cases and suites and wrote it to the Global Variable table. Preferences/Global Variables Then I can pick it up from anywhere by grabbing it from the Global Variable list.
You didn't say which version you are using which would be helpful. I have ReadyAPI! v 1.4.1 Pro version.
- tomaszarmata11 years agoContributor
I have 1.4.1 SoapUI NG Pro.
Im trying to fill up headers in REST Request test step by "right-click" > "Get Data". And I dont like this static reference like:
${#[TestSuite1#TestCase1]#TestCase1Property1}Becouse when I rename testSuite to TestSuite2 I have to change that path in all my testCase REST Requests steps.
Additional groovyScript steps or propertyTransfer can help I think but its not what will make me happy a lot ;)
But if soapUI do not provide little more dynamic way to do this I will do what You suggested.