среда, 9. октобар 2013.

How to extract value from JDBC response - Jmeter

Jmeter Example - How to extract value from JDBC response

In this post I will explain how to extract an element from the JDBC response using the Regular Expression Extractor and store it in a variable which can be referred from further requests.

1) Create JDBC request in your Jmeter Test Plan and enter your SQL querry. For example:

                 Select ID from USER where USERNAME='DRAGAN'
     


        
 JDBC Response should look as on the picture bellow:


 2) Add Regular Expression Extractor to JDBS requests as it shown on the picture bellow:


Value 45621 should be stored in the variable userId, and you can use this variable in furher requests.

Нема коментара:

Постави коментар