Testing software is difficult because exhaustively testing all possible inputs is impractical due to the huge number of potential test cases. Various techniques can be used to select test cases such as functional testing based on requirements, structural testing based on code structure, and testing boundary conditions and edge cases. Coverage metrics like statement coverage, branch coverage, and path coverage can help determine when enough test cases have been selected, though full path coverage is often infeasible. Condition coverage additionally aims to test all conditions in branch statements.
Related topics: