electric_Insura
14 years agoContributor
[Resolved]Newb needs a primer in property handling w/Groovy
Hi all,
Need some help getting started with Groovy and properties. I read the user guide and some other posts but that didn't get me very far.
My test case contains:
1) A Property step with a property named "randomValue"
2) A Groovy Script step with the following code:
The Groovy script returns a count of 0.
Why isn't it seeing the property from the Property step? Do I need some sort of transfer?
Ultimately I'm trying to do something like this:
I tried this using code from some other posts, but I get an error that randomValue isn't defined.
Need some help getting started with Groovy and properties. I read the user guide and some other posts but that didn't get me very far.
My test case contains:
1) A Property step with a property named "randomValue"
2) A Groovy Script step with the following code:
testRunner.testCase.getPropertyCount()
The Groovy script returns a count of 0.
Why isn't it seeing the property from the Property step? Do I need some sort of transfer?
Ultimately I'm trying to do something like this:
///pseudocode follows
[define a property named randomValue]
def randomNumber = 100000000 + (int)(Math.random()*900000000)
randomValue.value = randomNumber
I tried this using code from some other posts, but I get an error that randomValue isn't defined.