XVIII. Software Testing. Laurea Triennale in Informatica Corso di Ingegneria del Software I A.A. 2006/2007 Andrea Polini

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.

Ingegneria del Software Corso di Laurea in Informatica per il Management

Lecture 15 Software Testing

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

Part I: Preliminaries 24

Part 5. Verification and Validation

Testing! Prof. Leon Osterweil! CS 520/620! Spring 2013!

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

Software Testing. Testing: Our Experiences

Using the code to measure test adequacy (and derive test cases) Structural Testing

(See related materials in textbook.) CSE 435: Software Engineering (slides adapted from Ghezzi et al & Stirewalt

Introduction to Dynamic Analysis

10. Software Testing Fundamental Concepts

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

MONIKA HEINER.

Testing. CMSC 433 Programming Language Technologies and Paradigms Spring A Real Testing Example. Example (Black Box)?

Aerospace Software Engineering

Topics in Software Testing

Software Testing. Massimo Felici IF

Testing: Test design and testing process

Software Testing CS 408

Software Quality Assurance. David Janzen

Black Box Testing. EEC 521: Software Engineering. Specification-Based Testing. No Source Code. Software Testing

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

Testing Process and Methods. CS 490MT/5555, Spring 2017, Yongjie Zheng

Chapter 8 Software Testing. Chapter 8 Software testing

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

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

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

Chapter 10. Testing and Quality Assurance

CSE 403: Software Engineering, Fall courses.cs.washington.edu/courses/cse403/16au/ Unit Testing. Emina Torlak

Computational Systems COMP1209

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

No Source Code. EEC 521: Software Engineering. Specification-Based Testing. Advantages

Software Engineering and Scientific Computing

Software Testing TEST CASE SELECTION AND ADEQUECY TEST EXECUTION

INTRODUCTION TO SOFTWARE ENGINEERING

International Journal of Computer Engineering and Applications, Volume XII, Special Issue, September 18, ISSN SOFTWARE TESTING

White Box Testing III

Coding and Unit Testing! The Coding Phase! Coding vs. Code! Coding! Overall Coding Language Trends!

Simulink Verification and Validation

An Introduction to Systematic Software Testing. Robert France CSU

Testing & Continuous Integration. Kenneth M. Anderson University of Colorado, Boulder CSCI 5828 Lecture 20 03/19/2010

International Journal of Computer Engineering and Applications, Volume XII, Special Issue, April- ICITDA 18,

People tell me that testing is

15. Regression testing

Verification and Validation

QUIZ #5 - Solutions (5pts each)

CS 520 Theory and Practice of Software Engineering Fall 2018

Software testing. Ian Sommerville 2006 Software Engineering, 8th edition. Chapter 23 Slide 1

Testing. Prof. Clarkson Fall Today s music: Wrecking Ball by Miley Cyrus

(From Glenford Myers: The Art of Software Testing)

Chapter 9. Software Testing

Software Testing. Software Testing. in the textbook. Chapter 8. Verification and Validation. Verification and Validation: Goals

Software Engineering (CSC 4350/6350) Rao Casturi

Testing Role in Unified Approach Coverage: Structural/Coverage Model Based Test Generation from Model Checking (project) Interaction of

Tools for Security Testing

CMSC 132: OBJECT-ORIENTED PROGRAMMING II

Manuel Oriol, CHCRC-C, Software Testing ABB

F. Tip and M. Weintraub FUNCTIONAL TESTING

Software Engineering 2 A practical course in software engineering. Ekkart Kindler

Quality Assurance in Software Development

Testing & Debugging TB-1

MACHINE LEARNING BASED METHODOLOGY FOR TESTING OBJECT ORIENTED APPLICATIONS

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

Darshan Institute of Engineering & Technology Unit : 9

Software Testing. Software Testing

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

Second assignment came out Monday evening. Find defects in Hnefetafl rules written by your classmates. Topic: Code Inspection and Testing

Coverage Criteria for GUI Testing. Research focus

Bridge Course On Software Testing

Chapter 8 Software Testing

Verification Overview Testing Theory and Principles Testing in Practice. Verification. Miaoqing Huang University of Arkansas 1 / 80

Chapter 8 Software Testing. Chapter 8 So-ware tes0ng

Coverage Criteria for GUI Testing. Research focus. GUI Test Case. Sequence of Events. Not just individual events

Test Case Specifications and Test adequacy. Research Methods - Barbara Russo SwSE - Software and Systems Engineering

Ian Sommerville 2006 Software Engineering, 8th edition. Chapter 22 Slide 1

Verification and Validation

Integration Testing Qualidade de Software 2

Black-box Testing Techniques

Software Testing. Lecturer: Sebastian Coope Ashton Building, Room G.18

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

SOFTWARE ENGINEERING SOFTWARE VERIFICATION AND VALIDATION. Saulius Ragaišis.

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

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

Software Engineering

Software Engineering Fall 2014

Efficient Regression Test Model for Object Oriented Software

CSE Verification Plan

Higher-order Testing. Stuart Anderson. Stuart Anderson Higher-order Testing c 2011

Software Engineering Testing and Debugging Testing

Specification-based Testing 2

The testing process. Component testing. System testing

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

Testing! The material for this lecture is drawn, in part, from! The Practice of Programming (Kernighan & Pike) Chapter 6!

Examination Questions Time allowed: 1 hour 15 minutes

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

Advanced Software Engineering: Software Testing

ASIC world. Start Specification Design Verification Layout Validation Finish

Transcription:

XVIII. Software Testing Laurea Triennale in Informatica Corso di

Objective General discussion on Testing Testing Phases Approaches to testing Structural testing Functional testing Testing non functional behaviour Adequacy 2

What is testing? Software testing consist of the dynamic verification of the behavior of a program on a finite set of test cases, suitably selected from the usually infinite execution domain, against the specified expected behavior [Antonia Bertolino SWEBOK] Implied tasks: designing the test cases executing the software with those test cases examining the produced results 3

Error/Fault/Failure Error Introduction of a wrong behaviour in the code Fault The emergence of a wrong condition within the system caused by the error Failure The observation of a wrong situation in the system behaviour 4

Interaction Constraints Testing is striclty related to two concepts: What we can control e.g. Object interfaces What we can observe e.g. Return value Platforms can be extended with support for testing...increase control and observability Certainly investments should be directed to observations for which we can provide an oracle Testability: what is it? How can be improved? 5

The Oracle Problem Is it the result provided by the System Under Test (SUT) correct or not? Manual derivation of Oracles Usage of models to define oracles In general weaker relation among the inputs and the outputs permit to highlight errors oracles can be derived from history of executions of available systems providing same functionality Deriving an oracle is a really expensive task and should not consist in the implementation of another system Relevant theoretical results limit the possibility of automatic derivation of oracles 6

Testing Strategy Testing cannot reveal the absence of errors and can only show their presence Develop strategy that maximise the chance of discovering bugs Testing as fishing Systematic exploration of a system characteristics Testing should be an adaptive phase Different technology show different problems OO Late binding, inheritance CBS software reused in different context and produced by third parties Testing strategy should exploit characteristics of a technology 7

Testing phases Unit Testing Integration Testing System Testing Regression Testing 8

Structural Testing Also known as white box testing Is based on the assumption that only when executed an error can manifest itself. i.e. a wrong statement must be executed Requires the availability of the source code Different code characteristics can be considered: Data Definition and Usage Statements Conditional Increasing level of complexity 9

Structural Testing All Statements Coverage: All statements should be executed at least once All Branches Coverage All branches should be executed at least once All Paths Coverage All paths should be executed at least once 10

Coverage examples 11

Functional Testing Also known as Black box testing Assume the availability of a model for the system (the specification) Requirements based testing Data Models Several methodologies to derive tests: Boundary conditions, Category Partitions Behavioural Models Availability of state machines and definition of invocation sequences to observe that traces Coverage on behavioural models 12

Automatic support for the testing phase Availability of Models permits the development of tools for automatic derivation of test cases This permit to management to save a lot o money Model Based Testing 13

Testing non functional behaviour Inspection cannot be used to show lack of QoS Testing can help the developer to derive QoS correct systems Platforms reproducing the environment are required Simulator of real usage are required (workload generator) 14

Adeguacy Criteria and Assesment Traditional notion of test adequacy: A test adequacy criterion is a systematic method used to determine whether a test suite provides an adequate amount of testing for a program [component] under test When to stop testing: related to required level of confidence related to budget How can be defined? A fault based approach: fault injection 15

JUnit Every programmer knows they should write tests for their code. Few do. The universal response to "Why not?" is "I'm in too much of a hurry." This quickly becomes a vicious cycle the more pressure you feel, the fewer tests you write. The fewer tests you write, the less productive you are and the less stable your code becomes. The less productive and accurate you are, the more pressure you feel. code a little, test a little, code a little, test a little Provide a framework to define, group and (re )execute test cases 16