Java Web Services client: consistent load generation

467 views Asked by At

I have investigated both soapUI/loadUI and JMeter but I have settled on using my own custom-written Web Service client to perform both functional and performance testing. I have integrated Groovy so that test cases can be written without the need to recompile anything, and as my client uses generated proxy classes I am able to manipulate POJOs rather than XML to create requests and validate responses.

I'm already able to generate requests sequentially and in parallel (using a fixed number of threads) but I would like to generate load in a similar method to the loadUI generators which work using Transactions Per Second (TPS).

I am unsure how to maintain a fixed (or ramping) TPS load, so can anyone suggest a technique to use or some code to look at that I might find instructive?

1

There are 1 answers

0
trojanfoe On BEST ANSWER

I have solved this problem using a combination of ExecutorService (cached thread pool) and CompletionService and simply managing the time between the creation of 'tasks'.