Ch05-criteria

Ch05-criteria - Introduction to Software Testing (2nd...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Introduction to Software Testing ( 2nd edition ) Chapter 5 Criteria-Based Test Design Paul Ammann & Jeff Offutt http://www.cs.gmu.edu/~offutt/softwaretest/ First version, 11 September 2011 Changing Notions of Testing Old view focused on testing at each software development phase as being very different from other phases – Unit, module, integration, system … New view is in terms of structures and criteria – Graphs, logical expressions, syntax, input space Test design is largely the same at each phase Ct it h d id i f f Introduction to Software Testing, Edition 2 (Ch 5) © Ammann & Offutt 2 – Creating the model is different – Choosing values and automating the tests is different
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 New : Test Coverage Criteria A tester’s job is simple : Define a model of the software, then find ways Test Requirements : Specific things that must be satisfied or covered during testing Test Criterion : A collection of rules and a process that define test requirement to cover it Introduction to Software Testing, Edition 2 (Ch 5) © Ammann & Offutt 3 requirements Testing researchers have defined dozens of criteria, but they are all really just a few criteria on four types of structures … Criteria Based on Structures Structures : Four ways to model software 1. Graphs 2. Logical Expressions 3. Input Domain Characterization (not X or not Y) and A and B A: {0, 1, >1} B: {600, 700, 800} C: {swe, cs, isa, infs} Introduction to Software Testing, Edition 2 (Ch 5) © Ammann & Offutt 4 4. Syntactic Structures if (x > y) z = x - y; else z = 2 * x;
Background image of page 2
3 Source of Structures These structures can be extracted from lots of software artifacts – Graphs can be extracted from UML use cases, finite state machines source code machines, source code, … – Logical expressions can be extracted from decisions in program source, guards on transitions, conditionals in use cases, This is not the same as “ model-based testing ,” which derives tests from a model that describes some aspects of the system under test – The model usually describes part of the behavior – The source is usually not considered a model Introduction to Software Testing, Edition 2 (Ch 5) © Ammann & Offutt 5 1. Graph Coverage – Structural 6 2 5 3 1 7 4 This graph may represent statements & branches Path Cover every path 12567 1257 Introduction to Software Testing, Edition 2 (Ch 5) © Ammann & Offutt 6 methods & calls components & signals states and transitions 1357 13567 1357 1343567 134357 …
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 1. Graph Coverage – Data Flow 6 2 def = {x, y} def = {a , m} def = {m} use = {x} use = {a} use = {m} use = {y} 3 (5 6)) (a 3 (5 7)) 5 3 1 7 4 This graph contains: def = {a} use = {x} use = {a} 1257 All Uses Every def “reaches” every use 1, 2, 5, 6, 7 Introduction to Software Testing, Edition 2 (Ch 5) © Ammann & Offutt 7 3, (5,6)), (a, 3, (5,7)), (m, 2, 7), (m, 4, 7), (m, 6, 7) defs : nodes & edges where variables get values uses : nodes & edges where values are accessed def = {m} use = {y} 1, 2, 5, 7 1, 3, 4, 3, 5, 7 1, 2, 5, 7 1, 3, 5, 6, 7 1, 3, 5, 7 1, 3, 4, 3, 5,7 1. Graph - FSM Example Memory Seats in a Lexus ES 300
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/17/2012 for the course SWE 637 taught by Professor Offutt,j during the Fall '08 term at George Mason.

Page1 / 15

Ch05-criteria - Introduction to Software Testing (2nd...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online