Home > Blockchain >  How to parameterize IN clause in SQL Query to use in JMETER
How to parameterize IN clause in SQL Query to use in JMETER

Time:03-02

I need to parametrize a SQL Query to use in JMETER such that every time it triggers, a random value is picked from the list of values to be used in IN clause.

Parent Query - Select * from Employee where Emp_Id in ( 3,9,11,12,13) and Dept_Name in('HR',IT','Admin','Audit')

Post the Parameterization when i trigger the Query through JDBC Request the request run for different user needs to have random selection made. Ex: Query 1 should be like - Select * from Employee where Emp_Id in ( 3,9) and Dept_Name in('HR',IT')

Query 2 should be like - Select * from Employee where Emp_Id in ( 11,12,13) and Dept_Name in('HR',IT','Admin')

I am trying to use CSV Data Set Config but not able to achieve the above output.

CodePudding user response:

First of all I would recommend reconsidering your whole approach because tests needs to be enter image description here

  • Related