![]() Query: In this section, you can write down the SQL statement which is used to perform the operation before the sampler executes.Query Type: Choose the type of SQL query statement like Select, Update, Callable, Commit, Rollback etc.Variable Name of Pool declared in JDBC Connection Configuration: The name of the connection pool given in the JDBC Connection Configuration.Comments : To provide arbitrary comments (if any).Name : To provide the name of the preprocessor.‘JDBC PreProcessor’ has the following input fields: What are the input fields of the ‘JDBC PreProcesso’ element? ![]() Select the appropriate element where you want to fetch the data.Run the test and see the result Figure 04 How to add ‘JDBC PreProcessor’? Write down the SQL statement inside SQL Query section Figure 03 Figure 01Īdd JDBC PreProcessor under the sampler for which you need data from the database. For this purpose, you need to add JDBC Connection Configuration element under Test Plan (if you have more than 1 thread and use the same database configuration). To use JDBC PreProcessor in the script, firstly you need to set-up the JDBC connection with the database. Once you add JDBC PreProcessor under cancel request, it executes the select query to fetch orderID and then pass this value to cancel request sampler. So, your approach would be to get the orderID using customerID from the database and send the order cancel request. The order number is available in the database against customerID. Consider you have a performance testing scenario where a customer needs to cancel the existing order. In JMeter, JDBC PreProcessor is used to fetch the data from the database which can be used in the sampler’s request.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |