System Testing Earlier we have stated the 2 views of testing:

Slides:



Advertisements
Similar presentations
1 ECE 453 – CS 447 – SE 465 Software Testing & Quality Assurance Instructor Kostas Kontogiannis.
Advertisements

Introduction to Software Testing Chapter 2.6 Graph Coverage for Use Cases Paul Ammann & Jeff Offutt
Introduction to Software Testing Chapter 2.6 Graph Coverage for Use Cases Paul Ammann & Jeff Offutt
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
SWE Introduction to Software Engineering
Software modeling for embedded systems: static and dynamic behavior.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
Testing an individual module
- Testing programs to establish the presence of system defects -
1 Software Testing and Quality Assurance Lecture 5 - Software Testing Techniques.
High Level: Generic Test Process (from chapter 6 of your text and earlier lesson) Test Planning & Preparation Test Execution Goals met? Analysis & Follow-up.
Software Testing Prasad G.
Program unit A Program unit B Program unit T Function 1 Function 2 Function Component 1 Whole System (e.g. regression testing) Component 3....
1 Software Testing Techniques CIS 375 Bruce R. Maxim UM-Dearborn.
Chapter 13 & 14 Software Testing Strategies and Techniques
1 Object-Oriented Testing CIS 375 Bruce R. Maxim UM-Dearborn.
Different Levels of Testing
1 ECE 453 – CS 447 – SE 465 Software Testing & Quality Assurance Instructor Kostas Kontogiannis.
Let us start from the V-Model Verification Phases Requirements analysis System Design Architecture Design Module Design Coding Validation phases Unit.
CMSC 345 Fall 2000 Unit Testing. The testing process.
Testing phases. Test data Inputs which have been devised to test the system Test cases Inputs to test the system and the predicted outputs from these.
RUP Implementation and Testing
Software Engineering Chapter 23 Software Testing Ku-Yaw Chang Assistant Professor Department of Computer Science and Information.
What is Software Testing? And Why is it So Hard J. Whittaker paper (IEEE Software – Jan/Feb 2000) Summarized by F. Tsui.
CSC 480 Software Engineering Lecture 14 Oct 16, 2002.
ECE 264 Object-Oriented Software Development Instructor: Dr. Honggang Wang Fall 2012 Lecture 3: Requirements Specification, C++ Basics.
Chapter 14 System Testing.
1 Software Defect Testing Testing programs to establish the presence of system defects.
Foundations of Software Testing Chapter 1: Preliminaries Last update: September 3, 2007 These slides are copyrighted. They are for use with the Foundations.
Black Box Testing Techniques Chapter 7. Black Box Testing Techniques Prepared by: Kris C. Calpotura, CoE, MSME, MIT  Introduction Introduction  Equivalence.
Requirements as Usecases Capturing the REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
A Use Case Primer 1. The Benefits of Use Cases  Compared to traditional methods, use cases are easy to write and to read.  Use cases force the developers.
1 Introduction to Software Testing. Reading Assignment P. Ammann and J. Offutt “Introduction to Software Testing” ◦ Chapter 1 2.
CCSB223/SAD/CHAPTER131 Chapter 13 Designing the System Internals.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 20 Slide 1 Defect testing l Testing programs to establish the presence of system defects.
System Testing Beyond unit testing. 2 System Testing Of the three levels of testing, system level testing is closest to everyday experience We evaluate.
1 Graph Coverage (6). Reading Assignment P. Ammann and J. Offutt “Introduction to Software Testing” ◦ Section
CS212: Object Oriented Analysis and Design Lecture 34: UML Activity and Collaboration diagram.
CS212: Object Oriented Analysis and Design Lecture 32: Use case and Class diagrams.
Testing OO software. State Based Testing State machine: implementation-independent specification (model) of the dynamic behaviour of the system State:
Software Engineering1  Verification: The software should conform to its specification  Validation: The software should do what the user really requires.
CS451 Lecture 10: Software Testing Yugi Lee STB #555 (816)
CPSC 871 John D. McGregor Module 8 Session 1 Testing.
Task Analysis Lecture # 8 Gabriel Spitz 1. Key Points  Task Analysis is a critical element of UI Design  It describes what is a user doing or will.
Task Analysis Lecture # 8 Gabriel Spitz 1. Key Points  Task Analysis is a critical element of UI Design  It specifies what functions the user will need.
Capturing Requirements. Questions to Ask about Requirements 1)Are the requirements correct? 2)Consistent? 3)Unambiguous? 4)Complete? 5)Feasible? 6)Relevant?
HNDIT23082 Lecture 09:Software Testing. Validations and Verification Validation and verification ( V & V ) is the name given to the checking and analysis.
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
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.
Testing Integral part of the software development process.
From requirements to specification Specification is a refinement of requirements Can be included together as Software Requirements Specifications (SRS)
System Testing.
Paul Ammann & Jeff Offutt
Software Testing.
Architecture Concept Documents
Object-Oriented Static Modeling of the Banking System - I
Chapter 13 & 14 Software Testing Strategies and Techniques
Ch. 14 System Testing (with new slides 4/18)
Designing and Debugging Batch and Interactive COBOL Programs
Chapter 14 System Testing
“White box” or “glass box” tests
Paul Ammann & Jeff Offutt
Software testing.
Different Levels of Testing
Ch. 14 System Testing Earlier we have stated the 2 views of testing:
Chapter 10 – 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 13 & 14 Software Testing Strategies and Techniques 1 Software Engineering: A Practitioner’s Approach, 6th edition by Roger S. Pressman.
Presentation transcript:

System Testing Earlier we have stated the 2 views of testing: To show that the software works (according to specification) To detect as many defects (and have them fixed prior to releasing to the users) as possible In system testing we are more interested in showing that the system, as a whole with all the “major” specifications – especially cross-component, is working. Still Interested in knowing which “major” function is not working. (But this should be rare if we completed functional and component test properly.) We are not focused on all types of exception during systems test, but want to make sure that when multiple paths (threads) are executed, it still works according to the requirements. System testing is a blend of functional (black-box) and structural (white-box) testing - - - testing mostly “main” threads of system behavior.

Thread A thread is a sequence of activities that are observable. There are many levels of granularity for a thread: A sequence of instructions as in a DU-path for unit test A flow of control among a set of related modules as in a MM-path in an integration path. A sequence of “atomic” functions that contributes to the accomplishment of a major functionality as described in a requirements specification. In system testing, we are interested in the a) high-level (cross-functional) threads and b) “multiple” threads.

Examples of threads from the ATM Problem (p27 of the text) Unit Testing Entry of a digit: (port entry of a numerical digit keystroke and a port out of a digit echo on the screen. This is a minimal “atomic system function” and qualifies as a thread of interest at the unit test level. Entry of a PIN number: (this entails a set of activities from screen request of a PIN with interleaved sequence of digit entry until completion - - - possibly including cancellation and up to three re-tries). This is a sequence of atomic system functions that also qualifies as a thread, probably fit for integration testing or unit testing levels. A simple ATM transaction: (this includes a set of functions such as 1) Card entry, 2) PIN entry, 3) choice of transaction type (deposit, withdraw, account detail processing, etc.) This is a sequence of atomic system functions that is a thread & accomplishes a major function, fit for integration testing or system testing levels . Multiple ATM transactions: (this includes a complete user session where several different transactions- - - query, withdraw, deposit of different accounts - - - may transpire.) This is a sequence of different/multiple threads and is definitely in the domain of system testing. System Testing

Some definitions related to thread An atomic system function (ASF) is an action that is observable at the system level in terms of port entry and port output. An ASF graph is a directed graph of a ASF represented system where the nodes are the ASF’s and the edges represent the sequential flow. A source ASF is an ASF that is a source node in an ASF graph. A sink ASF is an ASF that is a sink node in an ASF graph. A system thread is a path from a source ASF to a sink ASF in the ASF graph of the system. The thread graph of a system is a directed graph where the a) nodes are the threads of the system and b) the edges represent the sequential execution flow from one thread to another.

Requirements Specification for System Testing Requirements specification served as a tool (input) for, mainly black-box testing, but also white-box testing even at the unit testing level; it is even more important as a source of developing test cases for system testing. There are many ways to express requirements and many ways to view the specification. As a whole the requirements specification may be viewed a set of inter-related elements (“basis” for requirements): Data (information and information structure) Actions (functional tasks) Devices (for input, output, and storage) Events (triggers and combination of action and data) Threads (business flow or process flow, involving events) Only thing missing is the non-functional attribute such as quality, performance, etc.

Multiple Ways of Viewing Specification “Basis” elements Used mostly for early spec and development of system devices Data Contextual model Actions Behavior model Devices Often used for requirements specifications Events Structural model Threads Used mostly for development There are many tools for expressing these models: (e.g.) - state transition diagram ( or Finite State Machine) - E-R diagram - Petri net

Using Finite State Machine or State Transition Diagram Welcome Card entry (state A) State Input Next State Output A correct card B screen 2 A bad card A screen 1; card B good pin # C screen 5 B failed pin # A screen 4 wrong card Display screen 1; Eject card Correct card Display screen 2 Pin Entry (state B) Failed Pin Process Display screen 4 Successful Pin Process Tabular form Display screen 5 Choosing Transaction (state C) Graphical form

Finite State Machine at a “deeper” level for PIN processing Welcome Card entry (state A) Incorrect Pin/ cancel wrong card Display screen 4, 1 Display screen 1; Eject card Correct card Display screen 2 1st Pin Entry (state B) Incorrect Pin/ cancel 2nd Pin Entry (state D) Incorrect Pin/ cancel 3rd Pin Entry (state E) Display screen 3, 2 Successful Pin Process Display screen 3, 2 Correct Pin Display screen 5 Choosing Transaction (state C) Display screen 5 Correct Pin Display screen 5

Threads with Finite State Machine If we can model the requirements specifications with the finite state machine model, then: A set of transitions (with inputs and outputs) can be a source of threads for system test because it covers: Events ( state and input) Action (state transition and output) Data (inputs and outputs) Thread (series of state transitions) The drawbacks are: that not all specifications “easily” fit this model that the determination of what depth level should the finite state machine be for system test; very low a level is more appropriate for unit or integration test

Test Coverage Metrics with Finite State Machine Every node (state) is covered. This is a very minimal coverage, much like every statement is covered (recall this from structural path testing) In our 1st state transition chart - - - this is equivalent to covering states A, B, and C with correct card and successful PIN processing. Every node and edge (transition) is covered This is a more complete coverage if the finite state machine is carried to deep enough level.

Strategies for Thread Testing Finite State Machine modeled systems Event based (state-input based): Each input event occurs A “typical” or “common” sequence of input events occur Each input event occurs in every “relevant” data context For a given context, all “inappropriate” input events occur For a given context, all possible (both appropriate & inappropriate) inputs events occur Event based (state-output based): Each output event occurs Each output event occurs for every “cause” Port-based (both input and output): Cover all input and out ports

Strategies for thread Testing Data Represented Systems Some software system requirements are better represented with E-R diagram. For E-R modeling used for specifications, the threads may be identified via: Looking at the cardinality of every relationship One-one One-many Many-one Many - many Looking at the participation factor of every relationship Looking at functional dependencies among relationships e.g. loaning a book that’s not available More importantly --- we want to make sure that the DB “access” is tested, along with threads such as a) shutdown -restart b) backup-recovery c) multiple access threads

Using Operational Profile when interested in “Effectiveness” The effectiveness of testing is often measured in terms of problems found versus effort spent or (# of defects found) / person hours spent (# of defects found) / number of test cases Historically, most of the failures also tend to fall in small parts of the system (80% failures occur in 20% of the system - - - e.g. the most heavily traversed threads). Thus if we can collect the operational profiles of the users, we can identify the most heavily used threads. This strategy of system testing with operational profile can improve our test efficiency. Not just the number of problems found

User-Operational Profile Example (naïve user versus experienced user) (20/20) (20/20) prob = .25 √ term naïve users (20/80) default f1 f4 (5/5) prob = .063 (5/10) f4 term Start (80 users) (5/10) (5/5) prob = .063 (10/60) f1 f6 term experienced users (60/80) (40/40) (40/40) (40/60) prob = .50√√ term f7 f2 Choice of f1,f2,f3 (10/60) (3/10) (3/3) prob = .037 term f4 f3 (7/10) (7/7) prob = .087 f5 Note that 2 usage cases take up 75% of operational profile ! term

Software changes and Regression Test In the life span of a software, we can anticipate changes that result in multiple cycles of fixes and release. Thus it needs to be retested to ensure that what worked before still works (did not get regressed). A common strategy is to re-run the complete system test over as the regression test A more economical strategy for regression test is to develop (1) new threads for the new areas and (2) only include those old threads that are affected by the new release. (Yes, there may be an element of risk) Think about the “neighborhood” testing strategy-last lecture