This article outlines some test automation best practices and answers the following questions:
- When and why should you implement test automation?
- How do you determine the right testing-technique combination?
- What methods are most common for the different testing levels?
When and Why: Test Automation Best Practices
It doesn’t make sense to test a system that hasn’t changed unless you want to know more about it. You can experiment with test cases to learn more about the behavior of the system than its documentation describes.
There are two reasons for testing:
- Testing enables change
- Tests describe the behavior of the system
The ultimate test automation goal is to ship faster and more often, with no bugs. Nobody wants their release delayed because the test cycle took too long. Shipping the software without first validating that it’s acceptance criteria have been met is a bad idea. When software is being refactored, automation can require a lot of maintenance. Building and maintaining the tests can be too expensive in some cases. Keep this in mind when you decide how to implement your automation.
5 Testing Considerations
No written law dictates when to implement what type of test. No magic formula dictates how to test a particular feature either. Testing an entire feature is usually done using multiple tools. After all, you can’t build a house using only a hammer; you’ll need a saw and a drill, too. And just because you can’t cut a plank with a hammer, doesn’t mean the hammer isn’t a useful tool.
Different types of testing methods solve different kinds of problems. Any of them can poorly perform when applied in the wrong situation. The challenge is to identify the issues at hand to find the right combination of test-techniques that will cover all the functional and technical aspects of the software.
Here are five things to consider when determining your testing method combination:
- TRUST: Is the test trustworthy?
- COST: How much will it cost to build and maintain these tests?
- SPEED: Do the tests run fast?