The Never-Ending Debate: For Loops in Test Cases or Multiple Assertions
Too Long; Didn't Read
Testing has been a subject for Developers for a while now, the agile Manifesto is more than 20 years old. Any developer that follows TDD (Test Driven Development) or is familiarize with that, follows the flow: write a failing test, make it pass with the simplest possible change, and then, refactor. In this article, we will focus on the assertions aspect of things as well as the logic inside the tests, using for loops for example. In fact, assertions are a tricky subject to tackle and it depends on the context in which the test is written.