+ All Categories
Home > Documents > Fault Generation Tool (FGT) of Error-Space Model (ESM) for the generation of test cases and...

Fault Generation Tool (FGT) of Error-Space Model (ESM) for the generation of test cases and...

Date post: 04-Jan-2016
Category:
Upload: raymond-garrett
View: 212 times
Download: 0 times
Share this document with a friend
24
Fault Generation Tool (FGT) of Error- Space Model (ESM) for the generation of test cases and estimation of software reliability Hong Zhang May 06, 2003
Transcript
Page 1: Fault Generation Tool (FGT) of Error-Space Model (ESM) for the generation of test cases and estimation of software reliability Hong Zhang May 06, 2003.

Fault Generation Tool (FGT) of Error-Space Model (ESM) for the generation of test cases and estimation of software reliability

Hong ZhangMay 06, 2003

Page 2: Fault Generation Tool (FGT) of Error-Space Model (ESM) for the generation of test cases and estimation of software reliability Hong Zhang May 06, 2003.

MSE Presentation 1

Major Professor:

Dr. David A. Gustafson

Committee Members:Dr. Maria Zamfir BleybergDr. Scott A. DeLoach

Page 3: Fault Generation Tool (FGT) of Error-Space Model (ESM) for the generation of test cases and estimation of software reliability Hong Zhang May 06, 2003.

Overview

Introduction of project Requirements Data Flow Diagram Cost Estimation Milestones

Page 4: Fault Generation Tool (FGT) of Error-Space Model (ESM) for the generation of test cases and estimation of software reliability Hong Zhang May 06, 2003.

Purpose of the Project

To gain some experience with software testing To study mutation testing To provide mutation operators for C++

programs To implement a fault generation tool with C++

Page 5: Fault Generation Tool (FGT) of Error-Space Model (ESM) for the generation of test cases and estimation of software reliability Hong Zhang May 06, 2003.

Potential Risks

• Lack of existing mutation operators references

• Lack of experiences of using mutation operators

Page 6: Fault Generation Tool (FGT) of Error-Space Model (ESM) for the generation of test cases and estimation of software reliability Hong Zhang May 06, 2003.

Introduction of the project

This fault generation tool will build a set of possible faults by the ESM tool. The faults will be based on program mutation testing. The output of FGT will be a file of possible faults.

Page 7: Fault Generation Tool (FGT) of Error-Space Model (ESM) for the generation of test cases and estimation of software reliability Hong Zhang May 06, 2003.

Mutation testing

For a program P, mutation testing produces a set of alternate programs. Each alternate program, P i , known as a mutant of P , is formed by modifying a single statement of P according to some predefined modification rule. These modification rules are called mutation operators. The syntactic change itself is called the mutation, and the resulting program is the mutant program, or simply mutant.

Page 8: Fault Generation Tool (FGT) of Error-Space Model (ESM) for the generation of test cases and estimation of software reliability Hong Zhang May 06, 2003.

Mutation Operators for C++

Operand Replacement Operators (18) Operators Insertion Operators (2) Arithmetic Operator Replacement

Operators (1) Operators within these groups have

reasonably uniform semantics and rules for applications

Page 9: Fault Generation Tool (FGT) of Error-Space Model (ESM) for the generation of test cases and estimation of software reliability Hong Zhang May 06, 2003.

Mutation Operators - Operand

Operand Replacement Operators (18) Variables: OVV, OVC, OVA, OVP Constants: OCV, OCC, OCA, OCP Array References: OAV, OAC, OAA, OAP, OAN Pointers: OPV, OPC, OPA, OPP, OPN

Page 10: Fault Generation Tool (FGT) of Error-Space Model (ESM) for the generation of test cases and estimation of software reliability Hong Zhang May 06, 2003.

Mutation Operators – Operators

Operators Insertion Operators IBO: Binary Operators Insertion

Multiplicative operators: Multiplication (*), Division (/), Modulus (%).

Additive operators: Addition (+), subtraction (-).

IBO1

Page 11: Fault Generation Tool (FGT) of Error-Space Model (ESM) for the generation of test cases and estimation of software reliability Hong Zhang May 06, 2003.

Mutation Operators – Operators (cont.)

Operators Insertion Operators IBO: Binary Operators Insertion

Relational and equality operators: Less than (<), Greater than (>), Less than or

equal to (<=), Greater than or equal to (>=), Equal to (= =), Not equal to (!=).

IBO2

Page 12: Fault Generation Tool (FGT) of Error-Space Model (ESM) for the generation of test cases and estimation of software reliability Hong Zhang May 06, 2003.

Mutation Operators – Operators (cont.)

Operators Insertion Operators IBO: Binary Operators Insertion

Logical operators: Logical AND (&&). Logical OR (||)

IBO3 Assignment operators: Assignment (=),

Addition assignment (+=), Subtraction assignment (- =), Multiplication assignment

(*=), Division assignment (/=) IBO4

Page 13: Fault Generation Tool (FGT) of Error-Space Model (ESM) for the generation of test cases and estimation of software reliability Hong Zhang May 06, 2003.

Mutation Operators – Operators

IUO: Unary operator insertion Unary operator includes: ‘!’, ‘&’, ‘~’, ‘*’,

‘+’, ‘++’, ‘-‘, ‘- -‘.

Page 14: Fault Generation Tool (FGT) of Error-Space Model (ESM) for the generation of test cases and estimation of software reliability Hong Zhang May 06, 2003.

Mutation Operators – Arithmetic

Arithmetic Operator Replacement Operators (1) AOR: Arithmetic operator replacement Each occurrence of one of the operators

+, -, *, and / is replaced by each of the other operators.

Page 15: Fault Generation Tool (FGT) of Error-Space Model (ESM) for the generation of test cases and estimation of software reliability Hong Zhang May 06, 2003.

Restrictions for input and output

Input: Any C++ files (C++ programs only)

Output: A set of possible faults generated by the program (

a faults file) The format of the output is going to be:Fault ID: Line Number: Column Number: Original

expression: ChangeE.g. 1:35:25:<:+1<Which means that fault 1 is located at line 35, 25th column,

originalcharacter is “<”, and should be changed to “+1<”.

Page 16: Fault Generation Tool (FGT) of Error-Space Model (ESM) for the generation of test cases and estimation of software reliability Hong Zhang May 06, 2003.

Data Flow Diagram

SRC Input

Replace Operands

Replace Arithmetic Operators

Replace Relational Operators

Replace Operators

Output File(Faults File)

Scan for Keywords

Internal File

Build Faults File

Page 17: Fault Generation Tool (FGT) of Error-Space Model (ESM) for the generation of test cases and estimation of software reliability Hong Zhang May 06, 2003.

Project Requirements

Programming Language: C++ Ability to Read C++ Program Keywords Search Applying Mutation Operators Recording Faults Generating Faults File

Page 18: Fault Generation Tool (FGT) of Error-Space Model (ESM) for the generation of test cases and estimation of software reliability Hong Zhang May 06, 2003.

Project Plan

Page 19: Fault Generation Tool (FGT) of Error-Space Model (ESM) for the generation of test cases and estimation of software reliability Hong Zhang May 06, 2003.

Breakdown of the project

Keywords Scanning: P1 Operands replacement: P2 Operators replacement: P3 Arithmetic operators replacement: P4 Relational operators replacement: P5 Faults File generation: P6 Main method and others: P7

Page 20: Fault Generation Tool (FGT) of Error-Space Model (ESM) for the generation of test cases and estimation of software reliability Hong Zhang May 06, 2003.

Subpiece Size Estimate (in LOC)

Part Max Size Best Guess Min Size

1 300 450 600

2 200 350 500

3 90 150 300

4 90 150 300

5 90 150 300

6 300 450 600

7 200 300 400

Page 21: Fault Generation Tool (FGT) of Error-Space Model (ESM) for the generation of test cases and estimation of software reliability Hong Zhang May 06, 2003.

Estimates for the project

The estimates for each section: P1 = 450 P2 = 350 P3 = 165 P4 = 165 P5 = 165 P6 = 450 P7 = 300 The estimate for the whole project: Whole = 2050

Page 22: Fault Generation Tool (FGT) of Error-Space Model (ESM) for the generation of test cases and estimation of software reliability Hong Zhang May 06, 2003.

Cost Estimation - Productivity

KDSI(Kilo Delivered Source Instruction)= 2.05 KLOC

PM = 3.0 * (2.05) 1.12 = 7 Person-Month TDEV = 2.5 * (7) 0.38 = 2.5*1.69 = 3.56 Month 2050 LOC / 3.56 Month = 570 LOC/ Month = 19

LOC / Day My Productivity: 19 LOC / Hour => 38 LOC /

Day => I will finish this project in about 2 months if I work 2 hours a day, 30 days a month.

Page 23: Fault Generation Tool (FGT) of Error-Space Model (ESM) for the generation of test cases and estimation of software reliability Hong Zhang May 06, 2003.

Milestones

05/06/03: First Presentation• Introduction of project, Project Plan• project requirements

06/10/03: Second Presentation• Object Model, SQA Plan, Test Plan

07/16/03: Third Presentation• Coding, Testing, Documentation, Final Report

Page 24: Fault Generation Tool (FGT) of Error-Space Model (ESM) for the generation of test cases and estimation of software reliability Hong Zhang May 06, 2003.

Thank you!

Comments?Questions?


Recommended