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 …

Tagged with →  
Share →

2 Responses to Selenium test performance monitoring with Graphite

  1. Tomek Kaczanowski says:

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

  2. toukblog says:

    Thanks for pointing this out. Fixed.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>