JmeterJDBC Request的Query Type

JDBC Request

设置Variable Name为配置的数据库连接名称

SQL Query的Query Type主要包括:Select 、Update、Callable Statement、Commit、Rollback等。

一、多个查询语句(不使用参数的情况下)可以放在一起顺序执行,需要设置Query Type为:Callable Statement,然后顺序输入select语句,不用加go或者分号。如果Query Type设置为:Select Statement的话,只执行第一个SQL语句。

二、如果SQL语句中需要使用参数变量,那么Query Type 需要设置为:Select Statement ,需要先添加Random Variable,然后在Parameter Values中输入${变量名称},${变量名称};

在Paramter types中输入变量的数据类型。 如下图示:

中间用逗号分隔。只能执行第一个SQL语句。

对于Insert、Update、Delete语句,需要设置Query Type为:Update Statament.数据修改语句中可以使用参数,而且可以顺序执行多个修改语句。

原文地址:https://www.cnblogs.com/redb52/p/3240019.html