Testing and inspecting to ensure high quality An extreme and easily understood kind of failure is an outright crash. However, any violation of requirements.

Slides:



Advertisements
Similar presentations
Testing and Inspecting to Ensure High Quality
Advertisements

Testing Relational Database
Software Testing. Quality is Hard to Pin Down Concise, clear definition is elusive Not easily quantifiable Many things to many people You'll know it when.
Testing and Quality Assurance
SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
10 Software Engineering Foundations of Computer Science ã Cengage Learning.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 10: Testing and Inspecting to Ensure High Quality Part 1:
Testing an individual module
Software Testing. “Software and Cathedrals are much the same: First we build them, then we pray!!!” -Sam Redwine, Jr.
ECE122 L17: Method Development and Testing April 5, 2007 ECE 122 Engineering Problem Solving with Java Lecture 17 Method Development and Testing.
OHT 9.1 Galin, SQA from theory to implementation © Pearson Education Limited 2004 Chapter 9.3 Software Testing Strategies.
1 Software Testing Techniques CIS 375 Bruce R. Maxim UM-Dearborn.
1 Functional Testing Motivation Example Basic Methods Timing: 30 minutes.
Fundamentals of Python: From First Programs Through Data Structures
Testing and Inspecting to Ensure High Quality Part 1: Basic Definitions Effective and Efficient Testing Lots of Personal Notes.
Software Testing Sudipto Ghosh CS 406 Fall 99 November 9, 1999.
Verificarea şi Validarea Sistemelor Soft Tem ă Laborator 2 Testare Black Box Dat ă primire laborator: Lab 2 Dat ă predare laborator: Lab 2,3.
System/Software Testing
Fundamentals of Python: First Programs
Internet Software Development Testing and Inspections Paul J Krause.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 10: Testing and Inspecting to Ensure High Quality Part 1:
CMSC 345 Fall 2000 Unit Testing. The testing process.
CS4311 Spring 2011 Unit Testing Dr. Guoqiang Hu Department of Computer Science UTEP.
Software Engineering DKT 311 Lecture 11 Verification and critical system validation.
Coverage – “Systematic” Testing Chapter 20. Dividing the input space for failure search Testing requires selecting inputs to try on the program, but how.
Lecture 11 Testing and Debugging SFDV Principles of Information Systems.
Testing Methods Carl Smith National Certificate Year 2 – Unit 4.
Chapter SIX Implementation, Testing and Pragmatics Making it a reality.
Software testing techniques Software testing techniques Equivalence partitioning Presentation on the seminar Kaunas University of Technology.
Black Box Testing Techniques Chapter 7. Black Box Testing Techniques Prepared by: Kris C. Calpotura, CoE, MSME, MIT  Introduction Introduction  Equivalence.
Black-box Testing.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Software Verification, Validation and Testing.
1 Phase Testing. Janice Regan, For each group of units Overview of Implementation phase Create Class Skeletons Define Implementation Plan (+ determine.
Today’s Agenda  Reminder: HW #1 Due next class  Quick Review  Input Space Partitioning Software Testing and Maintenance 1.
1 Program Testing (Lecture 14) Prof. R. Mall Dept. of CSE, IIT, Kharagpur.
CPSC 873 John D. McGregor Session 9 Testing Vocabulary.
Software Engineering1  Verification: The software should conform to its specification  Validation: The software should do what the user really requires.
Software Engineering Saeed Akhtar The University of Lahore.
Test Case Designing UNIT - 2. Topics Test Requirement Analysis (example) Test Case Designing (sample discussion) Test Data Preparation (example) Test.
CPSC 871 John D. McGregor Module 8 Session 1 Testing.
Dynamic Testing.
HNDIT23082 Lecture 09:Software Testing. Validations and Verification Validation and verification ( V & V ) is the name given to the checking and analysis.
1 Phase Testing. Janice Regan, For each group of units Overview of Implementation phase Create Class Skeletons Define Implementation Plan (+ determine.
Software Engineering Testing. These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright.
1 Software Testing. 2 What is Software Testing ? Testing is a verification and validation activity that is performed by executing program code.
Testing Integral part of the software development process.
Dynamic Black-Box Testing Part 1 What is dynamic black-box testing? How to reduce the number of test cases using: Equivalence partitioning Boundary value.
CPSC 372 John D. McGregor Module 8 Session 1 Testing.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 10: Testing and Inspecting to Ensure High Quality.
Functional testing, Equivalence class testing
Software Testing.
Testing Tutorial 7.
Software Testing.
Software Testing.
John D. McGregor Session 9 Testing Vocabulary
Black Box Testing PPT Sources: Code Complete, 2nd Ed., Steve McConnell
Software Engineering (CSI 321)
Introduction to Testing Design Strategies – The Smarter Tester
Types of Testing Visit to more Learning Resources.
John D. McGregor Session 9 Testing Vocabulary
CHAPTER 4 Test Design Techniques
UNIT-4 BLACKBOX AND WHITEBOX TESTING
John D. McGregor Session 9 Testing Vocabulary
Software Testing (Lecture 11-a)
Lecture 09:Software Testing
Static Testing Static testing refers to testing that takes place without Execution - examining and reviewing it. Dynamic Testing Dynamic testing is what.
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
Software Testing “If you can’t test it, you can’t design it”
CS410 – Software Engineering Lecture #11: Testing II
UNIT-4 BLACKBOX AND WHITEBOX TESTING
Presentation transcript:

Testing and inspecting to ensure high quality An extreme and easily understood kind of failure is an outright crash. However, any violation of requirements should be considered a failure including such things as the production of incorrect outputs, the system running too slowly, or the user having trouble finding online help.

Defect Definition : a defect is a flaw in any aspect of the system including the requirements, the designs and the code, that contributes, or may potentially contribute, to the occurrence of one or more failure.

Error Definition: an error is a slip-up or inappropriate decision by a software developer that leads to the introduction of a defect into the system. An error can be made at any stage of the software development process, from requirements to implementation and maintenance. Improved education and disciplined approaches to software engineering should lead to fewer errors, and hence fewer defects and fewer failures.

Effective and efficient testing Testing is the process of deliberately trying to cause failures in a system in order to detect any defects that might be present. As with all engineering activities, efficiency and effectiveness are both important. 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. An effective and efficient testing strategy is often called a high-yield strategy.

Black-box testing Most of the time, testers treat a system as a black box. This means they provide the system with inputs and observe the outputs, but they cannot see what is going on inside. In particular, they can see neither the source code, the internal data, nor any of the design documentation describing the system’s internals.

white box testing An alternative approach to testing is to treat the system as a glass box. In glass box testing, the tester can examine the design documents and the code, as well as observe at run-time the steps taken by algorithms and their internal data. He or she can therefore design tests that will exercise all aspects of each algorithm and data structure. Glass-box testing is widely referred to as white box testing; however, we prefer the term glass box testing since the notion of looking inside a glass box clearly provides a better metaphor.

white box testing Glass box testing is more time-consuming than black-box testing, but removes much of the guesses work, and alows the tester to be more thorough. When performing glass-box setting, a tester can analyses the code to ensure that his or her testing strategy has reached a targeted coverage of statements and braches: the tester can ensure that, for example, 90 percent of all statements are executed and 80 percent of all branches are taken.

Testing is like detective work testers know that software developers implements algorithms in certain ways and tend to have habits that can lead to errors, and hence to defects. Testers can uncover defects by anticipating typical errors made by developers. Testers can also uncover defects by anticipating unusual things that users might try to do.

Testing is like detective work Detective work is painstaking. The detective must not leave anything uncovered, and must be suspicious of everything. Similar suspicion and attention to detail are the hallmark of an effective tester. However, like detective work, it does not pay to take an excessive amount of testing time as we mentioned earlier, both tester and detective have to be efficient.

Equivalence classes: a strategy for choosing what to test Therefore, in order to test efficiently, you should divide the possible inputs into groups which you believe will be treated similarly by reasonable algorithms. Such groups are called equivalence classes. A tester needs only to run one test per input. For the month validation problem, there are three equivalence classes, as shown in table.

Equivalence classes Table : Equivalence classes for month validation, where the input value is a Java int. Equivalence classRange of values Invalid – larger13 to 231 – 1 (can be loosely expressed as 13 to  ) Valid1 to 12 Invalid – smaller-231 to o ) can be loosely expressed as –  to o)

Equivalence classes The tester has to understand the required input, and the domain specific rules that govern what input is acceptable. Also the tester has to have knowledge of computer science and software design. For example, he or she would have to know about the ranges of integer data types in order to determine the upper and lower bounds of the two invalid equivalence classes in the month – validation problem.

Combinations of equivalence classes Imagine you are designing a system that is to contain information about all kinds of land vehicles, including passenger vehicles and racing vehicles. Such a system might – require the user to enter specifications of a new type of vehicle. You job is to decide how to divide this system into equivalence classes for testing. You are told that the user can enter the following data:

Combinations of equivalence classes Whether the manufactures give data about the vehicle in metric or traditional (Imperial or US) units. The user selects this using pair of ‘radio buttons’. This impacts how the rest of the data will be interpreted (two equivalence classes; there is no possibility of invalid input). Maximum speed, an integer ranging from 1 to 750 km/h or 1 to 500 mph (four equivalence classes: [- .. 0], [1.500], ],  ] Type of fuel, one of a set of 10 possible strings that the user explicitly types (11 equivalence classes – the eleventh class is any string other than the 10 valid ones). Average fuel efficiency, a fixed point value with one decimal place, ranging from 1 to 240 L/100 km or 1 to 240 mpg (three equivalence classes). Time to accelerate to 100 km/h or 60 mph. This is a fixed point value with one decimal place, ranging from 1 to 100s (three equivalence classes). Range, an integer from 1 to 5000 km or 1 to 3000 miles (four equivalence classes : [ - .. 0], ], [ ], [  ]

Combinations of equivalence classes most systems have many distinct inputs, the total number of system equivalence classes can become very large. This is called a combinatorial explosion of the space of required tests.

Combinations of equivalence classes The combinatorial explosion implies that you can not realistically test every possible system-wise equivalence class. A reasonable approach to testing is therefore as follows. You should first make sure that a least one test is run with every equivalence class of every individual input. Then you should also, where possible, test all combinations where one input is likely to affect the interpretation of another.

Testing at boundaries of equivalence classes More errors in software occur at the boundaries of equivalence classes than in the ‘middle’. For example, when testing a method that inputs an integer and checks whether a valid day number has been entered for the month of November, the valid equivalence classes are integers less than 1, integers from 1 to 30 and integers greater than 30. However, the most likely error is that the number 31 is accepted as valid (i.e. the system treats it the same way as integers from 1 to 30). Another common error might be the acceptance of zero as a valid day number. Therefore we should expand the idea of equivalence class testing to specifically test values at the extremes of each equivalence class.

Testing at boundaries of equivalence classes a tester must act like a detective trying to uncover any defects that other software engineers might have introduced. This means not only testing at equivalence classes and their boundaries, but also designing tests that explicitly try to cover a range of specific types of defects that commonly occur.