Introduction to Software Testing Chapter 1 Model-Driven Test Design Paul Ammann & Jeff Offutt www.introsoftwaretesting.com.

Slides:



Advertisements
Similar presentations
Introduction to Software Testing Chapter 1
Advertisements

Introduction to Software Testing Chapter 1 Introduction & The Model-Driven Test Design Process Paul Ammann & Jeff Offutt
Model-Driven Test Design Based on the book by Paul Ammann & Jeff Offutt Jeff Offutt Professor, Software Engineering.
Introduction to Software Testing Chapter 3.1, 3.2 Logic Coverage Paul Ammann & Jeff Offutt
Introduction to Software Testing Chapter 1 Paul Ammann & Jeff Offutt SUMMARY OF PARTS 1 AND 2 FROM LAST WEEK.
Software Verification
CITS5501 Software Testing and Quality Assurance Testing – Introduction Material from Introduction to Software Testing, ed 2, Ammann & Offutt.
Paul Ammann & Jeff Offutt
Introduction to Software Testing Chapter 9.2 Challenges in Testing Software – Software Testability Paul Ammann & Jeff Offutt
Introduction to Software Testing Chapter 2.1, 2.2 Overview Graph Coverage Criteria Paul Ammann & Jeff Offutt
Introduction to Software Testing Chapter 9.3 Challenges in Testing Software Test Criteria and the Future of Testing Paul Ammann & Jeff Offutt
Ch 4 The Process page 1CS 368 Building Software is Difficult often delivered late often over budget always with errors must be a custom solution complexity.
An Object-Oriented Architecture Supporting Web Application Testing Presented By: Bhavdeep Singh.
Paul Ammann & Jeff Offutt
Model-Driven Test Design Jeff Offutt Professor, Software Engineering George Mason University Fairfax, VA USA
Terms: Test (Case) vs. Test Suite
Introduction to Software Testing Paul Ammann & Jeff Offutt Updated 24-August 2010.
Cost / Benefits Arguments for Automation and Coverage Jeff Offutt Professor, Software Engineering George Mason University Fairfax, VA USA
Cost / Benefits Arguments for Automation and Coverage Jeff Offutt Professor, Software Engineering George Mason University Fairfax, VA USA
Introduction to Software Testing Chapter 9.3 Challenges in Testing Software Test Criteria and the Future of Testing Paul Ammann & Jeff Offutt
Introduction to Software Testing Chapter 1 Introduction
Introduction to Software Testing Chapter 1 Introduction Paul Ammann & Jeff Offutt
Introduction to Software Testing Chapter 8.1 Building Testing Tools –Instrumentation Paul Ammann & Jeff Offutt
SWE 637: Test Criteria and Definitions Tao Xie Prepared based on Slides by ©Paul Ammann and Jeff Offutt Revised by Tao Xie.
The Model-Driven Test Design Process Based on the book by Paul Ammann & Jeff Offutt Jeff Offutt Professor, Software.
Introduction to Software Testing Chapter 3.1, 3.2 Logic Coverage Paul Ammann & Jeff Offutt
Introduction to Software Testing Chapters 1-5 Coverage Summary Paul Ammann & Jeff Offutt
Introduction to Software Testing Paul Ammann & Jeff Offutt Updated 24-August 2010.
Model-Driven Test Design Jeff Offutt Professor, Software Engineering George Mason University Fairfax, VA USA
Software Testing and Maintenance Lecture 2.1 Overview Graph Coverage
Introduction to Software Testing (2nd edition) Chapter 4 Putting Testing First Paul Ammann & Jeff Offutt August.
Introduction to Software Testing Chapter 1 Introduction Paul Ammann & Jeff Offutt
Introduction to Software Testing Model-Driven Test Design and Coverage testing Paul Ammann & Jeff Offutt Update.
Introduction to Software Testing Testing Strategy Dr. Pedro Mejia Alvarez From Book: Introduction to Software Testing: P.Amman & J.Offutt.
Software Testing and Quality Assurance Practical Considerations (1) 1.
Introduction to Software Testing (2nd edition) Chapter 5 Criteria-Based Test Design Paul Ammann & Jeff Offutt
Paul Ammann & Jeff Offutt
Paul Ammann & Jeff Offutt
Paul Ammann & Jeff Offutt
Paul Ammann & Jeff Offutt
Paul Ammann & Jeff Offutt
Paul Ammann & Jeff Offutt
Paul Ammann & Jeff Offutt
Paul Ammann & Jeff Offutt
Paul Ammann & Jeff Offutt
Jeff Offutt SWE 637 Software Testing
Introduction to Software Testing Chapter 3.5 Logic Coverage for FSMs
Introduction to Software Testing Chapter 3.1, 3.2 Logic Coverage
Introduction to Software Testing Chapter 2 Model-Driven Test Design
Paul Ammann & Jeff Offutt
Paul Ammann & Jeff Offutt
Introduction to Software Testing
Introduction to Software Testing Chapter 8.5 Logic Coverage for FSMs
Test Driven Lasse Koskela Chapter 9: Acceptance TDD Explained
Test Automation CS 4501 / 6501 Software Testing
Introduction to Software Testing Chapter 3, Sec# 3.5
Introduction to Software Testing Chapter 3.5 Logic Coverage for FSMs
Paul Ammann & Jeff Offutt
Jeff Offutt SWE 637 Software Testing
Graph Coverage Criteria CS 4501 / 6501 Software Testing
Paul Ammann & Jeff Offutt
Logic Coverage for Source Code CS 4501 / 6501 Software Testing
Introduction to Software Testing Chapter 8.1 Logic Coverage
Paul Ammann & Jeff Offutt
Introduction to Software Testing Chapter 8.5 Logic Coverage for FSMs
Paul Ammann & Jeff Offutt
Review for Final – Spring 2018
Review for Final – Spring 2019
Introduction to Software Testing Chapter 3.1, 3.2 Logic Coverage
Presentation transcript:

Introduction to Software Testing Chapter 1 Model-Driven Test Design Paul Ammann & Jeff Offutt

Types of Test Activities n Testing can be broken up into four general types of activities 1.Test Design 2.Test Automation 3.Test Execution 4.Test Evaluation n Each type of activity requires different skills, background knowledge, education and training n No reasonable software development organization uses the same people for requirements, design, implementation, integration and configuration control Introduction to Software Testing (Ch 1), © Ammann & Offutt 2 Why do test organizations still use the same people for all four test activities?? This is clearly a waste of resources 1.a) Criteria-based 1.b) Human-based

1. Test Design – (a) Criteria-Based n This is the most technical job in software testing n Requires knowledge of : –Discrete math –Programming –Testing n Requires much of a traditional CS degree n This is intellectually stimulating, rewarding, and challenging n Test design is analogous to software architecture on the development side n Using people who are not qualified to design tests is a sure way to get ineffective tests Introduction to Software Testing (Ch 1), © Ammann & Offutt 3 Design test values to satisfy coverage criteria or other engineering goal

1. Test Design – (b) Human-Based n This is much harder than it may seem to developers n Criteria-based approaches can be blind to special situations n Requires knowledge of : –Domain, testing, and user interfaces n Requires almost no traditional CS –A background in the domain of the software is essential –An empirical background is very helpful (biology, psychology, …) –A logic background is very helpful (law, philosophy, math, …) n This is intellectually stimulating, rewarding, and challenging –But not to typical CS majors – they want to solve problems and build things Introduction to Software Testing (Ch 1), © Ammann & Offutt 4 Design test values based on domain knowledge of the program and human knowledge of testing

2. Test Automation n This is slightly less technical n Requires knowledge of programming –Fairly straightforward programming – small pieces and simple algorithms n Requires very little theory n Very boring for test designers n Programming is out of reach for many domain experts n Who is responsible for determining and embedding the expected outputs ? –Test designers may not always know the expected outputs –Test evaluators need to get involved early to help with this Introduction to Software Testing (Ch 1), © Ammann & Offutt 5 Embed test values into executable scripts

3. Test Execution n This is easy – and trivial if the tests are well automated n Requires basic computer skills –Interns –Employees with no technical background n Asking qualified test designers to execute tests is a sure way to convince them to look for a development job n If, for example, GUI tests are not well automated, this requires a lot of manual labor n Test executors have to be very careful and meticulous with bookkeeping Introduction to Software Testing (Ch 1), © Ammann & Offutt 6 Run tests on the software and record the results

4. Test Evaluation n This is much harder than it may seem n Requires knowledge of : –Domain –Testing –User interfaces and psychology n Usually requires almost no traditional CS –A background in the domain of the software is essential –An empirical background is very helpful (biology, psychology, …) –A logic background is very helpful (law, philosophy, math, …) n This is intellectually stimulating, rewarding, and challenging –But not to typical CS majors – they want to solve problems and build things Introduction to Software Testing (Ch 1), © Ammann & Offutt 7 Evaluate results of testing, report to developers

Other Activities n Test management : Sets policy, organizes team, interfaces with development, chooses criteria, decides how much automation is needed, … n Test maintenance : Tests must be saved for reuse as software evolves –Requires cooperation of test designers and automators –Deciding when to trim the test suite is partly policy and partly technical – and in general, very hard ! –Tests should be put in configuration control n Test documentation : All parties participate –Each test must document why – criterion and test requirement satisfied or a rationale for human-designed tests –Traceability throughout the process must be ensured –Documentation must be kept in the automated tests Introduction to Software Testing (Ch 1), © Ammann & Offutt 8

Approximate Number of Personnel n A mature test organization only one test designer to work with several test automators, executors and evaluators n Improved automation will reduce the number of test executors –Theoretically to zero … but not in practice n Putting the wrong people on the wrong tasks leads to inefficiency, low job satisfaction and low job performance –A qualified test designer will be bored with other tasks and look for a job in development –A qualified test evaluator will not understand the benefits of test criteria n Test evaluators have the domain knowledge, so they must be free to add tests that blind engineering processes will not think of Introduction to Software Testing (Ch 1), © Ammann & Offutt 9

Types of Test Activities – Summary n These four general test activities are quite different n It is a poor use of resources to use people inappropriately Introduction to Software Testing (Ch 1), © Ammann & Offutt 10 1a.DesignDesign test values to satisfy engineering goals CriteriaRequires knowledge of discrete math, programming and testing 1b.DesignDesign test values from domain knowledge and intuition HumanRequires knowledge of domain, UI, testing 2.AutomationEmbed test values into executable scripts Requires knowledge of scripting 3.ExecutionRun tests on the software and record the results Requires very little knowledge 4.EvaluationEvaluate results of testing, report to developers Requires domain knowledge Most test teams use the same people for ALL FOUR activities !!

Applying Test Activities Introduction to Software Testing (Ch 1), © Ammann & Offutt 11 To use our people effectively and to test efficiently we need a process that lets test designers raise their level of abstraction

Model-Driven Test Design Introduction to Software Testing (Ch 1), © Ammann & Offutt 12 software artifact model / structure test requirements refined requirements / test specs input values test cases test scripts test results pass / fail IMPLEMENTATION ABSTRACTION LEVEL DESIGN ABSTRACTION LEVEL

Model-Driven Test Design – Steps Introduction to Software Testing (Ch 1), © Ammann & Offutt 13 software artifact model / structure test requirements refined requirements / test specs input values test cases test scripts test results pass / fail IMPLEMENTATION ABSTRACTION LEVEL DESIGN ABSTRACTION LEVEL analysis criterionrefine generate prefix postfix expected automate execute evaluate

Model-Driven Test Design – Activities Introduction to Software Testing (Ch 1), © Ammann & Offutt 14 software artifact model / structure test requirements refined requirements / test specs input values test cases test scripts test results pass / fail IMPLEMENTATION ABSTRACTION LEVEL DESIGN ABSTRACTION LEVEL Test Design Test Execution Test Evaluation Raising our abstraction level makes test design MUCH easier

Refinement for Chapters 2 & 3 Introduction to Software Testing (Ch 1), © Ammann & Offutt 15 The model-driven test design process is generic and has to be instantiated (or refined) for specific kinds of structures

Model-Driven Test Design – Graphs Introduction to Software Testing (Ch 1), © Ammann & Offutt 16 software artifact graph nodes, edges, subpaths test paths input values test cases test scripts test results pass / fail IMPLEMENTATION ABSTRACTION LEVEL DESIGN ABSTRACTION LEVEL analysis criterion refine generate prefix postfix expected automate execute evaluate source statechart use case architecture … NC EC PPC …

Model-Driven Test Design – Logic Introduction to Software Testing (Ch 1), © Ammann & Offutt 17 software artifact predicate truth table rows predicate values input values test cases test scripts test results pass / fail IMPLEMENTATION ABSTRACTION LEVEL DESIGN ABSTRACTION LEVEL analysis criterion refine generate prefix postfix expected automate execute evaluate source statechart use case architecture … CoC CACC PC CC