Ingegneria del Software Corso di Laurea in Informatica per il Management

Similar documents
Ingegneria del Software Corso di Laurea in Informatica per il Management. Design Patterns part 1

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

CSE 374 Programming Concepts & Tools. Hal Perkins Fall 2015 Lecture 15 Testing

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

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

INTRODUCTION TO SOFTWARE ENGINEERING

Lecture 15 Software Testing

Introduction to Dynamic Analysis

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

CS 520 Theory and Practice of Software Engineering Fall 2018

MONIKA HEINER.

Ingegneria del Software Corso di Laurea in Informatica per il Management (D)VCS. Davide Rossi Dipartimento di Informatica Università di Bologna

10. Software Testing Fundamental Concepts

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

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

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

Programming Embedded Systems

Ingegneria del Software Corso di Laurea in Informatica per il Management. Design Patterns part 1

Ingegneria del Software Corso di Laurea in Informatica per il Management. Introduction to UML

Chap 2. Introduction to Software Testing

Levels of Testing Testing Methods Test Driven Development JUnit. Testing. ENGI 5895: Software Design. Andrew Vardy

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

Chapter 10. Testing and Quality Assurance

linaye/gl.html

Software Design Models, Tools & Processes. Lecture 6: Transition Phase Cecilia Mascolo

Verification and Validation of Models for Embedded Software Development Prashant Hegde MathWorks India Pvt. Ltd.

Part 5. Verification and Validation

Software Testing CS 408

Levels of Testing Testing Methods Test Driven Development JUnit. Testing. ENGI 5895: Software Design. Andrew Vardy

Software Testing. Testing: Our Experiences

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

Manuel Oriol, CHCRC-C, Software Testing ABB

Ingegneria del Software Corso di Laurea in Informatica per il Management. Software quality and Object Oriented Principles

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

QUIZ #5 - Solutions (5pts each)

Quality Assurance in Software Development

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

Programming Embedded Systems

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

Verification and Test with Model-Based Design

Chapter 8 Software Testing. Chapter 8 Software testing

Test design techniques

Software Quality Assurance. David Janzen

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

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

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

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

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

CS159. Nathan Sprague. September 30, 2015

Software testing A.A. 2018/2019

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

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

Software Testing. An Overview

Topic: Software Verification, Validation and Testing Software Engineering. Faculty of Computing Universiti Teknologi Malaysia

F. Tip and M. Weintraub FUNCTIONAL TESTING

Software Verification and Validation

Darshan Institute of Engineering & Technology for Diploma Studies

Testing: Test design and testing process

Ingegneria del Software Corso di Laurea in Informatica per il Management

Bridge Course On Software Testing

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

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

People tell me that testing is

Topics. Software Testing Test Driven Development Black Box Testing Unit Testing White Box Testing Coverage Testing Software Debugging

Aerospace Software Engineering

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

Verification and Validation

Verification and Validation

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

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

Software Testing and Maintenance

Test Case Generation Based on Sequence Diagrams

Unit Testing and JUnit

Software Engineering and Scientific Computing

Verification and Validation

Software Testing: Introduction

CSSE 220 Day 3. Check out UnitTesting and WordGames from SVN

Verification and Validation

Unit Testing with JUnit and CppUnit

Test automation / JUnit. Building automatically repeatable test suites

Test automation Test automation / JUnit

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

Computational Systems COMP1209

Sample Exam Syllabus

Manual Testing. Software Development Life Cycle. Verification. Mobile Testing

Software Engineering: Theory and Practice. Verification by Testing. Test Case Design. Tom Verhoeff

WHITE PAPER. 10 Reasons to Use Static Analysis for Embedded Software Development

Write perfect C code to solve the three problems below.

Topics in Software Testing

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

Software Testing Interview Question and Answer

Modern Methods in Software Engineering. Testing.

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

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

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

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

What is Testing? Table of Contents

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

Software Testing. Massimo Felici IF

Examination Questions Time allowed: 1 hour 15 minutes

Transcription:

Ingegneria del Software Corso di Laurea in Informatica per il Management Software testing Davide Rossi Dipartimento di Informatica Università di Bologna

Validation and verification Software testing is part of verification and validation activities Verification: evaluation of artifacts (meeting, reviews) Are we building the right system? Validation: testing Is the system we are building right?

What is testing about? If you don t care about quality, you can meet any other requirement. [G. M. Weinberg] Testing shows the presence, NOT the absence of bugs. [E. W. Dijkstra] Software testing is about revealing as many defect as it is reasonable

Testing and software Testing in software cannot, in general, make use of results gathered from other engineering disciplines. A bridge tested for 1000 tons will surely handle anything inferior, programs do not benefit from this kind of continuity properties. The number of states in software systems is one order of magnitude larger than the number of states in the nonrepetitive parts of computers. [D. Parnas]

Testing and costs The cost for correcting defects in software system is proportional to the time the defect is laying in the system (there are graphs and figures in the literature, most are just wrong). As a consequence we want to test early and often

Jargon Defect (bug) The result of a mistake Failure Happens when the mistake is exposed Issue Describes the failure Test case Describes the expected outcome of a run, it includes data, (pre/post)conditions and (expected) results Test set A collection of test cases

Testing levels Unit Integration System Acceptance Class/method Group of software modules The whole system (in vitro) The system in use

Static/dynamic testing Static testing The code is analyzed in order to find bugs Dynamic testing The code is executed in order to find bugs

Static testing Mostly based on formal methods approach model checking data-flow analysis abstract interpretation symbolic execution Noteworthy tool: Polyspace (marks code on the basis of static analysis: reliable code, faulty code, unreachable code, unproven code, code violating rules) Human reviews are a kind of static testing too.

Black-box testing In black-box testing functionality is examined without any knowledge of internal implementation (what, not how) Testing methods include: Equivalence partitioning Boundary value analysis All-pairs testing State transition tables Decision table testing

White-box testing The internal structure of the code is used to define the test cases. Testing methods include: Control flow / data flow Branch testing (decision coverage) Path testing (code coverage)

White vs Black pros and cons White pro: knowledge on the code is acquired while building the test cases White pro: higher coverage White con: complex Black pro: testers who are not coders Black pro: closer to requirements Black con: unknown coverage

Test the tests How do I assess the quality of my test set? Mutation testing Create mutants of your code Run your tests on the mutants If a test passes you have a problem (Actually usable) mutation testing for Java: PIT

Unit testing In unit testing single units of code (functions, methods) are tested. Unit testing is used to ensure that code meets expectations and that code continues to meet expectations (regression testing). Units have to be tested in isolation. The test set for each unit contains independent cases.

Isolation? How do we untangle the code from its dependencies? Use stub methods and fake/mock objects. They provide the same interface with simplified code.

XUnit A framework for unit testing originally designed by K. Beck. Most widely used implementation: JUnit [E. Gamma] The components of XUnit s the architecture are: Test runner Test case (uses assertions one per case) Test fixtures (or contexts) Test suites Test execution