How to Use JDBC PostProcessor(using Jmeter Variable) in Jmeter with Response assertion(using Jmeter Variable).Provide me with example..

closed as too broad by IAmMilinPatel, NarendraC, Bharat Mane, ECiurleo, Yu Zhang Feb 13 '17 at 19:05

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • I think you need to better articulate what your problem is and what issue you want to overcome. In its current format it sounds more like you are asking for people to perform the development for you.. – ECiurleo Feb 13 '17 at 15:51

For example, we have the following table:

mysql> describe city;
| Field       | Type     | Null | Key | Default | Extra          |
| ID          | int(11)  | NO   | PRI | NULL    | auto_increment |
| Name        | char(35) | NO   |     |         |                |
| CountryCode | char(3)  | NO   | MUL |         |                |
| District    | char(20) | NO   |     |         |                |
| Population  | int(11)  | NO   |     | 0       |                |
5 rows in set (0.01 sec)

And you are executing some query against it, i.e. getting all the information on 2 random cities:

select * from city order by rand() limit 2;

You need to configure JMeter like:

JMeter JDBC Configuration

Pay attention to the Variable names stanza

So when you execute the request, it will return raw data like:

JDBC Raw data

But given you defined variable names, you will have the following JMeter variables:

  • ID_1 with the value of 725
  • ID_2 with the value of 3077
  • Name_1 with the value of Randburg
  • Name_2 with the value of Bremen
  • etc.

JDBC Variables JMeter

See Debugging JDBC Sampler Results in JMeter article for more details on working with JDBC Test elements output

  • Excellent Dimitri T nicely explained it. Thank you very much..!! – lak Feb 14 '17 at 15:26

Not the answer you're looking for? Browse other questions tagged or ask your own question.