1

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

  • 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
2

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.