When writing tests for your code, it’s easy to miss some parts, which can lead to bugs. How can you ensure you’ve tested everything properly?…
best pratices
Specification-Based Testing: Devise test cases
This is the last part of the specification-based testing series. Now we are going to put all of the knowledge that we gained from the…
Specification-Based Testing: Analyze boundaries
When conducting specification-based tests, analyzing boundaries is crucial. Boundaries, such as inclusive and exclusive intervals, often harbor bugs. For instance, in the CHIP-8 emulator code, the boundary condition for the carry flag at exactly 255 requires thorough testing. Testing exact, minus one, and plus one boundary values is essential to identify potential bugs and clarify code behavior.
Specification-Based Testing: Exploring partitions
When we are testing our code, we can’t only test things that will give us a successful return. Tests should be a way to help…
Specification-based Testing: Explore the program
The third step of the specification-based test is to explore the program behavior. You can skip this step if you wrote the code that you…
Specification-based Testing: Understand the requirements
Understanding the requirements is an important part of testing your code. If you already know the business rules you can create tests to validate it. Also, you can create some that will prevent…
Specification-Based Testing: A Developer’s Secret Weapont
One quick story: I was adding a new feature that needed an API client created by another developer. The API required three inputs: ID, country…
Friction: How Human Behavior Influences Code Development
Introduction Have you ever tried to start a gym routine, learn a new skill, or start a new side project, and found yourself failing? The…
Less Code, More Tests: Exploring Parameterized Tests in JUnit
Introduction Regarding writing tests, some developers are lazy writing fewer test scenarios as possible. And sometimes they can write no scenarios at all. Imagine being…
How to test complex conditions with the MC/DC criteria
Introduction Have you needed help defining what to test when you encounter a complex condition in your code? Do you feel lazy when looking at…