I've been reading through the forums, the Apache JMeter guide, and BlazeMeter's The Real Secret to Building a Database Test Plan With JMeter and Using JDBC Sampler In JMeter, but I'm still kind of lost.
I need to issue a query to extract an Obj ID value from a table and pass that value into an HTTP READ Request. I've done the following setup:
JDBC Request
Variable Name: Pool-1
Query Type: Select Statement
Query: select distinct ObjId from dbo.CommonRuleSet where Name like '%ABC%';
Param. values:
Param. types:
Variable names: abcObjId
Result variable name: abcCommonRule = vars.getObject("resultObject").get(0).get("ObjId");
Query Timeout (s): 5000
Handle Result Set: Store as Object
When executed results in:ObjId
1136682203
I'm trying to figure out how to pass in this ObjId value as a variable to append the URL.
HTTP REQUEST
database:port/applicationServer/../../crud/CommonRuleSet/????
I've tried appending using:
- the Variable names value: ${abcObjId}
- the Result Variable Name: ${abcResult}
Each time, JMeter is not translating the variable resulting in a parser error.
(e.g., http://database:port/.../.../.../crud/CommonRuleSet/
${abcResult}
)
I'm just not understanding how to take the results of my successful query and pass it as a variable to an HTTP Request. Any insight/enlightenment is much appreciated!