1

I have a question regarding **writing test for HTTP DELETE method in JMeter using Concurrency Thread Group**. I want to measure **how many DELETEs** can it perform in certain amount of time for certain amount of Users (i.e. Threads) who are sending Concurrent HTTP (DELETE) Requests.

Concurrency Thread Group parameters are:
Target Concurrency: 50 (Threads)
RampUp Time: 10 secs
RampUp Steps Count: 5 secs
Hold Target Rate Time (sec): 5 secs
Threads Iterations Limit: infinite

The thing is that HTTP DELETE is idempotent operation i.e. if inovked on same resource (i.e. Record in database) it kind of doesn't make much sense. How can I achieve deletion of multiple EXISTING records in database by passing Entity's ID in URL? E.g.:

http://localhost:8080/api/authors/{id}

...where ID is being incremented for each User (i.e. Thread)? My question is how can I automate deletion of multiple EXISTING rows in database (Postgres 11.8)...should I write some sort of script or is there other easier way to achieve that? But again I guess it will probably perform multiple times same thing on same resources ID (e.g. HTTP DELETE will be invoked more than once on http://localhost:8080/api/authors/5).
Any help/advice is greatly appreciated.

P.S. I'm doing this to performance test my SpringBoot, Vert.X and Dropwizard RESTful Web service apps.

UPDATE1:
Sorry, I've didn't fully specify reason for writing these Test Use Case for my Web Service apps which communicate with Postgres DB. MAIN reason why I'm actually doing this testing is to test PERFORMANCES of blocking and NON-blocking WEB Server implementations for mentioned frameworks (SpringBoot, Dropwizard and Vert.X). Web servers are:

  1. Blocking impelementations:
    1.1. Apache Tomcat (SpringBoot)
    1.2. Jetty (Dropwizard)
  2. Non-blocking: Vert.X (uses own implementation based on Netty)

If I am using JMeter's JDBC Request in my Test Plan won't that actually slow down Test execution?

NikolaS
  • 503
  • 2
  • 8
  • 20
  • You can use CSV Data Set Config with file with id in each line – Ori Marko Aug 12 '20 at 10:29
  • Thank you for suggestion, but can you please provide some kind of example which demonstrates use of it? I've never worked with it and have little experience with JMeter. – NikolaS Aug 12 '20 at 10:34

1 Answers1

1

The easiest way is using either Counter config element or __counter() function in order to generate an incrementing number on each API hit:

enter image description here

More information: How to Use a Counter in a JMeter Test

Also the list of IDs can be obtained from the Postgres database via JDBC Request sampler and iterated using ForEach Controller

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • Hi Dmitri, thank you for your suggestion -> that is something I'm actually looking for. :) One more question though: Won't writing *JDBC Request* sampler actually slow down execution of my Test Plan (I've updated my question under **UPDATE1** section)? Can't I just specify in *Counter* Config Element certain starting Value for known number existing ID in Database and set some MAXIMUM value and see in my test execution HOW many samples will be deleted...or HttpRequests are run in Concurrency Thread Group UNTIL they ALL are DONE (hope that makes sense)? Thank you in advance. – NikolaS Aug 14 '20 at 09:07
  • My last question in 1st comment was in case in which I'm NOT using ForEach Controller. – NikolaS Aug 14 '20 at 09:24
  • I've managed to solve my issue by using **Counter Config element** which I'm setting to start from custom value and leave out *Max* field empty. Still I am concerned will writing JDBC Request sampler actually **slow down execution** of my Test Plan (I've updated my question under UPDATE1 section so you can understand it better)? – NikolaS Aug 14 '20 at 16:55