Bài giảng Công nghệ phần mềm: Software Testing - Nguyễn Thị Cẩm Hương
lượt xem 5
download
Bài giảng "Công nghệ phần mềm: Software Testing - Nguyễn Thị Cẩm Hương" presentation of content: Why should we test, terminologies, functional testing, equivalence class testing, decision table based testing, levels of coverage,... Invite you to reference.
Bình luận(0) Đăng nhập để gửi bình luận!
Nội dung Text: Bài giảng Công nghệ phần mềm: Software Testing - Nguyễn Thị Cẩm Hương
- Software Testing
- What is Testing? Testing is the process of demonstrating that errors are not present The purpose of testing is to show that a program performs its intended functions correctly Testing is the process of establishing confidence that a program does what it is suppose to do. These definitions are incorrect. Why??? “Testing is the process of executing a program with the intent of finding errors”
- Why should We Test? Although Software Testing is an expensive activity. However, if we produce a software product without Testing may lead to cost potentially much higher than of testing In so-called “Life Critical System”, economics must not be the prime consideration while deciding whether a product should be released to a customer. In commercial system it is often difficult to estimate the cost of errors.
- Who should Do the Testing? It is very difficult for software developer to point out errors from own creations(Why?) Testing persons are different from Development persons for the overall benefit of the system Developers provide guide lines during testing Whole responsibility is owned by Testing persons
- What should We Test? It is not possible to test the software for all possible combination of input cases (example) It is impossible to execute all path the program (example) Complete Testing is impossible, although we may wish to do so. Organizations should develop strategies and policies for choosing effective testing techniques
- TERMINOLOGIES Error, Mistake, Bug, Fault and Failure Error: People make errors. A good synonym is MISTAKE. Mistakes during coding is called Bug Fault: An error may lead to one or more faults. Fault is the representation of error. Defect is a good synonym for fault Failure: occurs when a fault executes. One fault may lead to many Failures
- TERMINOLOGIES Test, Test Case, Test Suite A Test: is the act of exercising software with test cases. There are two distinct goals of a test: either to find failures, or to demonstrate correct execution.
- TERMINOLOGIES Test, Test Case, Test Suite Test Case: Describes an input description and an expected output description (example) A Good Test Case has high probability of finding an error The main objective of Test Case Designer is to identify good test cases Test Suite: the set of test cases. Any combination of test cases may generate a Test Suite
- TERMINOLOGIES Verification and Validation Verification: the process of conforming that software meets its specification (Checking the software with respect to specification) Validation: the process of conforming that software meets the customer’s requirements (Checking the software with respect to customer’s expectation) If there is a gap at SRS level that will only be know during validation activities Poor understand of expectation may lead to incorrect specifications
- TERMINOLOGIES Alpha, Beta and Acceptance Testing Alpha and Beta Testing: used when the software developed as a product for anonymous customers. Alpha tests are conducted at developer’s site by customer. This test may be stared when formal testing process near completion Beta tests are conducted by the customers/end users at their site. Beta testing is conducted in a real environment that cannot be control by the developer.
- TERMINOLOGIES Alpha, Beta and Acceptance Testing Acceptance Testing: used when the software is developed for a specific customer. A series of test are conducted to enable the customer to validate all requirements. These test are conducted by the end user/customer
- Example 1 A program requires two 8 bit integers as inputs, so total possible combinations are: 28 x 28 If one second is required to execute one set of inputs, it will take 18 hours.
- Example 2 Suppose we have a program which uses loop and If statement as following: The number of paths in the example is 1014 If only 1 minute is require to test one path, it may take 1/5 billion years to execute all path.
- Functional Testing 14
- Complete Testing is not all possible We may like to reduce this incompleteness as much as possible. What we are looking for is a set of thought processes that allow us to select a set of data more intelligently. (the poorest methodology is random input testing) 15
- What is Functional Testing? Functional Testing (also know as Behavior testing) is based on the Functionality of the program. It is involves only observation of the output for certain input values. There is no attempt to analysis the code, which produces the output Functional Testing also referred as Black Box Testing Input domain Ouput domainS System Input test Output test Under data data test 16
- Techniques used to design Test Cases for Functional Testing Boundary Value Analysis Equivalence Class Testing Decision Table Base Testing Cause Effect Graphing Technique Special Value Testing 17
- Boundary Value Analysis (1) Experience show that test cases that are close to boundary condition have higher chances of detecting an error. Boundary condition means: an input value may be on the boundary, just below the boundary (lower side ) or just above the boundary (upper side). Based on “Single Fault” assumption 18
- Boundary Value Analysis (2) Uses input variable values at their: 400 Minimum Just above minimum 300 Norminal value 200 Just Maximum 100 Maximum Test cases are obtained by 0 100 200 300 400 Combine values of one variable with the nominal values of remain variables Repeat above step until all variable are traversed There are 4n+1 test cases for a program has n variables 19
- Boundary Value Analysis (3) Assume we have a program with two input variables, which have any value from 100 to 300 Test cases are: (200,100), (200,101), (200, 200), (200, 299), (200, 300), (100, 200), (101, 200), (299, 200), (300, 200) Generate Test cases for the program that determination of the nature of roots of quadratic equation. Values of coefficients are ranged from 0 to 100. The program may outputs one of following words: Not a quadratic equation, Real Root, Imaginary Root, Equal Root. [Show Result] 20
CÓ THỂ BẠN MUỐN DOWNLOAD
-
Bài giảng Công nghệ phần mềm: Chương 1 - ThS. Nguyễn Khắc Quốc
61 p | 142 | 18
-
Bài giảng Công nghệ phần mềm: Bài 1 - TS. Lê Nguyễn Tuấn Thành
142 p | 231 | 17
-
Bài giảng Công nghệ phần mềm nâng cao: Giới thiệu môn học - Phạm Ngọc Hùng
14 p | 166 | 14
-
Tập bài giảng Công nghệ phần mềm - Phạm Hùng Phú, Nguyễn Văn Thẩm (Biên soạn)
291 p | 60 | 13
-
Bài giảng Công nghệ phần mềm: Chương 1 - ĐH Công nghệ TP.HCM
77 p | 36 | 13
-
Bài giảng Công nghệ phần mềm: Bài 1 - Học viện Kỹ thuật Quân sự
45 p | 20 | 11
-
Bài giảng Công nghệ phần mềm: Chương 0 - ThS. Trần Sơn Hải
5 p | 122 | 10
-
Bài giảng Công nghệ phần mềm: Yêu cầu phần mềm
66 p | 107 | 10
-
Bài giảng Công nghệ phần mềm: Chương 1 - ThS. Dương Thành Phết
19 p | 138 | 9
-
Bài giảng Công nghệ phần mềm: Chương 1 - Trường ĐH Công nghiệp TP. HCM
48 p | 42 | 9
-
Bài giảng Công nghệ phần mềm - Phần 1: Giới thiệu chung về công nghệ phần mềm
52 p | 88 | 8
-
Bài giảng Công nghệ phần mềm: Các quy trình phần mềm
31 p | 125 | 8
-
Bài giảng Công nghệ phần mềm: Chương 1 - ThS. Đinh Thị Lương
40 p | 11 | 6
-
Bài giảng Công nghệ phần mềm ứng dụng: Bài 1 - ThS. Thạc Bình Cường
58 p | 60 | 6
-
Bài giảng Công nghệ phần mềm - Chương 1: Tổng quan về CNPM
13 p | 112 | 5
-
Bài giảng Công nghệ phần mềm - Phần 1: Giới thiệu công nghệ phần mềm
52 p | 79 | 5
-
Bài giảng Công nghệ phần mềm: Phần 1 - Vũ Thị Hương Giang
52 p | 49 | 3
-
Bài giảng Công nghệ phần mềm: Chương 1 - ThS. Trần Sơn Hải
52 p | 73 | 3
Chịu trách nhiệm nội dung:
Nguyễn Công Hà - Giám đốc Công ty TNHH TÀI LIỆU TRỰC TUYẾN VI NA
LIÊN HỆ
Địa chỉ: P402, 54A Nơ Trang Long, Phường 14, Q.Bình Thạnh, TP.HCM
Hotline: 093 303 0098
Email: support@tailieu.vn