Selenium test performance monitoring with Graphite

Behaviour driven development is gaining more adoption these days. Functional frontend tests are invaluable as any other kind of tests if written well. One aspect of a good test suite is performance which gives you fast feedback on your work.

Performance is hard to measure and tune in continuous deployment environment. All components: tests, application, database and server machines have to be monitored together to get any insights. At TouK we use Graphite to collect and visualize all kind of data e.g. company polls. Graphite is RRD database with powerful frontend and query language. Adding performance data of Selenium frontend tests was a matter of time.

Tests we wanted to monitor were written in testng. We added following test listener to our test classes, hope the code is self explanatory.

This class submits data about test names, status, duration and host they were run on to Graphite. These data is enough to provide us with some useful information:

  • dot cloud width is a duration of test suite
  • yellow dots show duration of successful tasks
  • red dots show duration of failed tasks
  • lines shows averages

More pictures coming soon …

2 thoughts on “Selenium test performance monitoring with Graphite

  1. is
    if (System.getProperty(“graphiteHost”) != null && System.getProperty(“graphiteHost”) != null ) {
    should be
    if (System.getProperty(“graphiteHost”) != null && System.getProperty(“graphitePort”) != null ) {

Leave a Reply to Tomek Kaczanowski Cancel reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.