Home » Blogs, Knowledge

Software Testing with Hermetic Servers

16 October 2012 No Comment

This post by Chaitali Narla and Diego Salas on the Google Testing blog introduces the concept of hermetic servers in software testing. In a situation where the System Under Test (SUT) is composed of multiple servers, the notion of hermetic servers will help to solve the challenges of writing a fast and reliable end-to-end tests, avoiding network access. The hermetic server could be defined as a “server in a box”. Thus your testing could all be started on a single machine, physical or virtual, without the need for a network connection.

The blog gives the following recommendations to build hermetic servers:
* All connections to other servers are injected into the server at runtime using some dependency injection like Guice.
* All required static files are bundled in the server binary.
* If the server talks to a datastore, it should be faked with data files or in-memory implementations.
* Make sure that connection points that shouldn’t be concerned have appropriate fakes or mocks to verify this non-interaction.
* Provide modules to easily populate datastores with test data.
* Provide logging modules to trace the request/response path as it passes through the SUT.

The conclusion of the post is that hermetic servers have some limitations but are a great testing tool. Like all other tools, they need to be used thoughtfully where appropriate.

Related Content:

  • No Related Content

Comments:

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

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

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.

*