Search code examples
jdbcjmeterqregularexpression

JMeter: Regular expression extractor gets the name of the column after JDBC request returned data


I faced some issue: I use JDBC request for selecting usernames data and reuse it in the login request The JDBC request returns correct data from the table enter image description here

enter image description here

But the issue that my login request uses the column name as data, so it tries to login with the username businessId instead of the correct one. So when randomly JDBC request returns the first row which is businessId value the test returns 401 error.

enter image description here

Do you have any ideas on how can I get the correct values within JDBC request or extract values without column name?


Solution

  • Actually, the problem was in the column name which was included in the businessId results. So my JDBC Request returned the values including the column name and the column name was stored as the businessId value. For solving the issue I use ForEach Controller where Input Variable Prefix: businessId and Output variable name: currentId