Software Testing CS 408

Similar documents
Object-Oriented Software Engineering Practical Software Development using UML and Java

Software Testing CS 408. Lecture 11: Review 2/20/18

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

Object-Oriented Software Engineering Practical Software Development using UML and Java. Chapter 10: Testing and Inspecting to Ensure High Quality

Object-Oriented Software Engineering Practical Software Development using UML and Java. Chapter 10: Testing and Inspecting to Ensure High Quality

Chapter 9. Software Testing

10. Software Testing Fundamental Concepts

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

Software Testing. Software Testing

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

Software Quality Assurance (SQA) Software Quality Assurance

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

QUIZ #5 - Solutions (5pts each)

Part 5. Verification and Validation

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

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

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

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

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

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

Software Engineering Fall 2014

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

INTRODUCTION TO SOFTWARE ENGINEERING

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

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

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

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

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

Verification and Validation. Verification and validation

Software Testing Interview Question and Answer

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

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

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

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

Manuel Oriol, CHCRC-C, Software Testing ABB

Verification, Testing, and Bugs

Chap 2. Introduction to Software Testing

Ingegneria del Software Corso di Laurea in Informatica per il Management

Bridge Course On Software Testing

Chapter 9 Quality and Change Management

Pearson Education 2007 Chapter 9 (RASD 3/e)

Software Engineering (CSC 4350/6350) Rao Casturi

Software Quality Assurance. David Janzen

Sample Exam Syllabus

The Importance of Test

UNIT-4 Black Box & White Box Testing

The Bizarre Truth! Automating the Automation. Complicated & Confusing taxonomy of Model Based Testing approach A CONFORMIQ WHITEPAPER

Lecture 15 Software Testing

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

UNIT-4 Black Box & White Box Testing

Computational Systems COMP1209

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

Black-box Testing Techniques

Write perfect C code to solve the three problems below.

Certified Tester Foundation Level(CTFL)

Examination Questions Time allowed: 1 hour 15 minutes

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

Darshan Institute of Engineering & Technology Unit : 9

People tell me that testing is

Topics in Software Testing

Chapter 10. Testing and Quality Assurance

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

Chapter 8. Achmad Benny Mutiara

Software Engineering and Scientific Computing

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

Software Development. Software Testing: Verification and Validation. Verification and Validation (V&V) Verification. Validation

Software Testing. Testing: Our Experiences

Lecture 10: Introduction to Correctness

Test design techniques

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

Introduction to Dynamic Analysis

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

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

Chapter 3: Dynamic Testing Techniques

It is primarily checking of the code and/or manually reviewing the code or document to find errors This type of testing can be used by the developer

Course Content. Objectives of Lecture 18 Black box testing and planned debugging. Outline of Lecture 18

Final Paper. Automation in Agile Testing. Vijay Kumar - Senior Software Engineer - Testing CenturyLink Technologies

INTERNATIONAL JOURNAL OF PURE AND APPLIED RESEARCH IN ENGINEERING AND TECHNOLOGY

Regression testing. Whenever you find a bug. Why is this a good idea?

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

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

Quality Assurance in Software Development

Practical issues. Software system engineering (2IW60) Practical issues. Software Engineering topics. Examination:

Inspection Overview Massood Towhidnejad Computer & Software Engineering Dept. Embry-Riddle University

CS 520 Theory and Practice of Software Engineering Fall 2018

UNIT-2 Levels of Testing

EXAMINING THE CODE. 1. Examining the Design and Code 2. Formal Review: 3. Coding Standards and Guidelines: 4. Generic Code Review Checklist:

Shree.Datta Polytechnic College,Dattanagar, Shirol. Class Test- I

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

Software Quality Assurance & Testing

All the subjective part of 2011 papers solved complete reference numbers

The testing process. Component testing. System testing

Tonight s Agenda. CSC340: Requirements Engineering. Course Objectives. Requirements Engineering. Software Engineering. What is Software Engineering?

SOFTWARE TESTING UNIT II TEST CASE DESIGN

Comparison Study of Software Testing Methods and Levels- A Review

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

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

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

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

[IT6004-SOFTWARE TESTING] UNIT 2

Transcription:

Software Testing CS 408 1/09/18 Course Webpage: http://www.cs.purdue.edu/homes/suresh/408-spring2018 1

The Course Understand testing in the context of an Agile software development methodology - Detail methodology and process Investigate current approaches to testing - Random - Fuzz - Concolic (symbolic execution) - Property-based - Concurrency Applying testing principles to facets other than correctness - Performance - Configuration 2

The Project Emphasis on methodology within a software development environment Two phases: Phase 1: develop a software artifact Apply various testing approaches on both design and implementation Phase 2: test against another team s system Apply similar techniques as in Phase 1 to this system Demonstration Details at: http://www.cs.purdue.edu/homes/suresh/408-spring2018/408projects.html 3

Logistics and Expectations Given its project-heavy emphasis, the class closely adheres to tight deadlines (see the project description for details) Immediate deadline: - Form teams of 4-5 members by Sunday 1/14/18 - Team assignments will be posted by 1/16/18 Homeworks Tool investigation Midterm exam Conceptual understanding of core concepts 4

The Problem 5

Two Views Verification: Prove the absence, and conjecture the presence, of bugs Ex: types: Not all ill-typed programs are wrong But, no erroneous program should be well-typed Testing: Prove the presence, and the conjecture the absence, of bugs Ex: random testing Every failed test is a true failure But, not finding a failure doesn t mean the program is correct Verification is desirable, but sometimes infeasible Testing is always feasible, but sometimes insufficient 6

Relationship Testing Correct Behaviors Verified All behaviors 7

Basic definitions A failure is an unacceptable behavior exhibited by a system The frequency of failures measures the reliability of the system An important design objective is to achieve low failure rates and hence high reliability. A defect is a flaw in any aspect of the system that contributes, or may potentially contribute, to the occurrence of one or more failures could be in the requirements, the design, and/or the code It might take several defects to cause a particular failure An error is an unintentional decision by a software developer that leads to the introduction of a defect 8

Effective and Efficient Testing To test effectively, you must use a strategy that uncovers as many defects as possible. To test efficiently, you must find the largest possible number of defects using the fewest possible tests Key challenges: We do not know the defects latent in a system a priori We do not know the relationship between an input and a defect a priori We do not know the relationship among defects a priori 9

Black-box testing Testers provide the system with inputs and observe the outputs They can see none of: The source code The internal data Any of the design documentation describing the system s internals 10

Equivalence classes It is inappropriate to test by brute force, using every possible input value Takes a huge amount of time Is impractical Is pointless! You should divide the possible inputs into groups which you believe will be treated similarly by all algorithms. Such groups are called equivalence classes. A tester needs only to run one test per equivalence class The tester has to - understand the required input, - appreciate how the software may have been designed 11

Examples of equivalence classes Valid input is a month number (1-12) Equivalence classes are: [-..0], [1..12], [13.. ] Valid input is one of ten strings representing a type of fuel Equivalence classes are - 10 classes, one for each string - A class representing all other strings 12

Combinations of equivalence classes Combinatorial explosion means that we cannot realistically test every possible system-wide equivalence class. If there are 4 inputs with 5 possible values there are 5 4 (i.e. 625) possible system-wide equivalence classes. Goal is to ensure that at least one test is run with every equivalence class of every individual input. We also want to test all combinations where an input is likely to affect the interpretation of another. 13

Testing at boundaries of equivalence classes A lot of errors in software occur at the boundaries of equivalence classes The idea of equivalence class testing should be expanded to specifically test values at the extremes of each equivalence class E.g. The number 0 often causes problems E.g.: If the valid input is a month number (1-12) Test equivalence classes as before Test 0, 1, 12 and 13 as well 14

White-box testing Also called glass-box or structural testing Testers have access to the system design They can Examine the design documents View the code Observe at run time the steps taken by algorithms and their internal data 15

Flow graph for white-box testing To help the programmer to systematically test the code Each branch in the code (such as if and while statements) creates a node in the graph The testing strategy has to reach a targeted coverage of statements and branches; the objective can be to: cover all possible paths (often infeasible) cover all possible edges (most efficient) cover all possible nodes (simpler) 16

Defects in Handling Stress and Unusual Situations Insufficient throughput or response time on minimal configurations Defect: On a minimal configuration, the system s throughput or response time fail to meet requirements. Testing strategy: Perform testing using minimally configured platforms. 17

Defects in Handling Stress and Unusual Situations Defects in handling peak loads or missing resources Defects: The system does not gracefully handle resource shortage. Resources that might be in short supply include: - memory, disk space or network bandwidth, permission. Testing strategies: Devise a method of denying the resources. Run a very large number of copies of the program being tested, all at the same time. 18

Defects in Handling Stress and Unusual Situations Inappropriate management of resources Defect: A program uses certain resources but does not make them available when it no longer needs them. Testing strategy: Run the program intensively in such a way that it uses many resources, relinquishes them and then uses them again repeatedly. 19

Writing Formal Test Cases and Test Plans A test case is an explicit set of instructions designed to detect a particular class of defect in a software system. A test case can give rise to many tests. Each test is a particular running of the test case on a particular version of the system. 20

Test plans A test plan is a document that contains a complete set of test cases for a system Along with other information about the testing process. The test plan is one of the standard forms of documentation. If a project does not have a test plan: Testing will inevitably be done in an ad-hoc manner. Leading to poor quality software. The test plan should be written long before the testing starts. You can start to develop the test plan once you have developed the requirements. 21

Levels of importance of test cases Level 1: First pass critical test cases. Designed to verify the system runs and is safe. No further testing is possible. Level 2: General test cases. Verify that day-to-day functions correctly. Still permit testing of other aspects of the system. Level 3: Detailed test cases. Test requirements that are of lesser importance. The system functions most of the time but has not yet met quality objectives. 22

Determining test cases by enumerating attributes It is important that the test cases test every aspect of the requirements. Each detail in the requirements is called an attribute. An attribute can be thought of as something that is testable. A good first step when creating a set of test cases is to enumerate the attributes. A way to enumerate attributes is to circle all the important points in the requirements document. However there are often many attributes that are implicit. 23

Strategies for Testing Large Systems Big bang testing versus integration testing In big bang testing, you take the entire system and test it as a unit A better strategy in most cases is integration testing: You test each individual subsystem in isolation Continue testing as you add more and more subsystems to the final product 24

Regression testing It tends to be far too expensive to re-run every single test case every time a change is made to software. Hence only a subset of the previously-successful test cases is actually re-run. This process is called regression testing. The tests that are re-run are called regression tests. Regression test cases are carefully selected to cover as much of the system as possible. 25

Regression Testing Procedure 1. Re-run the test case(s) that revealed the defect(s) 2. Re-run test cases that are related to the defect(s) 3. Re-run test cases that might logically be affected by the changes that were made to fix the defect(s) 4. Re-run a random subset of all test cases... which will include many that should have no relation to the defect(s) or the changes that were made 26

Inspections An inspection is an activity in which one or more people systematically Examine source code or documentation, looking for defects. Normally, inspection involves a meeting... Although participants can also inspect alone at their desks. 27

Inspecting compared to testing Both testing and inspection rely on different aspects of human intelligence. Testing can find defects whose consequences are obvious but which are buried in complex code. Inspecting can find defects that relate to maintainability or efficiency. The chances of mistakes are reduced if both activities are performed. 28

Testing or inspecting, which comes first? It is important to inspect software before extensively testing it. The reason for this is that inspecting allows you to quickly get rid of many defects. If you test first, and inspectors recommend that redesign is needed, the testing work has been wasted. There is a growing consensus that it is most efficient to inspect software before any testing is done. Even before developer testing 29

Annoucements and Action Items Action item: Form a team of 4-5 members and send me the names (and team leader) by January 14 Announcement: No class on Thursday