Chap 2. Introduction to Software Testing

Similar documents
In this Lecture you will Learn: Testing in Software Development Process. What is Software Testing. Static Testing vs.

Overview. State-of-the-Art. Relative cost of error correction. CS 619 Introduction to OO Design and Development. Testing.

Standard Glossary of Terms used in Software Testing. Version 3.2. Advanced Test Automation - Engineer Terms

Bridge Course On Software Testing

Three General Principles of QA. COMP 4004 Fall Notes Adapted from Dr. A. Williams

Software Testing and Maintenance

Topics in Software Testing

Software Engineering (CSC 4350/6350) Rao Casturi

Software Engineering Fall 2015 (CSC 4350/6350) TR. 5:30 pm 7:15 pm. Rao Casturi 11/10/2015

Software Testing part II (white box) Lecturer: Giuseppe Santucci

Computer Science and Software Engineering University of Wisconsin - Platteville 9-Software Testing, Verification and Validation

Software Testing Interview Question and Answer

Software Engineering Fall 2014

Verification and Validation. Assuring that a software system meets a user s needs. Verification vs Validation. The V & V Process

Quote by Bruce Sterling, from: A Software Testing Primer, Nick Jenkins

Lecture 15 Software Testing

Ingegneria del Software Corso di Laurea in Informatica per il Management

1 Visible deviation from the specification or expected behavior for end-user is called: a) an error b) a fault c) a failure d) a defect e) a mistake

Standard Glossary of Terms used in Software Testing. Version 3.2. Foundation Extension - Usability Terms

Software Testing. Massimo Felici IF

Integration and Testing. Uses slides from Lethbridge & Laganiere, 2001

Chapter 9 Quality and Change Management

Pearson Education 2007 Chapter 9 (RASD 3/e)

Software Testing CS 408

Verification and Validation. Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 22 Slide 1

Pearson Education 2005 Chapter 9 (Maciaszek - RASD 2/e) 2

Testing. ECE/CS 5780/6780: Embedded System Design. Why is testing so hard? Why do testing?

10. Software Testing Fundamental Concepts

Lecture 20: SW Testing Presented by: Mohammad El-Ramly, PhD

Chapter 11, Testing. Using UML, Patterns, and Java. Object-Oriented Software Engineering

Software Testing. Software Testing

Verification and Validation

Verification and Validation

Requirements Validation and Negotiation

Software Testing. An Overview

Examination Questions Time allowed: 1 hour 15 minutes

UNIT-2 Levels of Testing

Program Analysis. Program Analysis

Testing. Unit, integration, regression, validation, system. OO Testing techniques Application of traditional techniques to OO software

Part 5. Verification and Validation

Sample Exam Syllabus

MONIKA HEINER.

INTRODUCTION TO SOFTWARE ENGINEERING

Part I: Preliminaries 24

Client-server application testing plan

Programming Embedded Systems

Introduction to Software Testing

Standard Glossary of Terms used in Software Testing. Version 3.1. Expert Test Manager Terms

Standard Glossary of Terms used in Software Testing. Version 3.2. Beta - Foundation Terms

CS 424 Software Quality Assurance & Testing LECTURE 3 BASIC CONCEPTS OF SOFTWARE TESTING - I

Integration Testing. Conrad Hughes School of Informatics. Slides thanks to Stuart Anderson

Chapter 8 Software Testing. Chapter 8 Software testing

Test design techniques

Why testing and analysis. Software Testing. A framework for software testing. Outline. Software Qualities. Dependability Properties

UX Research in the Product Lifecycle

door Sasa Berberovic

Chapter 10. Testing and Quality Assurance

Lecture 26: Testing. Software Engineering ITCS 3155 Fall Dr. Jamie Payton

An Introduction to Systematic Software Testing. Robert France CSU

Terminology. There are many different types of errors and different ways how we can deal with them.

Manuel Oriol, CHCRC-C, Software Testing ABB

Software Testing Strategies. Slides copyright 1996, 2001, 2005, 2009, 2014 by Roger S. Pressman. For non-profit educational use only

Facts About Testing. Cost/benefit. Reveal faults. Bottom-up. Testing takes more than 50% of the total cost of software development

Question 1: What is a code walk-through, and how is it performed?

Sample Exam. Certified Tester Foundation Level

Software Testing for Developer Development Testing. Duvan Luong, Ph.D. Operational Excellence Networks

TSW Reliability and Fault Tolerance

Sample Question Paper. Software Testing (ETIT 414)

Verification and Validation

Verification and Validation

Testing. Outline. What is this? Terminology. Erroneous State ( Error ) Algorithmic Fault

CODE / CONFIGURATION COVERAGE

Object-Oriented Software Engineering Conquering Complex and Changing Systems. Chapter 9, Testing

Integration Testing. Unit Test vs Integration Testing 1. Unit Testing vs Integration Testing 2. Unit testing: isolation, stub/mock objects

Software Quality Assurance (SQA) Software Quality Assurance

2.5.1: Reforms in Continuous Internal Evaluation (CIE) System at the Institutional Level

Types of Software Testing: Different Testing Types with Details

Aerospace Software Engineering

Human Error Taxonomy

Literature. CHAPTER 5 Testing. When to Test? The Unified Process. When to Test?

Rapid Bottleneck Identification A Better Way to do Load Testing. An Oracle White Paper June 2008

Three Ways to Reduce Product Delivery Risk and to Lower Software Lifecycle Costs

Software Testing. Testing: Our Experiences

Getting those Bugs Out --Software Testing

Introduction To Software Testing. Brian Nielsen. Center of Embedded Software Systems Aalborg University, Denmark CSS

People tell me that testing is

S/W Programming & Languages

(From Glenford Myers: The Art of Software Testing)

EECS 4313 Software Engineering Testing. Topic 01: Limits and objectives of software testing Zhen Ming (Jack) Jiang

The Integration Phase Canard. Integration and Testing. Incremental Integration. Incremental Integration Models. Unit Testing. Integration Sequencing

MIS Week 9 Host Hardening

Department of Electrical & Computer Engineering, University of Calgary. B.H. Far

Model-Based Testing: An Evaluation

CYSE 411/AIT 681 Secure Software Engineering. Topic #6. Seven Software Security Touchpoints (III) Instructor: Dr. Kun Sun

Fault-Injection testing and code coverage measurement using Virtual Prototypes on the context of the ISO standard

4. Risk-Based Security Testing. Reading. CYSE 411/AIT 681 Secure Software Engineering. Seven Touchpoints. Application of Touchpoints

Integration Testing Qualidade de Software 2

Standard Glossary of Terms Used in Software Testing. Version 3.01

UNIT OBJECTIVE. Understand what system testing entails Learn techniques for measuring system quality

UNIT-4 Black Box & White Box Testing

Transcription:

Chap 2. Introduction to Software Testing 2.1 Software Testing Concepts and Processes 2.2 Test Management 1

2.1 Software Testing Concepts and Processes 1. Introduction 2. Testing Dimensions 3. Test Concepts and Tasks 4. Lifecycle Testing 2

1. Introduction -Testing is the process of uncovering evidence of flaws and fixing these flaws in software systems. Flaws may result from various reasons such as mistakes, misunderstandings, and omissions occurring during any phase of software development. -Testing allows mitigating software risks. Testing is conducted according to a test plan, which is more effectively driven by the specific risks faced by the system. The risks determine what type of tests need to be conducted; The test plan determines how much testing is needed or is acceptable from a business perspective. -Testing remains one of the most costly and challenging aspects of the software development process. From a business perspective, there is an optimum level of testing, which is acceptable. Beyond the optimum level, testing becomes less cost-effective, because the cost of testing simply exceeds the gains obtained from the defects detected. 3

Purpose of Testing -According to the test objectives, different approaches may be used: Defect testing: guided by the objective of uncovering latent defects in the program, before delivering it; involves exercising the program in order to trigger some incorrect behavior, exposing some defect. Validation testing: establish that the system behaves according to its specification; requires testing the system or correct behavior by exercising some acceptance testing criteria. - Hence, missions of test groups can vary: Find defects; Maximize bug count Block premature product releases; Help managers make ship / no-ship decisions Assess/Assure quality; Conform to regulations Minimize technical support costs; Minimize safety-related lawsuit risk Assess conformance to specification/ Verify correctness of the product Find safe scenarios for use of the product (find ways to get it to work, in spite of the bugs) 4

2. Test Dimensions -Since program errors are diverse and complex, no single test technique can cover all kinds of errors. In practice, a combination of several techniques is used to achieve adequate testing. There are many levels of testing as well as many dimensions to testing, which should be considered in order to test appropriately a software system. Test Scopes -There are three levels of testing: Unit Testing: targets small piece of software entity such as a method, a class, a cluster of interdependent classes, or a software component. Integration Testing: tests the interactions between a collection of related functions or components. System Testing: test the whole system after all the components or subsystems are combined into the final product. 5

Testing Dimensions -Testing dimensions can be defined based on two criteria: task and data. Testing activities can be categorized in either validation or verification tasks. Based on the test data available, testing can be categorized in either functional testing or structural testing. Validation & Verification -Verification consists of checking that the system works according to the organization's standards and processes. Verification techniques include requirements review, design review, code walkthrough, and code inspection. -Validation consists of ensuring that the system functions according to the specification. Involves executing the system in real-life scenarios and checking whether it behaves as expected. Validation techniques include unit testing, integration testing, system testing, and user acceptance testing. 6

Functional vs. Structural Testing -Functional testing, also called black box testing, consists of checking the system without having or using any knowledge of the internal logic in developing the test cases. Mostly accomplished using validation techniques. Checks that the software system is built according to the requirements. -Structural testing, also called white-box testing, use knowledge of the internal logic to develop test cases. Checks the structure of the software artifacts (e.g., code, design etc.). Mostly accomplished using verification techniques. 7

3. Test Concepts and Tasks Test Concepts -Test case: specification of inputs and outputs required to reveal defects Consists of the pretest state and environment, the test inputs and expected outputs and state. Expected outputs may include data, messages or exceptions generated by the application under testing. Input test data System I e Inputs causing anomalous behavior Output test results O e Outputs revealing defects -Test oracle: a technique or mechanism used to produce expected results under specific conditions. -Test strategy: an algorithm and/or a collection of heuristics used to identify interesting test cases for an application under testing. -Test suite: a collection of test cases, typically related by a testing goal or implementation dependency. 8

Example: an IUT and some corresponding test cases and test suite int prog(int X, int Y) { x = X; y = Y; if (x > 100) { x = x 100; } else { x = x + 100; } } if (x <= y) { y = 2*y; } else { if (x > 200) { x = x - 100; } else { x = x*x; } } printf( x=%d. y=%d,x, y); Sample test cases: Test case Id Tc1 Tc2 Tc3 Input X 10 101 201 Sample test suite: Y 100 100 110 Expected Output x 110 1 1 y 200 100 110 {Tc1, Tc2, Tc3} 9

Test concepts (ctd.) -Test run: the execution with actual results of a test suite(s). Actual results are compared against expected one, in order to decide the outcome: pass or no pass. pass: actual results are the same as expected one. no pass: actual results are different from expected ones; this reveals a bug, and is therefore considered a successful test. -Test driver: a class or utility program that applies test cases to an implementation under testing (IUT) -Stub: a partial, temporary implementation of a component, that may serve as a placeholder for an incomplete component or implement testing support code. -Test script: a program written in a procedural script language (usually interpreted) that executes a test suite(s). -Test harness: a system of test drivers and other tools supporting test execution. 10

Testing Tasks Test cases Test data Test results Test reports Design test cases Prepare test data Run program with test data Compare results to test cases 1. Design test cases: define and generate test cases using selected test strategies. 2. Prepare test data: instantiate the test cases by generating test points. 3. Execute test cases/suites: applies the test points to the IUT. 4. Compare results: compare the actual outputs with expected ones, and report corresponding test results. 11

4. Lifecycle Testing Traditional Testing Approaches -Traditionally testing occurs at the latter phases of the software development cycle -However, restricting testing to a single phase creates the potential that errors with significant and costly consequences may occur. 12

-Studies conducted by IBM over several major projects have shown that: an average of 60 defects could be detected during application development: 50% of the defects could be detected when testing is conducted before the implementation phase, 80% could be detected when testing is conducted after implementation. It is at least 10 times more expensive to fix a defect after implementation than before, and 100 times more expensive during maintenance. -Lessons learned: Importance of starting testing as early as possible. Necessity to integrate testing in the entire development life cycle, and not only after coding or during production. -Lifecycle testing is recommended as alternative to traditional testing: Incorporates testing in all the phases of the development process, and as such it spans the entire software lifecycle. Starts at the same time as the product development process; both processes run concurrently and should be conducted using well structured but different methodologies. 13

Lifecycle Testing Requirements Testing: ensure that the requirements are recorded or documented properly, and address user and business concerns. Design Testing: ensure that the design is complete, accurate and matches with the requirements. Implementation Testing: ensure that the design specification has been correctly implemented. Maintenance Testing: involve deployment testing at the installation, and regression testing during operation. 14