The Category-Partition Method for Specifying and Generating Functional Tests. Thomas J. Ostrand and Marc J.Balcer [ CACM,1988 ]. Slides from Prof. Shmuel.

Slides:



Advertisements
Similar presentations
Automating Software Module Testing for FAA Certification Usha Santhanam The Boeing Company.
Advertisements

Software & Services Group, Developer Products Division Copyright© 2010, Intel Corporation. All rights reserved. *Other brands and names are the property.
Introducing Formal Methods, Module 1, Version 1.1, Oct., Formal Specification and Analytical Verification L 5.
SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
Chapter 3: Editing and Debugging SAS Programs. Some useful tips of using Program Editor Add line number: In the Command Box, type num, enter. Save SAS.
Lecture # 2 : Process Models
© 2010 Delmar, Cengage Learning Chapter 9: Using ActionScript.
Programming Types of Testing.
Requirement Analysis and Specification Mr. Manoj Kumar Kar.
Software Requirements
(c) 2007 Mauro Pezzè & Michal Young Ch 10, slide 1 Functional testing.
Chapter 18 Testing Conventional Applications
Programming Logic and Design, Introductory, Fourth Edition1 Understanding Computer Components and Operations (continued) A program must be free of syntax.
School of Computer ScienceG53FSP Formal Specification1 Dr. Rong Qu Introduction to Formal Specification
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
1 Software Testing and Quality Assurance Lecture 5 - Software Testing Techniques.
Software Testing Prasad G.
What Exactly are the Techniques of Software Verification and Validation A Storehouse of Vast Knowledge on Software Testing.
Test Design Techniques
Ch 111 Chapter 11 Advanced Batch Files. Ch 112 Overview This chapter focuses on batch file commands that allow you to:  write sophisticated batch files.
January 27, 2002 ECEN5033 University of Colorado -- Class Testing 1 Specifying interactions Remainder of slides assume Operations defined by a class are.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 13 Slide 1 Application architectures.
Programming Languages: Telling the Computers What to Do Chapter 16.
O BJECT O RIENTATION F UNDAMENTALS Prepared by: Gunjan Chhabra.
Parser-Driven Games Tool programming © Allan C. Milne Abertay University v
Mathematical Modeling and Formal Specification Languages CIS 376 Bruce R. Maxim UM-Dearborn.
Concepts and Terminology Introduction to Database.
Introduction to MDA (Model Driven Architecture) CYT.
Configuration Management (CM)
CIS 218 Advanced UNIX1 CIS 218 – Advanced UNIX (g)awk.
SOFTWARE DESIGN.
Using Client-Side Scripts to Enhance Web Applications 1.
Introduction to Software Testing. Types of Software Testing Unit Testing Strategies – Equivalence Class Testing – Boundary Value Testing – Output Testing.
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.
Introduction to Problem Solving. Steps in Programming A Very Simplified Picture –Problem Definition & Analysis – High Level Strategy for a solution –Arriving.
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 10 Slide 1 Chapter 13 Finalizing Design Specifications.
Chapter 1 Introduction. Chapter 1 - Introduction 2 The Goal of Chapter 1 Introduce different forms of language translators Give a high level overview.
XP Tutorial 8 Adding Interactivity with ActionScript.
Compiler Design Introduction 1. 2 Course Outline Introduction to Compiling Lexical Analysis Syntax Analysis –Context Free Grammars –Top-Down Parsing –Bottom-Up.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
1 Technical & Business Writing (ENG-715) Muhammad Bilal Bashir UIIT, Rawalpindi.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Agenda The Bourne Shell – Part II Special Characters Ambiguous File Reference Variable Names and Values User Created Variables Read-only Variables (Positional.
Concepts and Realization of a Diagram Editor Generator Based on Hypergraph Transformation Author: Mark Minas Presenter: Song Gu.
Chapter 13 Finalizing Design Specifications
Rigorous Testing by Merging Structural and Behavioral UML Representations Presented by Chin-Yi Tsai.
Chapter – 8 Software Tools.
Chapter 5 Introduction To Form Builder. Lesson C Objectives  Use sequences to automatically generate primary key values in a form  Create lists of values.
Lecture #1: Introduction to Algorithms and Problem Solving Dr. Hmood Al-Dossari King Saud University Department of Computer Science 6 February 2012.
Program Design. Simple Program Design, Fourth Edition Chapter 1 2 Objectives In this chapter you will be able to: Describe the steps in the program development.
DESIGN PROCESS AND CONCEPTS. Design process s/w design is an iterative process through which requirements are translated into a “blueprint” for constructing.
Artificial Intelligence and Lisp #3
Software Testing.
Input Space Partition Testing CS 4501 / 6501 Software Testing
Activity Diagram.
Requirements Analysis and Specification
Specification-Based Testing and the Category-Partition Method
Chapter 10: Process Implementation with Executable Models
Software Development Cycle
Assembler, Compiler, Interpreter
Problem Solving Skill Area 305.1
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
Software Verification and Validation
Assembler, Compiler, Interpreter
Software Verification and Validation
Software Development Cycle
Software Verification and Validation
Software Development Cycle
Presentation transcript:

The Category-Partition Method for Specifying and Generating Functional Tests. Thomas J. Ostrand and Marc J.Balcer [ CACM,1988 ]. Slides from Prof. Shmuel Sagiv’s lecture notes

Content: Introduction. The category-partition method: - characteristics. - the method. - examples. Other methods.

The goal of functional testing To find discrepancies between the actual behavior of the implemented system’s function and the desired behavior as described in the system’s functional specification.

How to achieve this goal ? Tests have to be execute for all the system functions. Tests have to be designed to maximize the chances of finding errors in the software.

Functional test can be derived from 3 sources: 1. The software specification. 2. Design information. 3. The code itself.

Partition - The standard approach The main idea is to partition the input domain of function being tested, and then select test data for each class of the partition. The problem of all the existing techniques is the lack of systematic.

The category partition method - main characteristics: The test specification : - is concise and uniform representation of the test information for a function. - it can be easily modified. - it gives the tester a logical way to control the volume of tests.

The category partition method - main characteristics (cont.): Using generator tool help us : - to provides an automated way to produce thorough tests. - to avoid impossible or undesirable tests. The method emphasizes both the specification coverage and the error detection aspects of testing.

A strategy for test case generation 1. Transform the system’s specification to be more concise and structured. 2. Decompose the specification into functional unit - to be tested independently. 3. Identify the parameters and environment conditions.

A strategy for test case generation (cont) 4. Find categories that characterize each parameter and environment condition. 5. Every category should be partitioned into distinct choices. formal test specification

A strategy for test case generation (cont) 6. test frames - set of choices, one from each category. test cases - test frame with specific values for each choices. test scripts - sequence of test cases. ?

Example Command: find Syntax: find Function: The find command is used to locate one or more instance of a given pattern in a text file. All lines in the file that contain the pattern are written to standard output. A line containing the pattern is written only once, regardless of the number of times the pattern occurs in it. The pattern is any sequence of characters whose length does not exceed the maximum length of a line in the file.To include a blank in the pattern, the entire pattern must be enclosed in quotes (“).To include quotation mark in the pattern,two quotes in a row (“ “) must be used.

Example: find john myfile display lines in the file myfile which contain john find “john smith” in myfile display lines in the file myfile which contain john smith find “john”” smith” in myfile display lines in the file myfile which contain john” smith

Categories Parameters: Pattern size: empty single character many character longer than any line in the file Quoting: pattern is quoted pattern is not quoted pattern is improperly quoted Embedded blanks: no embedded blank one embedded blank several embedded blanks Embedded quotes: no embedded quotes one embedded quotes several embedded quotes File name: good file name no file with this name omitted Environments: Number of occurrence of pattern in file: none exactly one more than one Pattern occurrences on target line: one more than one Total Tests frames: 1944 (=4*3*3*3*3*3*2)

Test Frame - Example: Pattern size : empty Quoting : pattern is quoted Embedded blanks : several embedded blanks Embedded quotes : no embedded quote File name : good file name Number of occurrence of pattern in file : none Pattern occurrence on target line : one

Adding Constraints to Reduce #of TC’S Parameters: Pattern size: empty [ property Empty ] single character [ property NonEmpty ] many character [ property NonEmpty ] longer than any line in the file [ property NonEmpty ] Quoting: pattern is quoted [ property Quoted ] pattern is not quoted [ if NonEmpty ] pattern is improperly quoted [ if NonEmpty ] Embedded blanks: no embedded blank [ if NonEmpty ] one embedded blank [ if NonEmpty and Quoted ] several embedded blanks [ if NonEmpty and Quoted ]

Embedded quotes: no embedded quotes [ if NonEmpty ] one embedded quotes [ if NonEmpty ] several embedded quotes [ if NonEmpty ] File name: good file name no file with this name omitted Environments: Number of occurrence of pattern in file: none [ if NonEmpty ] exactly one [ if NonEmpty ] [ property Match] more than one [ if NonEmpty ] [ property Match ] Pattern occurrences on target line: one [ if Match ] more than one [ if Match ] Total Tests frames: 678

Parameters: Pattern size: empty [ property Empty ] single character [ property NonEmpty ] many character [ property NonEmpty ] longer than any line in the file [ error ] Quoting: pattern is quoted [ property quoted ] pattern is not quoted [ if NonEmpty ] pattern is improperly quoted [ error ] Embedded blanks: no embedded blank [ if NonEmpty ] one embedded blank [ if NonEmpty and Quoted ] several embedded blanks [ if NonEmpty and Quoted ]

Embedded quotes: no embedded quotes [ if NonEmpty ] one embedded quotes [ if NonEmpty ] several embedded quotes [ if NonEmpty ] File name: good file name no file with this name [ error ] omitted Environments: Number of occurrence of pattern in file: none [ if NonEmpty ] exactly one [ if NonEmpty ] [ property Match] more than one [ if NonEmpty ] [ property Match ] Pattern occurrences on target line: one [ if Match ] more than one [ if Match ] Total Tests frames: 125 Total Tests frames: 40 [ single ]

Test Frame : Test case 28 : ( Key = ) Pattern size : many character Quoting : pattern is quoted Embedded blanks : several embedded blanks Embedded quotes : one embedded quote File name : good file name Number of occurrence of pattern in file : exactly none Pattern occurrence on target line : one Command to set up the test: copy/testing/sources/case_28 testfile find command to perform the test: find “has” “one quote” testfile Instruction for checking the test : the following line should be display: This line has “ one quote on it

Summary The category-partition method : - is a systematic method. - the language is concise,easily modified and can clearly be understood. - the tester can control the size of all the test not arbitrarily. - the TSL is to be changed and to include more features.