Logic Based Criteria Flashcards
Why isn’t branch coverage enough for logical conditions?
Some combinations of predicates will not be tested using branch coverage
Why should we not use path coverage for logical conditions?
Scalability
No paths if short-circuiting is not present
Languages may not have short-circuiting at all
What is the basis for logic based coverage?
We want to reason about the logical expressions and how inputs affect their outcomes
________ ______ requires each predicate to be true in one test and be false in one test
Predicate coverage
________ ______ requires each clause to be true in one test and be false in one test
Clause Coverage
Why is predicate and clause coverage bad testing?
Both can have a minimum of 2 test cases (since clauses and predicates can only have 2 values). There is no requirement to test different combinations
What does Combinatorial/Multiple Condition Coverage testing require?
It requires each possible combination of clauses to be tested
How do we test the impact of a clause?
Changing the clause value and seeing if the predicate changes
What are the 4 requirements for Modified Condition/Decision Coverage?
- Each entry and exit is used
- Each decision/branch takes every possible outcome
- Each clause takes every possible outcome
- Each clause independently impacts outcome
When generating a test suite with MC/DC, we should try to add tests based on ________ tests
existing
What is the recommended use for MC/DC. It’s not generating tests.
Evaluate test suites generated by other means