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
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It only takes a minute to sign up.
Sign up to join this communityDepending 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 to Prepared 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.