Straightforward: The First Quality of Valuable Tests

Get an overview of five valuable test qualities that make a test save time and effort, and learn one of the first qualities, Straightforward.

Valuable test qualities

A valuable test saves time and effort over the long term, while a poor test costs time and effort. We’ll focus on five qualities that tend to make a test save time and effort. The absence of these qualities is often a sign that the test could be a problem in the future. To turn them into an acronym that is only slightly contrived, we use SWIFT:

  • Straightforward
  • Well defined
  • Independent
  • Fast
  • Truthful

Let’s explore these in more detail.

Straightforward

A test is straightforward if its purpose is immediately understandable.

Straightforwardness in testing goes beyond just having clean code. A straightforward test is also clear about how it fits into the more extensive test suite. It should test something different from the other tests, and that purpose should be easy to discern from reading the test. That purpose is usually tied to what condition would make the test fail, not what condition would make the test pass.

Example test

Here is a test that is not straightforward:

Get hands-on with 1400+ tech skills courses.