Channels ▼


Continuous Integration and Performance Testing

Source Code Accompanies This Article. Download It Now.

Extending Continuous Integration

The automated testing currently done in continuous integration environments is along the lines of functional or unit tests; that is, they verify that the application seems to do what is intended. Can you extend this testing to verify that the application seems to conform to performance, memory usage, integration, and scalability forecasts? It turns out that you can—I call the resulting process "continuous performance management."

Continuous performance management implements performance and scalability testing within a continuous integration environment. The idea is to configure what Fowler calls "secondary continuous integration builds" to execute performance unit tests, integration tests, or load (stress) tests.

This lets you, for example, profile the application's unit tests to identify slow algorithms, incorrect memory usage (such as loitering objects and object cycling), and measure code coverage of tests. You can also test beyond the component level, such as testing integration of components into a working solution by tracing a request as it passes between multiple Java Virtual Machines (JVMs). You can even run automated load tests within the continuous integration test harness to baseline and track the application's scalability during development.

The first prerequisite is having unit tests for your code developed and implemented in a scriptable framework such as JUnit ( This covers component-level unit-test analysis. Integration and load testing requires a different test bed because these are more like business use cases rather than functional tests—the HttpUnit extension of JUnit works well here.

To take fullest advantage of continuous performance management, you also need scriptable performance analysis tools; for example, a Java code profiler and memory debugger. That is, you need an engine that will run the performance, integration, or scalability tests, and capture the results.

Related Reading

More Insights

Currently we allow the following HTML tags in comments:

Single tags


<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags


<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

