Testing: General Requirements, DFT, Multilevel Testing Testing: General Requirements DFT Multilevel Testing-- System, Black Box, White or Glass Box Tests.

Slides:



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

Software Testing Technique. Introduction Software Testing is the process of executing a program or system with the intent of finding errors. It involves.
Defect testing Objectives
SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
Software Failure: Reasons Incorrect, missing, impossible requirements * Requirement validation. Incorrect specification * Specification verification. Faulty.
Testing: General Requirements, DFT, Multilevel Testing Testing: General Requirements DFT Multilevel Testing-- System, Black Box, White Box Tests.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
Testing: General Requirements, DFT, Multilevel Testing Testing: General Requirements DFT Multilevel Testing-- System, Black Box, White Box Tests.
Embedded Systems: Hardware
Testing an individual module
Software Testing. “Software and Cathedrals are much the same: First we build them, then we pray!!!” -Sam Redwine, Jr.
Chapter 18 Testing Conventional Applications
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Outline Types of errors Component Testing Testing Strategy
1 Principles of testing TESTING BASICS: Basic principles of testing: Testing must be:  thorough  ongoing  developed with design  efficient most effective--independent.
1 Software Testing Techniques CIS 375 Bruce R. Maxim UM-Dearborn.
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.
Dr. Pedro Mejia Alvarez Software Testing Slide 1 Software Testing: Building Test Cases.
System/Software Testing
TESTING.
CS 501: Software Engineering Fall 1999 Lecture 16 Verification and Validation.
CMSC 345 Fall 2000 Unit Testing. The testing process.
INT-Evry (Masters IT– Soft Eng)IntegrationTesting.1 (OO) Integration Testing What: Integration testing is a phase of software testing in which.
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 Basics of Testing Presented by: Vijay.C.G – Glister Tech.
Embedded Systems: Testing. Testing needs to occur at many levels and at many stages in the development process. Testing is needed to verify adherence.
Testing Workflow In the Unified Process and Agile/Scrum processes.
Introduction to Software Testing. Types of Software Testing Unit Testing Strategies – Equivalence Class Testing – Boundary Value Testing – Output Testing.
Black Box Testing Techniques Chapter 7. Black Box Testing Techniques Prepared by: Kris C. Calpotura, CoE, MSME, MIT  Introduction Introduction  Equivalence.
Black Box Testing Focuses in the functional requirements of the program It is not an alternative to white-box techniques It is a complementary approach.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Software Verification, Validation and Testing.
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
1 Ch. 1: Software Development (Read) 5 Phases of Software Life Cycle: Problem Analysis and Specification Design Implementation (Coding) Testing, Execution.
Testing: General Requirements, DFT, Multilevel Testing Testing: General Requirements DFT Multilevel Testing-- System, Black Box, White or Glass Box Tests.
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.
1 Software Testing Strategies: Approaches, Issues, Testing Tools.
SOFTWARE TESTING. Introduction Software Testing is the process of executing a program or system with the intent of finding errors. It involves any activity.
Testing: General Requirements; DFT; Multilevel Testing.
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.
1 The Software Development Process ► Systems analysis ► Systems design ► Implementation ► Testing ► Documentation ► Evaluation ► Maintenance.
Silicon Programming--Testing1 Completing a successful project (introduction) Design for testability.
HNDIT23082 Lecture 09:Software Testing. Validations and Verification Validation and verification ( V & V ) is the name given to the checking and analysis.
1 Phase Testing. Janice Regan, For each group of units Overview of Implementation phase Create Class Skeletons Define Implementation Plan (+ determine.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
VI SEM CSE UNIT IV SOFTWARE ENGINEERING PROJECT MANAGEMENT TESTING STRATEGIES By Mr. Vaibhav V. Bhujade DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING DMIETR,
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
Embedded Systems: Testing. Combinational Logic Main issues in testing embedded systems hardware: The world is ANALOG, not digital; even in designing.
SOFTWARE TESTING LECTURE 9. OBSERVATIONS ABOUT TESTING “ Testing is the process of executing a program with the intention of finding errors. ” – Myers.
CSE 219 Final exam review.
Software Testing.
Testing Tutorial 7.
Software Testing.
Chapter 9, Testing.
Software Engineering (CSI 321)
Lecture on Black Box Testing
Verification and Testing
UNIT-4 BLACKBOX AND WHITEBOX TESTING
Lecture 09:Software Testing
Software testing.
CS240: Advanced Programming Concepts
Software Verification and Validation
Software Verification and Validation
Software Verification and Validation
UNIT-4 BLACKBOX AND WHITEBOX TESTING
Presentation transcript:

Testing: General Requirements, DFT, Multilevel Testing Testing: General Requirements DFT Multilevel Testing-- System, Black Box, White or Glass Box Tests

Testing--General Requirements and Strategies Testing--general requirements: thorough ongoing DEVELOPED WITH DESIGN (DFT--design for test) note: this implies that several LEVELS of testing will be carried out efficient Testing: general strategies: Fault avoidance: reduce possibility of faults through techniques such as configuration management, good development process Fault detection: use debugging and testing to find and remove faults Fault tolerance: use techniques such as redundant modules, let them “vote” on what the output should be

Efficiency / How Thoroughly Can We Test? Testing is difficult: example: VLSI chip--200 inputs; 2000 flipflops (one-bit memory cells) # exhaustive tests? What is the overall time to test if we can do1 test / msec? 1 test / msec? 1 test /nsec? Testing functionality (as with the above chip) is an example of an NP-complete problem, i.e., a problem for which the only algorithms we know to actually find the answer would take time exponential in the problem size Testing software is even harder, there are usually semantic issues which are difficult to deal with “gates”—n 2 I/O—4n

Good, Bad, and Successful Tests “Psychology of testing”: good test: has a high probability of finding an error ("bad test": not likely to find anything new) successful test: finds a new error

Most Effective Testing Is Independent most effective testing: by an "independent” third party It is more difficult to “see” the errors you have included in your own work: --subconsciously you want the system to work --you may know what you intended and overlook what is actually there --an independent tester brings a fresh viewpoint to the question of what works and what doesn’t --testing requires expertise; common practice of putting the most inexperienced team members in charge of testing is not really effective Question: what does this imply about your team testing strategy for the quarter project?

Automated Testing Automated testing Testing must be thorough and must be repeated frequently during development. Thus it is a good candidate for automation. Example system for automated testing in Java:JUnit (Fig ) TestCase ConcreteTestCase TestResult Test run (TestResult) TestSuite

Testing—UML extension Example: U2TP—UML 2 Testing Profile (2005 extension to UML) Extends UML to allow the modeling of testing Can be used with manual or automated testing Example: Figure 11-31: ----Context: organize test cases, test components, system under test (SUT) ----Components: set up tests ----SUT: what is being tested

Matching Testing with Design and Language How will testing match with design/language? e.g.: *procedural: example--sort an array—program has access to all array information *oo: example--develop an "array class”—only the owner class and friends have direct access to the array structure what kinds of test need to be done in each case?

Testing strategies At different points in the development cycle, tests may have different goals, e.g.: --verification--functions correctly implemented (according to specifications) --validation--we are implementing the correct functions (according to requirements)

Design for Testability (DFT) Design for Testability (DFT)--what makes software "testable"? understandability: you understand module, inputs, and outputs decomposability: you can decompose into smaller problems and test each separately operability: only a few errors possible--incremental test strategy controllability: you can control state + input to test observability: you can see the results of the test simplicity: you choose the “simplest solution that will work” stability: same test will give same results each time

Spiral design/testing strategy A general design/testing strategy can be described as a "spiral”: requirements  design  code system test  module,integ. tests  unit test (system) (black (white box) box) when is testing complete? One model: "logarithmic Poisson model” f(t)=(1/p)ln(I 0 pt+1) f(t) = cumulative expected failures at time t I 0 = failures per time unit at beginning of testing p = reduction rate in failure intensity START END Requirements, Specs/System Tests Design/Integration Tests Code/Unit Tests Design/Module Tests

Development and Testing Stages levels of test development stage white or glass box code black box class integrationclass (ER) diagram systemuse case We will use these stages for the quarter project. We will use a modified XP strategy: ----develop test with design at each stage ----during implementation, all tests must be passed (100%) ----if modifications are made, all tests must be rerun ----if errors are found, new tests must be written to cover them (“regression testing”) ----complete test suite, updated during development, must be maintained

Types of testing Types of testing:  white box--"internals” (also called "glass box")  black box—modules and their "interfaces” (also called "behavioral")  system--”functionality” (can be based on specs, use cases)  application-specific-- GUIs Client/Server Real-time (e.g.: drug dosage monitor; thermostat) Documentation/help

Good testing strategy steps in good test strategy: quantified requirements test objectives explicit user requirements clear use "rapid cycle testing" build self-testing software filter errors by technical reviews review test cases and strategy formally also continually improve testing process

OO testing strategy OO testing: emphasis is on interfaces use UML tools to support testing strategies and development of test cases --system tests: use cases; quality measurements --black box tests: ER diagrams, object message diagrams,dataflow and state diagrams --white box tests: class and state diagrams, CRC cards

Using specifications for system tests System tests should verify that specifications have been met For UML-based strategy: each use case ---> one or more system tests each quality / performance requirement  one or more system tests Additional qualitative or quantitative tests (not from use cases): examples:is system “user-friendly”? are timing requirements met? are available resources sufficient?

Using specifications for system tests Example: 1. Place call 2. Receive call 3. Use scheduler Cellular network User Associated sequence diagrams Associated test cases use cases Tests verify use case supported

Black box testing--what to test black box testing: test functional requirements of components. Must check:  incorrect or missing components  interface errors  data structures or external data access  behavior /performance errors  initialization and termination errors

Black box testing--testing graph start point is usually a graph: objects to be modeled relationships connecting them ("links") link properties example: can use ER diagrams, object message diagrams, state diagrams, with additional information on links as necessary

Black box testing--examples Examples: CarGasStation: station P company employee Denotes link that leads to one or more test cases

Black box testing techniques Some useful techniques for black box testing: transaction flow data flow state modeling timing modeling (all "dynamic") much testing focuses on "boundary values" between components

Black box testing--input partitioning example: equivalence partitioning for input for black box test: condition# ”cases” of input Range 1 valid, 2 invalid example: 0 < x < 10; test x = ? value1 valid, 2 invalid example: y = 7; test y = ? set member1 valid, 1 invalid example: j is even; test j = ? boolean1 valid, 1 invalid

Black box testing guidelines General guidelines: test BOUNDARIES test output also choose "orthogonal” cases if possible not

White box testing White box testing: we will look at specific strategies later on (e.g., path testing)