AI-powered
podcast player
Listen to all your favourite podcasts with AI-powered features
How to Avoid Writing Flaky Tests
A goal that I set for myself whenever possible is to avoid introducing conditional logic or loops into my test suite. Whenever it's possible to do so, I also try to ensure that I have as few assertions as possible in my test suite because that will also give me more confidence in the test cases reliability when it's run frequently on a developer workstation or in CI. There's one strategy that I always think of to aid my testing process and it has to do with the number of inputs that go into the function under test and then the number of outputs. So if I have a significant number of inputs, but only a single output or no Outputs? Then I probably don't have enough