The Four Stages of Testing That Help Your Focus
04-Aug-2022 969
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 #Stages #Testing #Focus #testing https://rubyonrails.ba/link/the-four-stages-of-testing-that-help-your-focus