Software Testing ETSN00

Similar documents
MTAT : Software Testing

MTAT : Software Testing

MTAT Software Engineering

MTAT Software Engineering

MTAT : Software Testing

MTAT : Software Testing

Specification-based test design

MTAT : Software Testing

MTAT : Software Testing

Black-box Testing Techniques

MTAT : Software Testing

Test design techniques

UNIT-4 Black Box & White Box Testing

UNIT-4 Black Box & White Box Testing

MTAT : Software Testing

CS 4387/5387 SOFTWARE V&V LECTURE 4 BLACK-BOX TESTING

Introduction. Easy to get started, based on description of the inputs

Equivalence Class Partitioning and Boundary Value Analysis -Black Box Testing Techniques

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

Testing: Test design and testing process

Testing is a very big and important topic when it comes to software development. Testing has a number of aspects that need to be considered.

2. You are required to enter a password of up to 100 characters. The characters must be lower ASCII, printing characters.

Machine Learning (CSE 446): Decision Trees

White-Box Testing Techniques III

Black Box Testing (revisited) Csci 565 Spring 2007

People tell me that testing is

Test design: Part I. Software Testing: INF3121 / INF4121

Testing Theory. Agenda - What will you learn today? A Software Life-cycle Model Which part will we talk about today? Theory Lecture Plan

Software Quality Assurance. David Janzen

7.0 Test Design Techniques & Dynamic Testing

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

Software Testing. Testing 1

Introduction to Software Engineering

Software Engineering (CSC 4350/6350) Rao Casturi

Programming Languages

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

Software Engineering Fall 2014

LECTURE 9 TEST DESIGN TECHNIQUES - II

Aerospace Software Engineering

MONIKA HEINER.

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

ASTQB Advance Test Analyst Sample Exam Answer Key and Rationale

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

Introduction to Operating Systems Prof. Chester Rebeiro Department of Computer Science and Engineering Indian Institute of Technology, Madras

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

Developing Requirements- Based Tests. CSCE Lecture 8-09/21/2015

Software Testing Fundamentals. Software Testing Techniques. Information Flow in Testing. Testing Objectives

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

Darshan Institute of Engineering & Technology Unit : 9

Microsoft Access - Using Relational Database Data Queries (Stored Procedures) Paul A. Harris, Ph.D. Director, GCRC Informatics.

Theme 2 Program Design and Testing

Part I: Preliminaries 24

White-Box Testing Techniques

Lecture 12. Lists (& Sequences)

Brand Guidelines. RealVNC Brand Guidelines 1

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

Software Engineering

Types of Software Testing: Different Testing Types with Details

Input Space Partitioning

Certified Automotive Software Tester Sample Exam Paper Syllabus Version 2.0

Global Optimization. Lecture Outline. Global flow analysis. Global constant propagation. Liveness analysis. Local Optimization. Global Optimization

BusinessObjects Edge Series - Professional for Linux

Programming Languages

CSCI 161 Introduction to Computer Science

BusinessObjects Enterprise XI 3.0 for Linux

StarFinder Aire User Manual

Part 5. Verification and Validation

Lecture Notes on Lisp A Brief Introduction

BECOME A LOAD TESTING ROCK STAR

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

Allows full two way communication from any USB or RS232 port to an SPI device.

10. Software Testing Fundamental Concepts

Software Testing. 1. Testing is the process of demonstrating that errors are not present.

Introduction to Computers and Programming

Lecture 2. Variables & Assignment

5. Minimizing Circuits

Hyperion System 9 BI+ Analytic Services

Topics in Software Testing

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

Functional Testing (Black Box Testing)

ITP 140 Mobile App Technologies. Colors

CISC 3140 (CIS 20.2) Design & Implementation of Software Application II

Lock-based concurrency control. Q: What if access patterns rarely, if ever, conflict? Serializability. Concurrency Control II (OCC, MVCC)

BusinessObjects Edge Series - Premium for Windows

Chapter 2. Basic Operations. you through the routine procedures that you will use nearly every time you work with SPSS.

SOFTWARE TESTING UNIT II TEST CASE DESIGN

Release Notes for Cisco Insight v2, Release 2.0.0

Software Testing and Maintenance 1

ARTIFICIAL INTELLIGENCE (CS 370D)

Lecture 15 Software Testing

A Random Walk through CS70

Brand Guidelines. Version 2.0. RealVNC Brand Guidelines 1

Software Engineering I (02161)

Database Applications (15-415)

Write a code fragment that prints yes if xc is in the interval and no if it is not.

Lab 1 (fall, 2017) Introduction to R and R Studio

Introduction to SPSS

Bug tracking. Second level Third level Fourth level Fifth level. - Software Development Project. Wednesday, March 6, 2013

BusinessObjects Metadata Management XI 3.0 for Windows

Software Testing: Introduction

Transcription:

Software Testing ETSN00 http://cs.lth.se/etsn20 Chapter 6, 9.2-9.6 Prof. Per Runeson

Lecture Chapter 6: Domain Testing Chapter 9.2-9.6: Functional Testing Black-bo testing techniques (Lab 2)

Types of Testing Level of detail acceptance system integration unit portability maintainability white bo black bo Accessibility efficiency usability reliability functionality Characteristics

Definitions A domain is a set of input values for which the program performs the same computation for every member of the set. Computation Error occurs when a specific input data causes the program to eecute the correct, i.e., desired path, but the output value is wrong. Domain Error occurs when a specific input data causes the program to eecute a wrong, that is, undesired, path in the program.

Domain testing Input domain D Input domain D Program P (a) Program output Black bo D 3 D 1 D 4 D 5 D2 Program P Program output (b) Program P D 3 Input domain D D 4 D 5 D 1 D2 Conceptual input classifier Computation for D 1 : : Program output Grey bo Computation for D 5 (c)

White/Grey bo domain testing - find domains from the code 14 1. Draw a control flow graph from the given source code 2. Find all possible interpretations of the predicates 3. Analyze the interpreted predicates to identify domains y 12 7 6 1 0 1... 6 7 TT FF TF FT 7 6 4 1 0 1... 4 7 P 2 (P 1 = False) P 1 P 2 (P 1 = True)

Black bo Input domains Output domains domain testing P Find domains from the specification/ interface Input domains (a) Output domains P (b)

Black-Bo Testing Methods Equivalence class partitioning (ECP) Boundary value analysis (BVA) Combinatorial testing State transition testing Error guessing

Eample Insurance System Specification Statement System shall reject over-age insurance applicants. Specification Item Reject male insurance applicants over the age of 80 years on day of application. Reject female insurance applicants over the age of 85 years on day of application.

Equivalence Class Partioning Split input/output into classes which the software handles equivalently. Select test cases to represent each class.

Eample (cont.) Input: Gender & Age Output: accept/reject Classes C1: Input: Males over 80 C2: Input: Males 80 or under C3: Input: Females over 85 C4: Input: Females 85 or under C5: Output: accept C6: Output: reject Test Cases Valid: TC1: male, 83, reject TC2: male, 56, accept TC3: female, 101, reject TC4: female, 83, accept Invalid: TC5: female, -3,?? TC6: fmale, 14,??

Equivalence Partitioning Guidelines If input condition [Myers79/04]: is a range, e.g., = [0, 9] is an ordered list of values, e.g., owner = <1, 2, 3, 4> à one valid and two invalid classes are defined is a set, e.g., vehicle = [car, motorcycle, truck] is a must be condition (boolean) à one valid and one invalid class are defined is anything else à partition further

Boundary Value Analysis Adds to the equivalence partitioning method. Select test cases to represent each side of the class boundaries.

Eample cont. Input: Gender & Age Output: accept/reject Classes C1: Males over 80 C2: Males 80 or under C3: Females over 85 C4: Females 85 or under C5: Output accept. C6: Output reject. Test Cases Valid TC1: male, 81, reject TC2: male, 80, accept TC3: female, 86, reject TC4: female, 85, accept Invalid: TC5: female, -1,?? TC6: female, 0, accept TC7: fmale, -1,?? TC8: fmale, 0,??

Boundary Value Analysis Guidelines Range a..b Þ a, b, just above a, just below b List of values: ma, min, just below min, just above ma Boundaries of eternally visible data structures shall be checked (e.g. ordered sets, arrays) Output bounds should be checked

Combinatorial Designs ECP and BVA define test cases per class Combinations of equivalence classes need to be handled Combinatorial eplosion needs to be handled

Combinatorial Testing Chap 9.3 and [Hagar et al 2015] http://csrc.nist.gov/groups/sns/acts/ What is it? Methods for systematically testing t-way interaction effects of input (or configuration parameter) values. Why do it? The interaction of specific combinations of input values may trigger failures that won t be triggered if testing input (or configuration parameter) values only in isolation.

Two Scopes of Combinatorial Testing Test Configurations Test Inputs Loc Tsize Dsize Sel Strt Sm Sm Mou Strt Lg Lg Key Test inputs Mid Sm Lg Mou Mid Lg Sm Key End Sm Sm Key End Lg Lg Mou Test case OS CPU Protocol 1 Windows Intel IPv4 2 Windows AMD IPv6 3 Linu Intel IPv6 4 Linu AMD IPv4 Tet Editor System under test

Combinatorial Testing Eample 1 Platform configuration parameters: OS: Windows XP, Apple OS X, Red Hat Linu Browser: Internet Eplorer, Firefo Protocol: IPv4, IPv6 CPU: Intel, AMD DBMS: MySQL, Sybase, Oracle Total number of combinations: 3*2*2*2*3 = 72 Do we need 72 test cases? Eample from: https://courses.cs.ut.ee/mtat.03.159/2013_spring/ uploads/main/swt_comb-paper2.pdf

Pair-Wise Testing (2-Way Interaction) Only 10 test needed, if we want to test all interactions of one parameter with one other parameter (pairwise interaction) # of pairs: " 5 $ % 5! ' = # 2& 2!(5 2)! =10 # of 2-way interactions N=57: " 40 = $ 5% # 2& ' 2 2 N " $ 5% # 2 ' 3 2 = 90 & Test OS Browser Protocol CPU DBMS 1 XP IE IPv4 Intel MySQL 2 XP Firefo IPv6 AMD Sybase 3 XP IE IPv6 Intel Oracle 4 OS X Firefo IPv4 AMD MySQL 5 OS X IE IPv4 Intel Sybase 6 OS X Firefo IPv4 Intel Oracle 7 RHL IE IPv6 AMD MySQL 8 RHL Firefo IPv4 Intel Sybase 9 RHL Firefo IPv4 AMD Oracle 10 OS X Firefo IPv6 AMD Oracle

Pair-Wise Testing (2-Way Interaction) Only 10 tests needed, if we want to test all interactions of one parameter with one other parameter (pairwise interaction) Pair 1: 3 2 = 6 Combinations Test OS Browser Protocol CPU DBMS 1 XP IE IPv4 Intel MySQL 2 XP Firefo IPv6 AMD Sybase 3 XP IE IPv6 Intel Oracle 4 OS X Firefo IPv4 AMD MySQL 5 OS X IE IPv4 Intel Sybase 6 OS X Firefo IPv4 Intel Oracle 7 RHL IE IPv6 AMD MySQL 8 RHL Firefo IPv4 Intel Sybase 9 RHL Firefo IPv4 AMD Oracle 10 OS X Firefo IPv6 AMD Oracle

Pair-Wise Testing (2-Way Interaction) Only 10 tests needed, if we want to test all interactions of one parameter with one other parameter (pairwise interaction) Pair 2: 2 2 = 4 Combinations Test OS Browser Protocol CPU DBMS 1 XP IE IPv4 Intel MySQL 2 XP Firefo IPv6 AMD Sybase 3 XP IE IPv6 Intel Oracle 4 OS X Firefo IPv4 AMD MySQL 5 OS X IE IPv4 Intel Sybase 6 OS X Firefo IPv4 Intel Oracle 7 RHL IE IPv6 AMD MySQL 8 RHL Firefo IPv4 Intel Sybase 9 RHL Firefo IPv4 AMD Oracle 10 OS X Firefo IPv6 AMD Oracle

Pair-Wise Testing (2-Way Interaction) Only 10 tests needed, if we want to test all interactions of one parameter with one other parameter (pairwise interaction) Pair 3: 3 3 = 9 Combinations Test OS Browser Protocol CPU DBMS 1 XP IE IPv4 Intel MySQL 2 XP Firefo IPv6 AMD Sybase 3 XP IE IPv6 Intel Oracle 4 OS X Firefo IPv4 AMD MySQL 5 OS X IE IPv4 Intel Sybase 6 OS X Firefo IPv4 Intel Oracle 7 RHL IE IPv6 AMD MySQL 8 RHL Firefo IPv4 Intel Sybase 9 RHL Firefo IPv4 AMD Oracle 10 OS X Firefo IPv6 AMD Oracle

Combinatorial Testing Eample 2 Many variables Many values per variable Need to abstract values (equivalence classes, boundary values) Plan: flt, flt+hotel, flt+hotel+car From: CONUS, HI, AK, Europe, Asia To: CONUS, HI, AK, Europe, Asia Compare: yes, no Date-type: eact, 1to3, fle Depart: today, tomorrow, 1yr, Sun, Mon Return: today, tomorrow, 1yr, Sun, Mon Adults: 1, 2, 3, 4, 5, 6 Minors: 0, 1, 2, 3, 4, 5 Seniors: 0, 1, 2, 3, 4, 5

Is Testing 2-Way Interactions Enough? Analyses of failure-triggering conditions showed this: Medical device (dark blue) NASA distrib. DB (light blue) Browser (green) Web server (magenta) Network security (orange) TCAS* module (purple) * Traffic Collision Avoiding System

Is Testing 2-Way Interactions Enough? Several studies have shown that Pair-wise Testing finds between 50% and 90% of all failures. More strengths than 6-way interaction has hardly ever shown to find more defects. Why is that good?

Combinatorial Testing Eample 3 How Many Tests Would It Take? There are 10 effects, each can be on or off All combinations is 2 10 = 1,024 tests too many to visually check Let s look at all 3-way interactions

How Many Tests Would it Take? There are " 10% $ ' =120 # 3 & Naively 120 2 3 = 960 tests. 3-way interactions. Since we can pack 3 triples into each test, we need no more than 320 tests. Each test eercises many triples: 0 0 0 1 1 1 0 1 0 1 We should be able to pack many in one test, so what s the smallest number we need?

Covering Arrays Each row is a test: Each column is a parameter: All 3-way interactions in only 13 tests http://d.doi.org/10.6028/nist.sp.800-142

How to Generate Covering Arrays? Combinatorial testing requires many tests Number of tests: Suppose we want all 4-way combinations of 30 parameters, 5 values each à 3,800 tests May need 10 3 to 10 7 tests for realistic systems Generating covering arrays is a hard problem, one reason why anything beyond pair-wise testing is rarely done Solution: New algorithms can produce large covering arrays, quickly

ACTS Tool (NIST & UT Arlington)

State-Transition Testing Create a set of test cases that triggers each event at least once

Error Guessing Eploratory testing, happy testing,... Always worth including Can detect some failures that systematic techniques miss Consider Past failures (fault models) Intuition Eperience Brain storming What is the craziest thing we can do? Lists in literature

Recommended Eercises Chapter 6 1, 3, 4, 5, 7, 8 Chapter 9 2, 4, 5, 6, 7, 8, 9

This Week Project Find/read literature Lab 1 Thursday: White-bo testing

Net Week Project Report outline (Jan 30) Lab 2 Thursday : Black-bo testing