0

I got a job to do load testing on database. The problem is I have 3 queries that need to run one after another to get the result as below sequence.

  1. UPDATE db_swim_dev.ios_upgrade_css_site_selection SET pre_check='PROCESSING' WHERE id='Dynamic Value need to fetch from CSV';
  2. INSERT INTO db_swim_dev.tbl_ios_css_checks (id, hostname, r0_state, r1_state, device_type, version, issu_ready, licence_advancedmetroipaccess, licence_status, device_model, software_state, cust_special, power_state, fan_state, output, ios_image_update, job_id, site_master_id, rcount, mmcblk0) VALUES ('', 'dynamic value need to fetch from CSV', '', '', '920o', 'V156_2_SP_SR680887239_8', '0', '0', '1', '0', '0', '0', '0', '0', 'a:3:{s:11:\"device_type\";s:4:\"920o\";s:14:\"licence_status\";i:1;s:7:\"mmcblk0\";i:0;}', '0', '246', '19442', '0', '0');
  3. UPDATE db_swim_dev.ios_upgrade_css_site_selection SET pre_check='FAILED' WHERE id='Dynamic value need to fetch from CSV';

I am not sure how to do that. I tried to run all the queries together getting an error. If anyone has encountered the same scenario please let me know how to make this work.

1
  • Are the 3 queries independent? Or does the next query depend for input on result of the previous query? Commented Nov 26, 2022 at 5:07

2 Answers 2

0

By JMeter's design you can run only one query with one JDBC Request sampler.

So if you need to execute 3 queries and measure the cumulative time just put them under Transaction Controller like:

  • Transaction Controller
    • JDBC Request 1
    • JDBC Request 2
    • JDBC Request 3
0

In Jmeter we can follow the below steps:

  1. Add test plan

  2. Add JDBC Connection Configuration from config elements under test plan

  3. Configure DB connections in JDBC Connection

  4. Add Thread Group from under test plan

  5. Assign the no. of samples and no. of user in Thread group as we want to run how many time we require to run request/ query

  6. Add HTTP request if you want to pass http/https request under Thread Group

  7. Add JDBC request under Thread Group

  8. We can write the query in JDBC request and execute the same

  9. Click on run test button => test will execute as no. of mentioned in thread group.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.