tailieunhanh - Lecture Software testing and analysis - Chapter 12: Structural testing
Learning objectives of this chapter: Understand rationale for structural testing, recognize and distinguish basic terms, recognize and distinguish characteristics of common structural criteria, understand practical uses and limitations of structural testing. | structural Testing SOFTWARE TESTING ANDANALYSIS c 2007 Mauro Pezze Michal Young Ch 12 slide 1 Structural testing Judging test suite thoroughness based on the structure of the program itself - Also known as white-box glass-box or codebased testing - To distinguish from functional requirements-based black-box testing - structural testing is still testing product functionality against its specification. Only the measure of thoroughness has changed. SOFTWARE TESTING ANDANALYSIS c 2007 Mauro Pezze Michal Young Ch 12 slide 3 Learning objectives Understand rationale for structural testing - How structural code-based or glass-box testing complements functional black-box testing Recognize and distinguish basic terms - Adequacy coverage Recognize and distinguish characteristics of common structural criteria Understand practical uses and limitations of structural testing SOFTWARE TESTING ANDANALYSIS c 2007 Mauro Pezze Michal Young Ch 12 slide 2 Why structural code-based testing One way of answering the question What is missing in our test suite - If part of a program is not executed by any test case in the suite faults in that part cannot be exposed - But what s a part Typically a control flow element or combination Statements or CFG nodes Branches or CFG edges Fragments and combinations Conditions paths Complements functional testing Another way to recognize cases that are treated differently - Recall fundamental rationale Prefer test cases that are treated differently over cases treated the same c 2007 Mauro Pezze Michal Young Ch 12 slide 4 No guarantees Executing all control flow elements does not guarantee finding all faults - Execution of a faulty statement may not always result in a failure The state may not be corrupted when the statement is executed with some data values Corrupt state may not propagate through execution to eventually lead to failure What is the value of structural coverage - Increases confidence in thoroughness of testing Removes some obvious .
đang nạp các trang xem trước