TAILIEUCHUNG - Lecture Software testing and analysis: Chapter 13 - Mauro Pezzè, Michal Young

Exercising every statement or branch with test cases is a practical goal, but exercising every path is impossible. Even the number of simple (that is, loop-free) paths can be exponential in the size of the program. Path-oriented selection and adequacy criteria must therefore select a tiny fraction of control flow paths. Data flow test adequacy criteria improve over pure control flow criteria by selecting paths based on how one syntactic element can affect the computation of another. | Data flow testing (c) 2007 Mauro Pezzè & Michal Young Ch 13, slide 1 Learning objectives • Understand why data flow criteria have been designed and used • Recognize and distinguish basic DF criteria – All DU pairs, all DU paths, all definitions • Understand how the infeasibility problem impacts data flow testing • Appreciate limits and potential practical uses of data flow testing (c) 2007 Mauro Pezzè & Michal Young Ch 13, slide 2 Motivation • Middle ground in structural testing – Node and edge coverage don’t test interactions – Path-based criteria require impractical number of test cases • And only a few paths uncover additional faults, anyway – Need to distinguish “important” paths • Intuition: Statements interact through data flow – Value computed in one statement, used in another – Bad value computation revealed only when it is used (c) 2007 Mauro Pezzè & Michal Young Ch 13, slide 3 Data flow concept 1 2 3 x = if 4 5 6 x = . y = x + . • Value of x at 6 could be computed at 1 or at 4 • Bad computation at 1 or 4 could be revealed only if they are used at 6 • (1,6) and (4,6) are def-use (DU) pairs – defs at 1,4 – use at 6 (c) 2007 Mauro Pezzè & Michal Young Ch 13, slide 4 Terms • DU pair: a pair of definition and use for some variable, such that at least one DU path exists from the definition to the use x = . is a definition of x = . x . is a use of x • DU path: a definition-clear path on the CFG starting from a definition to a use of a same variable – Definition clear: Value is not replaced on path – Note – loops could create infinite DU paths between a def and a use (c) 2007 Mauro Pezzè & Michal Young Ch 13, slide .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.