The Four Stages of Testing That Help Your Focus

When writing tests, it’s useful to consider that the tests are always in one of four distinct stages, and knowing which stage they are in can direct your next steps. This can make testing a bit less painful than it might otherwise be.The four stages are:The code doesn’t compile/build/parseThe tests produce an error (as opposed to a failure)The tests are failingThe tests are passingWorking effectively with tests requires understanding the difference in these stages and being super careful to take only certain actions depending on what stage you are in.When tests aren’t passing, it can be extremely frustrating trying to figure out exactly why and what to do about it. Sometimes a test fails on purpose, sometimes it passes when it shouldn’t, and because tests are often an indicator of progress when coding, if they aren’t working, it can make programming feel especially chaotic.Let’s start with a hopefully infrequent stage of testing: the code isn’t even valid.
The Four Stages of Testing That Help Your Focus #ruby #rubydeveloper #rubyonrails #testing https://rubyonrails.ba/single/the-four-stages-of-testing-that-help-your-focus

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles