Tuesday, March 09, 2010

JMeter scripts for continuous integration


A client needed to move from Oracle to Microsoft Sql Server and wanted to make sure MS sql server will work as fast as Oracle does.
We used JMeter to record various scenarios from our web application for benchmarking against two different databases.

After tuning sql server a bit we have seen dramatic performance improvements and by re-running our recorded tests we could keep track of our progress.

Jmeter scripts can be executed from ant and maven builds. It is very good idea to run jmeter scripts as part of continuous integration process at least once a day.

JMeter allows inserting assertions against the response you get back from server by regular expression matching. So in theory scripts can verify json, xml responses. As a result, you can position those scripts as integration tests as well as performance tests.


Hudson has a performance plugin that can execute jmeter tests and report performance and robustness trend of the application.
This way you can measure performance trends of stable development environments (e.g pre-production servers) as development patches are applied to them. 

One easy way to record web application interaction and place assertions against html responses is to use Badboy.
BadBoy is an  capture/replay interface which can export as jmeter scripts.


There are many ways to test/benchmark request-response exchange, this is just one of them. What other tools & techniques do you use to track performance and stability trend of web applications?

1 comment:

İbrahim DEMİR said...

Uysal

Another useful post from you which we expect to see from our configuration managers :)