Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

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 (www.junit.org). 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

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<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

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.