Software Testing COM 3220 4/12/2019 Testing/Spring 98.

Slides:



Advertisements
Similar presentations
Object Oriented Analysis And Design-IT0207 iiI Semester
Advertisements

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.
Defect testing Objectives
Test process essentials Riitta Viitamäki,
Lecture 8: Testing, Verification and Validation
SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
Testing an individual module
Software Testing. “Software and Cathedrals are much the same: First we build them, then we pray!!!” -Sam Redwine, Jr.
Chapter 11: Testing The dynamic verification of the behavior of a program on a finite set of test cases, suitable selected from the usually infinite execution.
Types and Techniques of Software Testing
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.
Managing Software Quality
TESTING.
CMSC 345 Fall 2000 Unit Testing. The testing process.
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.
Testing Workflow In the Unified Process and Agile/Scrum processes.
Testing 99 PART 2: Getting Going (chapter 10) Gradual adoption Current practice is changed little in each step. First step: use coverage. If coverage is.
Basic of Software Testing Presented by The Smartpath Information System An ISO 9001:2008 Certified Organization
Problem Solving Techniques. Compiler n Is a computer program whose purpose is to take a description of a desired program coded in a programming language.
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 Ch. 1: Software Development (Read) 5 Phases of Software Life Cycle: Problem Analysis and Specification Design Implementation (Coding) Testing, Execution.
Software Development Problem Analysis and Specification Design Implementation (Coding) Testing, Execution and Debugging Maintenance.
Software Engineering 2004 Jyrki Nummenmaa 1 BACKGROUND There is no way to generally test programs exhaustively (that is, going through all execution.
Software Testing White Box Testing. Agenda What is White Box Testing Correctness Tests and Path Coverage Correctness Tests and Line Coverage McCabe Cyclomatic.
Software Engineering1  Verification: The software should conform to its specification  Validation: The software should do what the user really requires.
Intermediate 2 Computing Unit 2 - Software Development.
SOFTWARE TESTING. Introduction Software Testing is the process of executing a program or system with the intent of finding errors. It involves any activity.
Software Quality Assurance and Testing Fazal Rehman Shamil.
1. Black Box Testing  Black box testing is also called functional testing  Black box testing ignores the internal mechanism of a system or component.
 Software Testing Software Testing  Characteristics of Testable Software Characteristics of Testable Software  A Testing Life Cycle A Testing Life.
Dynamic Testing.
SOFTWARE TESTING LECTURE 9. OBSERVATIONS ABOUT TESTING “ Testing is the process of executing a program with the intention of finding errors. ” – Myers.
Verification vs. Validation Verification: "Are we building the product right?" The software should conform to its specification.The software should conform.
Software Testing. SE, Testing, Hans van Vliet, © Nasty question  Suppose you are being asked to lead the team to test the software that controls.
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.
Software Testing.
SOFTWARE TESTING Date: 29-Dec-2016 By: Ram Karthick.
Software Testing.
Rekayasa Perangkat Lunak Part-13
Software Testing.
John D. McGregor Session 9 Testing Vocabulary
Chapter 9, Testing.
SEVERITY & PRIORITY RELATIONSHIP
Software Engineering (CSI 321)
IS301 – Software Engineering V:
CompSci 230 Software Construction
Input Space Partition Testing CS 4501 / 6501 Software Testing
Software Testing An Introduction.
Chapter 8 – Software Testing
Verification and Testing
Structural testing, Path Testing
Types of Testing Visit to more Learning Resources.
UNIT-4 BLACKBOX AND WHITEBOX TESTING
Software testing strategies 2
Introduction to Software Testing
Software Testing (Lecture 11-a)
Lecture 09:Software Testing
Thursday’s Lecture Chemistry Building Musspratt Lecture Theatre,
Software Testing COM /28/2018 Testing/Spring 98.
Software testing.
Baisc Of Software Testing
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
Chapter 11: Integration- and System Testing
Chapter 7 Software Testing.
UNIT-4 BLACKBOX AND WHITEBOX TESTING
Presented by KARRI GOVINDA RAO ,
Presentation transcript:

Software Testing COM 3220 4/12/2019 Testing/Spring 98

Three meanings of bug error: mistake made by a developer. Mostly located in people’s head. fault: an error may lead to one or more faults. Faults are located in text of program. failure: execution of faulty code may lead to one or more failures. A failure occurs when there is a difference between the results of the correct and incorrect programs. 4/12/2019 Testing/Spring 98

Failure detection Compare actual output to expected output. Expected output is from specification. Specification: any external, independent description of the program, including user documentation. Are often incomplete, incorrect, ambiguous or contradictory. Specification may be wrong, not the program! 4/12/2019 Testing/Spring 98

Motivation Derive tests from both the specification and the program. Derivation is done by ”predicting” likely programmer errors or likely program faults. Use general rules, e.g., always test boundary conditions. 4/12/2019 Testing/Spring 98

Motivation Check for faults of omission: missed special cases. Most common type of fault according to a study by Glass. Experienced testers have a catalog of programming cliches and associated errors available. See Test Requirement Catalog (low-level omissions). 4/12/2019 Testing/Spring 98

Motivation First requirement of test design: Be methodical. Three stages: Finding clues sources for test requirements Expanding them into test requirements useful sets of inputs that should be considered Writing test specifications exact inputs and expected outputs 4/12/2019 Testing/Spring 98

Clues What needs testing? Collect from specification, program, bug reports, etc. Create a checklist. 4/12/2019 Testing/Spring 98

Test requirements Create a test requirement catalog 4/12/2019 Testing/Spring 98

Test specifications Describes input and exact expected output. 4/12/2019 Testing/Spring 98

Supplementary code inspections Some faults that testing is poor at detecting. 4/12/2019 Testing/Spring 98

Test implementation Avoid having to write a lot of support code. It is better to test larger subsystems because less support code needs to be written. Individual routines are exercised more. Testing the tests: test coverage as a crude measure. During test design do not pay attention to coverage criteria. 4/12/2019 Testing/Spring 98

Test implementation During test design do not pay attention to coverage criteria. Test requirements from other sources should do that anyway. Complete subsystem testing will usually result in high coverage. Treat missed branches as clues about weaknesses in the test design. 4/12/2019 Testing/Spring 98

Subsystem Specification Subsystem Code Catalogued Past Experience Clues and Test Requirements Program and Specification Changes Coverage Test Specifications Bug Reports Implemented Tests 4/12/2019 Testing/Spring 98

A broader view: dependability 4/12/2019 Testing/Spring 98

Application Graph algorithms: Depth-first traversal Finding all paths satisfying some restrictions. Happens to be be a subsystem of Demeter/Java. You don’t have to know much about Demeter. You will learn the minimal things you need. 4/12/2019 Testing/Spring 98

Use Java to write testing code You will need to write some Java code for testing. 4/12/2019 Testing/Spring 98

Subsystem Specification Subsystem Code Catalogued Past Experience Part of Demeter/Java Graph traversal Subsystem Specification Subsystem Code Catalogued Past Experience Clues and Test Requirements Program and Specification Changes Coverage Test Specifications Use Java/Scope Bug Reports Implemented Tests 4/12/2019 Testing/Spring 98

What we want to test Given a directed acyclic graph G (no multi-edges), traverse all paths from A via B to C. Given a directed acyclic graph G (no multiedges), traverse all paths from A bypassing B to C. 4/12/2019 Testing/Spring 98

Notation for describing graphs A = B C D. // node A has three successors B = E. // node B has only one successor E = . // E has no successor This information is put into a file program.cd. Two files program.beh are given. Contains the traversal specification. Counts visits of C. 4/12/2019 Testing/Spring 98

How to call the program demjava test The program will print the paths it traversed and print how often it visits C. 4/12/2019 Testing/Spring 98

Clue list: from A via B to C What does program do if there is no path from A via B to C? What if A or B or C do not appear in the graph. Check that paths from A to C not going through B are excluded: paths of length 1, 2 or 3. 4/12/2019 Testing/Spring 98

Clue list: From A bypassing B to C What does program do if there is no path from A bypassing B to C? What if A or B or C do not appear in the graph. Is it ok if B does not appear? Check that paths from A to C going through B are excluded: paths of length 1, 2 or 3. 4/12/2019 Testing/Spring 98

Test specifications: From A via B to C A=C B X. B=C X. C=. X=C. A=C B. B=C. C=. A A A=B B=C. C=. A B B B C C X C 2 visits 1 visit 1 visit 4/12/2019 Testing/Spring 98

Test specifications: From A via B to C A=C B X Y. Y=B. B=C X. C=. X=C. A Y B C X 4 visits 4/12/2019 Testing/Spring 98

Test specifications: From A bypassing B to C A=C B X Y. Y=B. B=C X. C=. X=C. A Y B C X 2 visits 4/12/2019 Testing/Spring 98

Fundamental Assumptions of Subsystem Testing Most errors are not very creative. Methodological checklist-based approaches will have a high payoff. Faults of omission, those caused by a failure to anticipate special cases, are the most important and most difficult type. Specification faults, especially omissions, are more dangerous than code faults. 4/12/2019 Testing/Spring 98

Fundamental Assumptions of Subsystem Testing At every stage of testing, mistakes are inevitable. Later stages should compensate for them. Code coverage is a good approximate measure of test quality. Must be used with extreme care. 4/12/2019 Testing/Spring 98

A summary of subsystem testing Build the test requirement checklist Find clues Expand clues into test requirements Design the tests Combine requirements into tests Check tests for common testing mistakes Supplement testing with code inspections 4/12/2019 Testing/Spring 98

A summary of subsystem testing Implement test support code Implement tests Evaluate and improve tests use code coverage tool find undertested or missing clues find more test requirements write more test requirements 4/12/2019 Testing/Spring 98

4/12/2019 Testing/Spring 98

Test strategies a systematic method used to select and/or generate tests to be included in a test suite. effective: likely to reveal bugs Kinds behavioral = black-box = functional structural = white-box = glass-box testing hybrid 4/12/2019 Testing/Spring 98

Testing strategies behavioral = black-box = functional based on requirements structural = white-box = glass-box testing based on program (coverages) hybrid use combination 4/12/2019 Testing/Spring 98

Classification of bugs unit/component bugs integration bugs system bugs 4/12/2019 Testing/Spring 98

Generic Testing Principles Define the graph Design node-cover tests (tests that confirm that the nodes are there) Design edge-cover tests (that confirm all required links and no more) Design loop tests Beizer 2.5 4/12/2019 Testing/Spring 98

Generic Testing Principles: Example Define the graph UML class diagram Design node-cover tests (tests that confirm that the nodes are there) Build at least one object of each class Design edge-cover tests (that confirm all required links) use each inheritance edge and association Beizer 2.5 4/12/2019 Testing/Spring 98

Generic Testing Principles: Example Define the graph Finite state machine Design node-cover tests (tests that confirm that the nodes are there) Use each state at least once Design edge-cover tests (that confirm all required links) use each state transition at least once Beizer 2.5 4/12/2019 Testing/Spring 98

4/12/2019 Testing/Spring 98

Quality factors Correctness Maintainability Portability conform to specification Maintainability ease with which software can be changed corrective: error fixing adaptive: requirement changes MAJORITY perfective: improve system Portability 4/12/2019 Testing/Spring 98

Quality factors Testability Usability how easy to test? Are requirements clear? Usability effort required to learn and operate system Reliability: mean-time between failures Efficiency: use of resources Integrity, Security 4/12/2019 Testing/Spring 98

Quality factors Reusability Interoperability Write Quality Manual to address those issues 4/12/2019 Testing/Spring 98

ISO 9000 Series of Standards (5 years old) How can customers judge the competence of a software developer? Adopted by 130 countries. ISO 9001: Quality Systems - Model for Quality Assurance in Design, Development, Production, Installation and Servicing. (general design) 4/12/2019 Testing/Spring 98

ISO 9000 Series of Standards (5 years old) ISO 9000-3 Guidelines for the Application of ISO 9001 to the Development, Supply and Maintenance of Software. ISO 9004-2 Quality Management and Quality System Elements 4/12/2019 Testing/Spring 98

The end 4/12/2019 Testing/Spring 98

Test coverage tool For example: For each traversal, which fraction of traversal methods are used? How often is each adaptive method called? Define global counters in Main class. Use aspect language to instrument code. Generate code. Testing tool development. 4/12/2019 Testing/Spring 98

Course ideas Advanced OO systems develops testing tools for testing class? Test UML graphical editor. 4/12/2019 Testing/Spring 98