240 likes | 340 Views
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 Bleyberg Dr. Scott A. DeLoach.
E N D
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 Bleyberg Dr. Scott A. DeLoach
Overview • Introduction of project • Requirements • Data Flow Diagram • Cost Estimation • Milestones
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++
Potential Risks • Lack of existing mutation operators references • Lack of experiences of using mutation operators
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.
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.
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
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
Mutation Operators – Operators • Operators Insertion Operators • IBO: Binary Operators Insertion • Multiplicative operators: Multiplication (*), Division (/), Modulus (%). • Additive operators: Addition (+), subtraction (-). • IBO1
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
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
Mutation Operators – Operators • IUO: Unary operator insertion • Unary operator includes: ‘!’, ‘&’, ‘~’, ‘*’, ‘+’, ‘++’, ‘-‘, ‘- -‘.
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.
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: Change E.g. 1:35:25:<:+1< Which means that fault 1 is located at line 35, 25th column, original character is “<”, and should be changed to “+1<”.
Data Flow Diagram Scan for Keywords SRC Input Replace Arithmetic Operators Replace Operators Replace Relational Operators Replace Operands Internal File Output File (Faults File) Build Faults File
Project Requirements • Programming Language: C++ • Ability to Read C++ Program • Keywords Search • Applying Mutation Operators • Recording Faults • Generating Faults File
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
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
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.
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
Thank you! Comments? Questions?