O'Reilly logo

Selenium Design Patterns and Best Practices by Dima Kovalenko

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Hermetic test pattern

The Hermetic test pattern is the polar opposite of the Spaghetti pattern; it states that each test should be completely independent and self-sufficient. Any dependency on other tests or third-party services that cannot be controlled should be avoided at all costs. It is impossible to get a perfectly hermetically sealed test; however, anytime a dependency on anything outside the test is detected, it should be removed as soon as possible.

Note

The Hermetic test pattern can also be referred to as Test is an Island Pattern, which is a play on the word from an old saying no man is an island.

Advantages of the Hermetic test pattern

The Hermetic pattern is especially appealing when trying to flush out test instability. Here are ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required