O'Reilly logo

Quality Code: Software Testing Principles, Practices, and Patterns by Stephen Vance

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 7. String Handling

Strings are pervasive in computer programming. Whether joining names or generating or parsing XML documents, strings are a fundamental representation for much of the world’s data, which leaves us with the task of verifying string data in our tests.

In this chapter, we examine several ways to verify strings in our tests. We start with the easiest and weakest approaches and increase the strength of our verification with little increase in the complexity of our approach. In the end, we have an approach that gives us strict verification yet is resilient to code changes and friendly to localization strategies.

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