Reputation: 31
We are executing SQL queries on Jmeter JDBC request and able to get proper response on executions. However, our project team would like to see row count of each execution in result reports along with elapsed time, latency etc.
How to get row count for a sql query executed in JDBC request in Jmeter? Also, how to get the row count value appended to columns in Summary report.csv file?
Upvotes: 2
Views: 2059
Reputation: 168072
With regards to row count - you already have it. I.e. in the below setup I defined the result variable myVar
When my query is being executed JMeter stores the number of returned rows into myVar_#
variable
Now if I want to display the variable within the .jtl results file I need to add the following line to user.properties file:
sample_variables=myVar_#
Next time I run my JMeter test in command-line non-gui mode like:
jmeter -n -t test.jmx -l result.csv
I see the number of rows returned by the SQL query in the myVar_#
column:
References:
Upvotes: 1