intTypePromotion=1
zunia.vn Tuyển sinh 2024 dành cho Gen-Z zunia.vn zunia.vn
ADSENSE

Bài giảng Công nghệ phần mềm: Software Testing - Nguyễn Thị Cẩm Hương

Chia sẻ: Sơn Nam | Ngày: | Loại File: PDF | Số trang:109

81
lượt xem
5
download
 
  Download Vui lòng tải xuống để xem tài liệu đầy đủ

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.

Chủ đề:
Lưu

Nội dung Text: Bài giảng Công nghệ phần mềm: Software Testing - Nguyễn Thị Cẩm Hương

  1. Software Testing
  2. 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”
  3. 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.
  4. 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
  5. 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
  6. 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
  7. 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.
  8. 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
  9. 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
  10. 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.
  11. 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
  12. 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.
  13. 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.
  14. Functional Testing 14
  15.  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
  16. 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
  17. 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
  18. 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
  19. 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
  20. 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
ADSENSE

CÓ THỂ BẠN MUỐN DOWNLOAD

 

Đồng bộ tài khoản
4=>1