1. Trang chủ
  2. » Giáo Dục - Đào Tạo

Introduction to software testing potx

62 253 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 62
Dung lượng 441,55 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Typical Exit Criteria Unit Test  All tests attempted  99% of the tests executed successfully  Test cases have been stored under Configuration Management... Software Test Stages Unit

Trang 1

Introduction to software testing

Trang 2

 Definitions, Principles, Axioms

 Stages of testing

 Perspectives on Software Testing

 A little math (Part 1)

Trang 3

Definitions, Principles, Axioms

Trang 4

 Black box testing

 White box testing

Trang 5

Definitions of Testing (1)

 The process of executing a program (or part

of a program) with the intention of finding

errors (Myers, Humphrey)

 The purpose of testing is to find errors

Testing is the process of trying to discover

every conceivable fault or weakness in a

work product (Myers, Kit)

 The process of searching for errors (Kaner)

Trang 6

Definitions of Testing (2)

 Testing – the process of finding errors and of validating the program/system (Jorgensen)

 The purpose of software testing is to find

errors and to get them fixed (Bitzenhofer)

 The purpose of software testing is to reduce risk (E&M)

Trang 7

Verification and Validation:

Myers

 Verification: An attempt to find errors by

executing a program in a test or simulated

environment

 Validation: An attempt to find errors by

executing a program in a real environment

Trang 8

Verification and Validation: IEEE

 Verification: The process of evaluating a

system or component to determine whether the products…satisfy the conditions

imposed…

 Validation: The process of evaluating a

system or component…to determine whether

it satisfies specified requirements

Trang 9

specifications (“Design Verification Testing”)

 Validation: Checking the program against the published user or system requirements

(“System Validation Testing”)

Trang 10

Software Fault Terminology

 Error – a mistake in design, coding,

requirements, even testing

 Fault (defect) – the representation of the error

 Failure – what happens when the fault

“executes”

Trang 11

Software Fault Terminology:

Examples

 A wrong loop index

 Programmer-to-device pointer error

 A loop executes one too many times

 A programmed parameter gets written to the wrong address

 A table overflows; memory gets overwritten

 The physician only thinks he/she changed that heart parameter

Trang 12

Black and White Box

 Black box testing

 Designed without knowledge of the program‟s

internal structure and design

 Based on functional requirements

 Also called Functional Testing

 White box testing

 Examines the internal design of the program

Trang 13

2.Prevent defect migration by using early

life-cycle testing techniques

3.The time for software testing tools is now

Adapted from Software Testing in the Real World, Edward Kit;

Addison-Wesley, 1995

Trang 14

Six Essentials of Software

Testing (2)

4.A real person must take responsibility for

improving the testing process

5.Testing is a professional discipline requiring trained, skilled people

6.Cultivate a positive team attitude of creative destruction

Adapted from Software Testing in the Real World, Edward Kit;

Trang 15

Some Principles and Axioms

of Testing (1)

 “Program testing can be used to show the

presence of bugs, but never their absence.” (Dijkstra, 1969)

 One of the most difficult problems in testing is knowing when to stop

 It is impossible to test your own program

Trang 16

Some Principles and Axioms

of Testing (2)

 As the number of detected defects in a piece

of software increases, the probability of the existence of more undetected defects also

increases

 “Testing is an extremely creative and

intellectually challenging task” (Myers again)

 Exhaustive testing is impossible

Trang 17

Stages of testing

Trang 18

The Test Process

Trang 19

Software Test Execution

Stages

Unit Test

 Design Verification Test (DVT)

 Interface, Integration, Exit/Formal

 System Validation Test (SVT)

 Main, Regression, Acceptance

 Customer Acceptance Test

Trang 20

Unit Test

 Performed by the developers

 White-box testing

 Should be done with each release to testing

 Results should be communicated to the Test Group

Trang 21

 Unit Test Plan complete

 Unit Test Cases complete

 Tools are available

Trang 22

Typical Unit Test Activities

 Source level debugging if it won‟t compile

 Design and review the Unit Test cases

 Track test defects (maybe)

 Measure Unit Test coverage

 Make sure it builds

Trang 23

Typical Exit Criteria (Unit Test)

 All tests attempted

 99% of the tests executed successfully

 Test cases have been stored under

Configuration Management

Trang 24

Software Test Stages

 Unit Test

Design Verification Test

 Interface, Integration, Exit/Formal Test Phase

 System Validation Test

 Main, Regression, Acceptance

 Customer Acceptance Test

Trang 25

Design Verification Test (DVT)

 Performed by the test organization

 Black box testing

 Verification of engineering requirements

 Verification of the software design

Trang 27

Typical Entry Criteria (DVT)

 Unit Test complete (for all code being tested)

 Engineering requirements and program

design are “complete”

 The code is under Configuration

Trang 28

Typical DVT activities

 Design, write and review the Test Plan

 Write the DVT Test Cases

 Execute Interface/Integration test cases

 Track defects to the code and to the tests

Trang 29

Interface Testing

 How does a user interact with the program?

 What input variables are required?

 What outputs are produced?

 Extremely important for e-business

applications

Trang 30

Integration Testing

 Integration between software components

 Integration with the front-end GUIs

 Integration between a server and its clients

 Integration between software and hardware

 Integration between Web services

Trang 31

DVT Exit or Formal Test Phase

 This is a requirement for System Test

 Probably involves running a suite of

Trang 32

Typical Exit Criteria (DVT)

 All test cases executed

 98% of the test cases executed successfully

 High severity defects have been fixed and

verified

Trang 33

Software Test Stages

 Unit Test

 Design Verification Test

 Interface, Integration, Exit/Formal

System Validation Test

 Main, Regression, Acceptance

 Customer Acceptance Test

Trang 34

System Validation Test (SVT)

 Performed by the test organization

 Validation of customer requirements

 Main Test

 Regression Test

 SVT Acceptance Test

Trang 35

Typical Entry Criteria (SVT)

 DVT Exit completes successfully

 Test Plan has been updated and frozen

 All test cases have been finalized

 No high severity problems are open

 Code is frozen

 The install works

Trang 36

SVT Main Test

 Verify the functional requirements of the

product from the Customer‟s point of view

 Includes usability, reliability, performance,

and installation

 Also has its own Entry and Exit criteria

 Use Cases form a big part of this testing

 Marketing issues are addressed here too

Trang 37

SVT Regression Test

 Verify that all defects identified during SVT have been addressed; i.e “all” tests run OK

Trang 38

System Acceptance Test

 Verify final manufacturing build

 Verify all installation scenarios

 Verify delivery of all media

Trang 39

Typical Exit Criteria (SVT)

 All test cases attempted

 All test cases executed successfully, OR

every defect that has been submitted has

been addressed

 No high severity defects are open

 Test Cases are under Configuration

Management

 Final Test Report has been written

Trang 40

Software Test Stages

 Unit Test

 Design Verification Test

 Interface, Integration, Exit

 System Validation Test

 Main, Regression, Exit

Customer Acceptance Test

Trang 41

Customer Acceptance Testing

 Usually performed at the customer site

 Must be well-written and simple, but

meaningful

 May be dictated by the customer

Trang 42

Perspectives on Software Testing

Trang 43

The Objectives and Limits of

Testing (1)

 Limits

 You cannot test a program completely

 Even if you do find the last bug, you‟ll never know it

 It takes more time than you have to test less than you‟d like

 You will run out of time before you run out of test

cases

Trang 44

The Objectives and Limits of

Testing (2)

 Limits

 You cannot test every path

 You cannot test every valid input

 You cannot test every invalid input

 You cannot prove a program correct (because it isn‟t!)

Trang 45

The Objectives and Limits of

Testing (3)

 Objectives

 The purpose of testing is to find problems

 The purpose of finding problems is to get them

corrected

 The purpose of testing is to reduce identifiable

risks

Trang 46

Tests and Test Cases (1)

 Test – a collection of Test Cases

 Test Case – a test case has inputs, steps,

and outputs, as well as expected results

 Process

 write the Test Plan

 write test cases

 run the test cases

Trang 47

Tests and Test Cases (2)

 We will discuss Test Cases in detail in Session 7 and throughout the course.

 “Testing entails establishing the environment,

providing the inputs (running the test case),

observing outputs, and comparing to expected outputs.” (a paraphrase)

 Test Cases are developed, reviewed, used,

managed, and saved – and hopefully reused!

Trang 48

What is Quality?

 Quality from the Producer‟s viewpoint: Does the

product meet the requirements?

 Quality from the Customer‟s viewpoint: Fitness for use (reliability, usability, portability, etc.)

 Quality (one strongly held view): The measure of a product‟s quality is the satisfaction of the customers, not whether it meets a specification

Trang 49

Quality Assurance vs Quality

Control

 Quality Assurance is the activity that

establishes and evaluates the processes that

Trang 50

A Generic Testing Approach

Trang 51

The Tester’s Toolkit

 Static testing

 Structural testing methods

 Functional testing methods

 Non-functional techniques

Trang 52

A little math

Trang 54

Set Theory

 A set is a collection or family or group or

“bunch” of things called its elements

 In formal mathematics, “set” is an undefined term

 We usually use capital letters to refer to sets:

A, B, Y, etc

 If x is an element of a set A, we write x  A

Trang 55

Set Theory – Notation

There are several ways to express sets

 For finite sets, we can just list the elements in

braces: A = {1, 2, 3} or B = {2, 4, 6, …, 20}

 For infinite sets, we can use a list as above:

C = {1, 3, 5, 7, …} as long as how to continue is

Trang 56

Set Theory – Operations

 Union: A U B = the set of elements in either A

Trang 57

Set Theory - Examples

Suppose A = {1, 2, 3, 4, 5}, B = {2, 4, 6, 8}, and our universe is the set of integers from 1-10.What is A U B ?

What is A ∩ B ?

What is A′ ?

What is B′ ?

Trang 58

Set Theory – Cartesian

Product

 An ordered pair of elements is written as

follows: (a, b)

 Whereas {a, b} = {b, a}, it is NOT true that

(a, b) = (b, a) unless a = b Thus, {a, a} = {a},

whereas (a, a) is a legitimate ordered pair.

 A x B is the set of all order pairs (x, y) where

x comes from A and y comes from B

 {1, 2, 3} x {Q, „dog‟} = {(1,Q), (2, Q), (3,Q),

Trang 59

Cartesian Product cont’d

 This concept occurs often in testing.

 Example: Suppose there are 4 possible sets of time periods: 1 week, 1 month, 3 months, 1 year

And suppose there are 3 possible graphs that can

Trang 60

Set Relations

 The empty set has no elements – it‟s denoted by 

 If every element of set A is also an element of set B,

we say A is a subset of B and write A  B or A  B.

 For any set X,   X

 Two sets X and Y are equal, X = Y, if and only if

X  Y and Y  X

 If two sets E and F have no elements in common,

they are disjoint and we write E ∩ F = 

Trang 61

Partitions

We will definitely see this again

If we write a set A as a union of disjoint

non-empty sets, then we say we have a partition

of A

In set notation: A = U Ai, 1 ≤ i ≤ n, with Ai ∩ Aj =

 when i  j

When we talk about Functional Testing we will

discuss Equivalence Class Partitioning

Trang 62

 A function is a mapping from one set to another

 Example: A = {the set of months in 2004},

Ngày đăng: 08/07/2014, 00:20

TỪ KHÓA LIÊN QUAN

w