multithreading - How to design http stress testerin Java -


i run many requests possible against url , know best approach be.

requirements trigger requests , read response.

i started creating runnable synchronously , blocks. dumped loop fixed thread pool executor. running 100 threads result in 200 requests per second.

i looked async libraries http://hc.apache.org/httpcomponents-asyncclient-4.0.x/ running result in lots of futures never return.

can things nio or async libraries improve throughput or how should tackle problem?

there free , open source tool apache called jmeter. it's designed http load testing , provides

  • record-and-replay capabilities via embedded http proxy server rapid tests development
  • assertions - assure response time not exceed reasonable values, check response content, return code, message, etc.
  • listeners - build tables , graphs analyze load test results.
  • already has number of plugins extend base functionality
  • supports scripting using number of supported languages javascript or beanshell

hope helps in testing , saves valuable time re-inventing wheel produce better product instead.


Comments