How to use xpath reference name in JDBC request?below configuration i have tested but its not working. Is there any way to get this xml value[prodcutid] in to SQL Query?
Jmeter DB Request
XPATH Extractor
XML
1 Answer 1
Depending on your id
column type you can do it in 2 ways:
If
id
is VARCHAR type you will need to surround${Productid}
reference with quotation marks like:`SELECT * FROM prodcut WHERE id = '${productid}'
If
id
is INTEGER type you will need to switch toPrepared Select Statement
like:
Also according to documentation
Variables, functions (and properties) are all case-sensitive
so ${productid}
and ${Productid}
are different variables so please make sure that definition and all references are in line.
See Building a Database Test Plan and Debugging JDBC Sampler Results in JMeter articles for more information on implementing database testing using JMeter.
-
If id is BIGINT in prepared select statement, error message given --> For input string: "${productid}". how to fix this? sqa.stackexchange.com/questions/27605/…lak– lak2017年06月05日 12:18:38 +00:00Commented Jun 5, 2017 at 12:18
Explore related questions
See similar questions with these tags.