Lecture Software construction - Lecture 18: Software testing

Lecture Software construction - Lecture 18: Software testing. This chapter presents the following content: Develop a test suite for some code after looking at it, start to develop your own “principled approach” to software testing, this strategy derives test data from an examination of the program’s logic,. | Software Construction Lecture 18 Software Testing Learning Goals for Today D3 2 Develop a test suite for some code after looking at it. (White-box testing.) What are your initial questions? (Have you written some already?) Should I analyse the specification carefully, as in black-box testing, to discover “what the code should be doing”? Does white-box testing have an advantage, over black-box testing, in testing “what the program is not intended to do”? Should I carefully test interfaces, exceptions, or error returns, or should I concentrate on confirming the correctness of functional “internal” behaviour? Start to develop your own “principled approach” to software testing. White-Box Testing D3 3 “This strategy derives test data from an examination of the program’s logic “(and often, unfortunately, at the neglect of the specification).” What is the overall strategy or “gold standard” for white-box testing? “Causing every statement in the program to execute at least once”? No this is | Software Construction Lecture 18 Software Testing Learning Goals for Today D3 2 Develop a test suite for some code after looking at it. (White-box testing.) What are your initial questions? (Have you written some already?) Should I analyse the specification carefully, as in black-box testing, to discover “what the code should be doing”? Does white-box testing have an advantage, over black-box testing, in testing “what the program is not intended to do”? Should I carefully test interfaces, exceptions, or error returns, or should I concentrate on confirming the correctness of functional “internal” behaviour? Start to develop your own “principled approach” to software testing. White-Box Testing D3 3 “This strategy derives test data from an examination of the program’s logic “(and often, unfortunately, at the neglect of the specification).” What is the overall strategy or “gold standard” for white-box testing? “Causing every statement in the program to execute at least once”? No this is “highly inadequate”. 4 Test phases Acceptance Testing – this checks if the overall system is functioning as required. Unit testing – this is basically testing of a single function, procedure, class. Integration testing – this checks that units tested in isolation work properly when put togheter. System testing – here the emphasis is to ensure that the whole system can cope with real data, monitor system performance, test the system’s error handling and recovery routines. Regression Testing – this checks that the system preserves its functionality after maintenance and/or evolution tasks. 5 Business Logic GUI Web UI Persistence Layer Abbot/JFCUnit/Marathon HttpUnit/Canoo/Selenium Junit/SQLUnit/XMLUnit FIT/Fitnesse (High level) Junit (Low level) Cactus Perfomance and Load Testing JMeter/JUnitPerf Testing tools 6 Unit Tests are tests written by the developers to test functionality as they write it. Each unit test typically tests only a single class, or a small cluster of classes. Unit .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
Đã 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.