Forum Discussion
PM_r
Staff
13 years agoHi!
You can insert a Groovy TestStep before the SQL query, containing this code:
This will convert MY_VALUE (from GetBoxNum#Box) to %MY_VALUE% and store it in a TestCase Property called boxWithPercentageSigns.
Let me know if this helps!
Henrik O
SmartBear Software
MGS10319 wrote: Is there a syntax I can use in the query to use this value and encapsulate in '%...%' or might I need some Groovy script to perform string manipulation?
You can insert a Groovy TestStep before the SQL query, containing this code:
box = "${GetBoxNum#Box}" // extract the Property to a Groovy variable
box = "%$box%" // manipulate the string
testRunner.testCase.setPropertyValue( "boxWithPercentageSigns", box) // store as a TestCase Property
This will convert MY_VALUE (from GetBoxNum#Box) to %MY_VALUE% and store it in a TestCase Property called boxWithPercentageSigns.
Let me know if this helps!
Henrik O
SmartBear Software