The JDBC Jmeter request parameter passing 2--

Recent work needs to query the database across servers, Internet search, some method, is more complex. Jmeter suddenly thought of JDBC request, then it took two hours to review and test the feasibility, to meet the simple cross-server query it.

First, add a thread group

JDBC Second, the connection configuration server 1

1, 1 is added to the JDBC connection configuration server

 

JDBC 2, a connection configuration server

 

JDBC three, requests the server 1

1, a request to add the JDBC server

 

 

 2, the configuration server 1 requests JDBC

 

 

 3, add Debug Sampler and look at the result tree

 

4, view server JDBC 1 requests parameters and return results

 

 

 We now want to use is to check out the result, because it is more data, we accessed through standard form under $ {ryid_1}, $ {ryid_2}, ...... corresponding data. The next step is to these parameters in the query to the server 2

Fourth, the server connection configuration JDBC 2

1, adding JDBC connection configuration server 2

2, the server connection configuration JDBC 2

 

Fifth, the server requests JDBC 2

1, add and configure counter

 

 

2, and adding configure the server 2 requests JDBC

 

 3, and adding configure cycler

Because of this there is a plurality of parameters script executed for multiple times, the server 2 requests in a JDBC added to make the upper loop controller can loop execution sql

 

 4, to ensure that the counter and the server 2 requests the JDBC inside the loop of the controller, as shown below:

 

 

Sixth, view the execution results

 

 Such a relatively simple cross-server database query is complete

 

Guess you like

Origin www.cnblogs.com/vivage212/p/12587681.html