O'Reilly logo

Next Generation Java™ Testing: TestNG and Advanced Concepts by Hani Suleiman, Cédric Beust

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

Chapter 2. Testing Design Patterns

While we are all very familiar with general object-oriented design patterns, testing design patterns are not nearly as well understood or prevalent because the mechanics of writing tests is easy, and almost any testing framework we use is likely to be fairly simple and easy to understand.

More interesting than just writing tests, however, is writing tests that will stand the test of time, tests that will handle future requirements and changes, ones that can be easily maintained by any new developers who might join the team or take over the code base.

In this chapter, we’ll examine a number of patterns and common problems that have emerged through practical applications of testing. Starting with failure testing, ...

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