Testing. Aspects of Quality Software Flexibility Extensibility Correctness Robustness Reliability Safety Usability.

Slides:



Advertisements
Similar presentations
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.
Advertisements

SOFTWARE TESTING. Software Testing Principles Types of software tests Test planning Test Development Test Execution and Reporting Test tools and Methods.
Building Reliable Software Requirements and Methods.
OOP #10: Correctness Fritz Henglein. Wrap-up: Types A type is a collection of objects with common behavior (operations and properties). (Abstract) types.
Objectives Understand the basic concepts and definitions relating to testing, like error, fault, failure, test case, test suite, test harness. Understand.
(c) 2007 Mauro Pezzè & Michal Young Ch 10, slide 1 Functional testing.
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.
Outline Types of errors Component Testing Testing Strategy
1 Software Testing and Quality Assurance Lecture 5 - Software Testing Techniques.
SOFTWARE TESTING WHITE BOX TESTING 1. GLASS BOX/WHITE BOX TESTING 2.
Software Testing Sudipto Ghosh CS 406 Fall 99 November 9, 1999.
Software Testing Verification and validation planning Software inspections Software Inspection vs. Testing Automated static analysis Cleanroom software.
Language Evaluation Criteria
System/Software Testing
Software Quality Assurance Lecture #8 By: Faraz Ahmed.
Introduction to Unit Testing Jun-Ru Chang 2012/05/03.
Objectives Understand the basic concepts and definitions relating to testing, like error, fault, failure, test case, test suite, test harness. Explore.
CS4311 Spring 2011 Verification & Validation Dr. Guoqiang Hu Department of Computer Science UTEP.
CMSC 345 Fall 2000 Unit Testing. The testing process.
Chapter 12: Software Testing Omar Meqdadi SE 273 Lecture 12 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Software Testing Testing principles. Testing Testing involves operation of a system or application under controlled conditions & evaluating the results.
1 Software testing. 2 Testing Objectives Testing is a process of executing a program with the intent of finding an error. A good test case is in that.
Software testing Main issues: There are a great many testing techniques Often, only the final code is tested.
Testing. 2 Overview Testing and debugging are important activities in software development. Techniques and tools are introduced. Material borrowed here.
Introduction to Software Testing. Types of Software Testing Unit Testing Strategies – Equivalence Class Testing – Boundary Value Testing – Output Testing.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Software Verification, Validation and Testing.
Software Construction Lecture 18 Software Testing.
A Practical Guide To Unit Testing John E. Boal TestDrivenDeveloper.com.
Safety Critical Systems 5 Testing T Safety Critical Systems.
1 Introduction to Software Testing. Reading Assignment P. Ammann and J. Offutt “Introduction to Software Testing” ◦ Chapter 1 2.
LECTURE 19 23/11/15 Software Quality and Testing.
Software Engineering1  Verification: The software should conform to its specification  Validation: The software should do what the user really requires.
Software Construction Lecture 19 Software Testing-2.
Software Testing and Quality Assurance 1. What is the objectives of Software Testing?
Software Testing. System/Software Testing Error detection and removal determine level of reliability well-planned procedure - Test Cases done by independent.
Software Quality Assurance and Testing Fazal Rehman Shamil.
 Software Testing Software Testing  Characteristics of Testable Software Characteristics of Testable Software  A Testing Life Cycle A Testing Life.
HNDIT23082 Lecture 09:Software Testing. Validations and Verification Validation and verification ( V & V ) is the name given to the checking and analysis.
Testing and Debugging. Testing Fundamentals  Test as you develop Easier to find bugs early rather than later Prototyping helps identify problems early.
Chapter 12: Software Testing Omar Meqdadi SE 273 Lecture 12 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.1.
Week 6 MondayTuesdayWednesdayThursdayFriday Testing III Reading due Group meetings Testing IVSection ZFR due ZFR demos Progress report due Readings out.
Testing Overview Software Reliability Techniques Testing Concepts CEN 4010 Class 24 – 11/17.
CSC 395 – Software Engineering Lecture 27: White-Box Testing.
Week # 4 Quality Assurance Software Quality Engineering 1.
SOFTWARE TESTING LECTURE 9. OBSERVATIONS ABOUT TESTING “ Testing is the process of executing a program with the intention of finding errors. ” – Myers.
Defect testing Testing programs to establish the presence of system defects.
SOFTWARE TESTING AND QUALITY ASSURANCE. Software Testing.
1 Software Testing. 2 What is Software Testing ? Testing is a verification and validation activity that is performed by executing program code.
CS223: Software Engineering Lecture 25: Software Testing.
Laurea Triennale in Informatica – Corso di Ingegneria del Software I – A.A. 2006/2007 Andrea Polini XVIII. Software Testing.
Software Testing. Software Quality Assurance Overarching term Time consuming (40% to 90% of dev effort) Includes –Verification: Building the product right,
Software Testing.
Testing Verification and the Joy of Breaking Code
Software Engineering (CSI 321)
Testing Tutorial 7.
CS1101X Programming Methodology
Software Testing Techniques
Software Testing.
Testing Approaches.
White-Box Testing.
Testing Today we are going to talk about testing. Before you all lapse into comas in anticipation of how exciting this lecture will be, let me say that.
White-Box Testing.
Qbasic Modular Programming.
Chapter 10 – Software Testing
Whitebox Testing.
© Oxford University Press All rights reserved.
Chapter 10: Testing and Quality Assurance
Testing Slides adopted from John Jannotti, Brown University
Presentation transcript:

Testing

Aspects of Quality Software Flexibility Extensibility Correctness Robustness Reliability Safety Usability

Aspects of Quality Software Flexibility – Applicability in novel contexts Extensibility Correctness Robustness Reliability Safety Usability

Aspects of Quality Software Flexibility – Applicability in novel contexts Extensibility – Ability to add functionality Correctness Robustness Reliability Safety Usability

Aspects of Quality Software Flexibility – Applicability in novel contexts Extensibility – Ability to add functionality Correctness – Consistency with specs. Robustness Reliability Safety Usability

Aspects of Quality Software Flexibility – Applicability in novel contexts Extensibility – Ability to add functionality Correctness – Consistency with specs. Robustness – Resilience to abnormality Reliability Safety Usability

Aspects of Quality Software Flexibility – Applicability in novel contexts Extensibility – Ability to add functionality Correctness – Consistency with specs. Robustness – Resilience to abnormality Reliability – Requests handled consistently Safety Usability

Aspects of Quality Software Flexibility – Applicability in novel contexts Extensibility – Ability to add functionality Correctness – Consistency with specs. Robustness – Resilience to abnormality Reliability – Requests handled consistently Safety – Avoids dangerous behaviors Usability

Aspects of Quality Software Flexibility – Applicability in novel contexts Extensibility – Ability to add functionality Correctness – Consistency with specs. Robustness – Resilience to abnormality Reliability – Requests handled consistently Safety – Avoids dangerous behaviors Usability – Affords its functionality

Verification and Validation Validation – Are we building the right product? Verification

Verification and Validation Validation – Are we building the right product? Verification – Are we building the product right?

Kinds of Testing Unit Integration System Regression Acceptance

Things fall apart… Failures Faults (a.k.a. bug) Errors Fault Failure /

What is a Test? What is a program? Test Suite – some subset of the inputs. Test Case – is one particular input. Ideal Test – a test case where the correctness of the test implies the correctness of the program for all other inputs.

Test This!

Test this! 16 digits & up: loss of mathematical precision. 23 digits & up: can’t see all of the input. 310 digits & up: input not understood as a number. 1,000 digits & up: exponentially increasing freeze when navigating to the end of the field by pressing. 23,829 digits & up: all text in field turns white. 2,400,000 digits: crash (reproducible).

What you didn’t try input with 2,400,000 digits!? Seduced by what’s visible. Think they need a spec that tells them the max. If they have a spec, they stop when the spec says stop. Satisfied by the first boundary (16 digits). Let their fingers do the walking instead of using a program like notepad to generate input. Use strictly linear lengthening strategy. Don’t realize the significance of degradation. Assume it will be too hard and take too long. Think “No one would do that” (hackers do it)

Exhaustive Testing int sum(int a, int b) {return a + b;}

What to Test? Blackbox –Based on a functional specification of the software –Scales to different granularity levels –Cannot reveal dataflow errors Whitebox –Based on the dataflow of the program –Does not scale with granularity levels –Cannot reveal errors due to missing paths Test Criteria –Whitebox – Cover execution paths –Blackbox – Cover input space

Blackbox Testing Identify independently-testable features Defining all the inputs to the features Identify representative classes of values Generate test case specifications Generate and instantiate test cases

Whitebox Testing Identify all path in the module under test Formulate an input that will cause each path to be traversed Generate specifications for test success/failure Instantiate tests

Tools for testing NUnit Build Systems –Ant –Maven Coverage Tools –Coverlipse –Clover

Demos

Test First Technique 1. Write a test that expresses on intent of a class in the system 2. Stub out the class (enough to allow the test to compile 3. Fail the test (don’t skip this) 4. Change the class just enough to pass the test 5. Pass the test 6. Examine the class for coupling, cohesion, redundancy, and clarity problems. Refactor. 7. Pass the test 8. Return to 1. until all intentions are expressed

Best Practices Tests should fail the first time Start with the simplest tests Don’t use constructors in test cases – use setup routines for JUnit) Test should be independent: non-side- effecting and order independent Coupling and cohesion matter in tests too! Make tests small and fast.