Forum Discussion
hutabarat2014
12 years agoContributor
Hi Cizo89,
I tried your first solution, which is
testRunner.testCase.setPropertyValue("TestCaseCustomProperty1", testRunner.testCase.testSuite.project.getPropertyValue("ProjectCustomProperty1"))
and it works all right.
But, the thing is that when we want to have it at the top end (not writing in every single test case), how do we do that?
Perhaps I was not really clear.
Say, in the Project Property I have a property called IP_Address which contains value of 127.0.0.1.
Now, let's just say I got 200 Test Cases which use this project property of IP_Address.
Rather than going through each Test Case and write the groovy script like you mentioned above, is there a way to write a groovy script at a separate Test Suite (on top of the tree before any other Test Suites or Test Cases) that will populate every single property of IP_Address in each Test Case?
Having said that, also I would like to know than when a Test Case does not have currently a property called IP_Address, with this groovy script, we are able to create a new property, call it IP_Address and populate it with the value 127.0.0.1.
Is this a possible thing to do in SoapUI?
Much obliged.
Leo
I tried your first solution, which is
testRunner.testCase.setPropertyValue("TestCaseCustomProperty1", testRunner.testCase.testSuite.project.getPropertyValue("ProjectCustomProperty1"))
and it works all right.
But, the thing is that when we want to have it at the top end (not writing in every single test case), how do we do that?
Perhaps I was not really clear.
Say, in the Project Property I have a property called IP_Address which contains value of 127.0.0.1.
Now, let's just say I got 200 Test Cases which use this project property of IP_Address.
Rather than going through each Test Case and write the groovy script like you mentioned above, is there a way to write a groovy script at a separate Test Suite (on top of the tree before any other Test Suites or Test Cases) that will populate every single property of IP_Address in each Test Case?
Having said that, also I would like to know than when a Test Case does not have currently a property called IP_Address, with this groovy script, we are able to create a new property, call it IP_Address and populate it with the value 127.0.0.1.
Is this a possible thing to do in SoapUI?
Much obliged.
Leo