Sunday, September 9, 2007

JMeter - My Amdocs Legacy

On the eve of leaving my job for greener pastures, one of my babies I am leaving behind in Amdocs is automatic testing.

Testing is an inseparable part of writing software. A programmer tests code during all phases of program development, from the earliest to the final stages. What if the project is huge and there are tens of developers working together on one application, such that one team has no working knowledge about another team's part? In that case, regression testing for the entire application is needed. This is to make sure nobody ruined anything while adding, removing and changing different parts of the application. The bigger the development team, the less each programmer knows about other parts of the whole, the more likely a change will be detrimental to some part of the application.

For this purpose there are many automatic testing tools on the market. Such a tool automatically runs the application and uses it like a real person would. If a result occurs other than expected, the test fails. In making the decision which tool to use, I checked Mercury QuickTest Professional, Compuware TestPartner, IBM Rational Functional Tester, Seapine QA Wizard and Apache JMeter.

The project I worked on at Amdocs is a web application whose requirements included testing several environments concurrently, and some level of concurrency in the tests themselves. Of all the tools I checked, only one met those requirements -- Apache JMeter 2.2. JMeter is a free tool that tests a web application at the HTTP request level. It can record the requests and responses, which is a good skeleton from which to begin writing a test script. It can also be easily invoked from ANT -- I created an ANT script that ran each JMeter script concurrently. To achieve concurrency between environments, each machine can run its own JMeter instance (even UNIX, which the other tools can't). In addition, JMeter can perform tests other than HTTP -- JUnit, FTP, JDBC, JMS to name a few.

The main weakness of JMeter is its reporting capabilities. As of version 2.2, JMeter can't create reports. To get one after a test run, I had to use XSL to convert the XML result to HTML.

In short, JMeter is highly recommended.

No comments: