Forum Discussion
Hi,
So, just to understand exactly what you are trying to do, do you:
1. Create a property (projectname) at Project level = the random number expression
2. Make a request using a TestStep using the 'projectname' property
3. validate the name using the 'propjectname' property
?
If its something like this, then I would try creating and storing the 'projectname' property at TestCase level in the context holder - does this make sense?
So, something like this:
In a TestCase:
1. Groovy TestStep:
context["projectname"]=TestProject#${=(int)(Math.random() * 90000 + 10000)}
2.Make request using 'projectname' property
3.Validate using the 'projectname' property
I'm not sure if this is what you meant, but this way the projectname property should be the same for each run of the TestCase.
Sorry if I got the wrong end of the stick!
Cheers,
Rupert
Related Content
Recent Discussions
- 7 days agoemoya