|
3 Keys to Mastering Test-Driven Development From his decade of teaching thousands of professional software developers how to be effective with test-driven development, David Bernstein has learned that there are three key ingredients for mastering TDD: understanding what it really is, making code reliably testable, and getting hands-on experience. Let’s look at each of these factors to see what it takes to use TDD effectively on your projects.
|
|
|
A Case for Test-First Development You may feel you don't have time to write unit tests, but you really don't have time not to. Steve Poling makes the case that writing tests first not only will yield better code, but will help you get that code working right sooner. Here's how using a test-first approach changes your thinking about coding, lets you see mistakes immediately, and helps you create more testable code.
|
|
|
Learn More from Tests That Stray off the Happy Path Unit tests exercise various paths through your codebase. Some are happy paths where everything you expect goes right. These tests are boring. The interesting tests are the ones where your code goes hurtling off the happy path. The trick is to capture the diversity of a multitude of unhappy paths without needlessly duplicating unit tests. Here's how you can improve the quality of your unit testing and fix it more effectively.
|
|
|
The Value of Test-Driven Development when Writing Changeable Code Writing changeable code makes it easier and more cost-effective to add features to existing software. Writing changeable code doesn’t take longer, but it does require paying attention to certain things when building a system. It's important to have a good suite of unit tests that support refactoring code when needed, and test-driven development helps you create independently testable code.
|
|
|
Document Why as Well as What: Finding the Purpose of Your Software Code can express what we want to accomplish, but it’s a little more difficult to express why we’re doing something in the first place. The people who maintain code are often not those who originally wrote it, so documenting why helps set a context and gives clues as to what the author was thinking when they came up with a particular design, making developers' jobs easier.
|
|
|
Exposing False Confidence in Your Tests Testing can't tell you what's wrong with your code. It can only show what is not wrong with it. And though we cannot possibly conceive everything that might be wrong, it's important to stray from the "happy path." We need test cases that present bogus inputs and assert that they raise exceptions. That's how we can replace our false confidence with true assurance.
|
|
|
The Impact of Quality-Driven Development When the development and QA teams work independently of each other, there can be some duplication of test efforts—which results in wasted time. The solution: quality-driven development, with QA-implemented automation run in the development environment. This is the story of one team's venture into this new process.
|
|
|
5 Ways Testers Can Mitigate Practical Risks in an Agile Team Testers who analyze quality in every aspect of the team’s deliverables also have a responsibility to mitigate risks and practical issues that are bound to come up, and help the team succeed in their product as well as at being agile. Here are five such issues that testers can help the team alleviate or avoid.
|
|
|
Modern Application Performance Testing In order to understand if performance matches needs, testing is a necessity. While there are many areas that help define testing parameters, three overarching testing concepts must be addressed in order to provide appropriate performance for modern applications: your users, your data, and your environment.
|
|
|
Testing Economics Everything we do has an economic impact because what we do has costs and benefits. Testing is about getting real feedback quickly, reducing wasteful testing activities, and putting a mirror in front of our applications. It becomes advantageous to understand the costs of these activities and direct the effort investment where it’s most beneficial.
|
|