Job Opening for Tester of Web Apps at Moolya >>Could you spot this? This is intentional!

Test Automation Heuristic: No Conditionals

A conditional statement is the use of if() (or its relatives) in code. Not using if() is a fairly well-known test design principle. I will explain why that is, but I am also going to point out some less well-known places where it is tempting to use if(), but where other flow constructs are better choices. My code looks like Ruby for convenience, but these principles are true in any language.No Conditionals in Test CodeThis is the most basic misuse of if() in test code:if (x is true) test xelsif...


Share |

Published By: Chris McMahon - Sunday, 26 November, 2017