Static and dynamic Testing

Similar documents
Verification and Validation

Verification and Validation. Assuring that a software system meets a user s needs. Verification vs Validation. The V & V Process

Ian Sommerville 2006 Software Engineering, 8th edition. Chapter 22 Slide 1

Objectives. Chapter 19. Verification vs. validation. Topics covered. Static and dynamic verification. The V&V process

ΗΜΥ 317 Τεχνολογία Υπολογισμού

Ingegneria del Software II academic year: Course Web-site: [

Part 5. Verification and Validation

Software Testing. Software Testing

Verification and Validation. Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 22 Slide 1

Verification and Validation

Verification and Validation

Lecture 9. Verification and Validation. Assuring that a software system meets a user's needs. Tutorial Questions. Verification and Validation

CS314 Software Engineering Peer Reviews

Verification and Validation

Verification and Validation. Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 22 Slide 1

Learning outcomes. Systems Engineering. Debugging Process. Debugging Process. Review

SOFTWARE ENGINEERING SOFTWARE VERIFICATION AND VALIDATION. Saulius Ragaišis.

Software Engineering (CSC 4350/6350) Rao Casturi

Verification and Validation

Software Engineering Fall 2015 (CSC 4350/6350) TR. 5:30 pm 7:15 pm. Rao Casturi 11/10/2015

Software Engineering Fall 2014

Verification and Validation. Verification and validation

CS 424 Software Quality Assurance & Testing LECTURE 3 BASIC CONCEPTS OF SOFTWARE TESTING - I

Chapter 8. Achmad Benny Mutiara

Requirements Engineering

Lecture 15 Software Testing

Quality Assurance & Standards

Chapter 8 Software Testing

Three General Principles of QA. COMP 4004 Fall Notes Adapted from Dr. A. Williams

[IT6004-SOFTWARE TESTING] UNIT 2

Object-Oriented and Classical Software Engineering

Object-Oriented and Classical Software Engineering

MTAT : Software Testing

Examining the Code. [Reading assignment: Chapter 6, pp ]

Chapter 10. Testing and Quality Assurance

Specifying and Prototyping

Software Engineering 2 A practical course in software engineering. Ekkart Kindler

The requirements engineering process

Aerospace Software Engineering

Software re-engineering

Higher-order Testing. Stuart Anderson. Stuart Anderson Higher-order Testing c 2011

Darshan Institute of Engineering & Technology for Diploma Studies

Establishing the overall structure of a software system

1 Visible deviation from the specification or expected behavior for end-user is called: a) an error b) a fault c) a failure d) a defect e) a mistake

Software Processes. Ian Sommerville 2006 Software Engineering, 8th edition. Chapter 4 Slide 1

Techniques for the unambiguous specification of software

TESTING. Overview Slide 6.2. Testing (contd) Slide 6.4. Testing Slide 6.3. Quality issues Non-execution-based testing

MTAT : Software Testing

Inspection Overview Massood Towhidnejad Computer & Software Engineering Dept. Embry-Riddle University

Formal Specification. Ian Sommerville 2006 Software Engineering, 8th edition. Chapter 10 Slide 1

INTRODUCTION TO SOFTWARE ENGINEERING

Verification Using Static Analysis

VO Software Engineering

Software technology 7. Testing (2) BSc Course Dr. Katalin Balla

Software testing. Ian Sommerville 2006 Software Engineering, 8th edition. Chapter 23 Slide 1

Software Engineering

MONIKA HEINER.

Software Prototyping Animating and demonstrating system requirements. Uses of System Prototypes. Prototyping Benefits

9/3/2016. ECE 120: Introduction to Computing. Few Programmers Write Instructions (Assembly Code) Spend a Week Learning the C Programming Language

Requirements Validation and Negotiation

Requirements Engineering. Establishing what the customer requires from a software system. Requirements Engineering. What is a Requirement?

Critical Systems. Objectives. Topics covered. Critical Systems. System dependability. Importance of dependability

ΗΜΥ 317 Τεχνολογία Υπολογισμού

Static Analysis of C++ Projects with CodeSonar

Chapter 2 Basic Elements of C++

Topic: Software Verification, Validation and Testing Software Engineering. Faculty of Computing Universiti Teknologi Malaysia

SE351a: Software Project & Process Management. 11 Oct., 2005 SE351a, ECE UWO, (c) Hamada Ghenniwa

Sample Exam Syllabus

Verification, Testing, and Bugs

EXAMINING THE CODE. 1. Examining the Design and Code 2. Formal Review: 3. Coding Standards and Guidelines: 4. Generic Code Review Checklist:

User interface design. Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 16 Slide 1

SOFTWARE ENGINEERING DECEMBER. Q2a. What are the key challenges being faced by software engineering?

Standard Glossary of Terms used in Software Testing. Version 3.2. Foundation Extension - Usability Terms

Certification Authorities Software Team (CAST) Position Paper CAST-25

Chapter 10 Formal Specification

Static Analysis Techniques

Software change. Software maintenance

In this Lecture you will Learn: Testing in Software Development Process. What is Software Testing. Static Testing vs.

Coding Standards in FACE Conformance. John Thomas, Chris Edwards, and Shan Bhattacharya

Methods for requirements engineering

Chapter 11, Testing. Using UML, Patterns, and Java. Object-Oriented Software Engineering

Programming Languages Third Edition. Chapter 7 Basic Semantics

Automatic Merging of Specification Documents in a Parallel Development Environment

SOFTWARE ENGINEERING. Software Specification Software Design and Implementation Software Validation. Peter Mileff PhD

Green Star Volume Certification. Process Guide

Management. Software Quality. Dr. Stefan Wagner Technische Universität München. Garching 28 May 2010

Code Reviews. James Walden Northern Kentucky University

Coding Standards in FACE Conformance. John Thomas, Chris Edwards, and Shan Bhattacharya

Skill Category 6 - Summary Walkthroughs, Checkpoint Reviews and Inspections

Software Engineering I (02161)

Topics in Software Testing

Engr. M. Fahad Khan Lecturer Software Engineering Department University Of Engineering & Technology Taxila

Introduction to Software Engineering

Examination Questions Time allowed: 1 hour 15 minutes

Chapter 18. Software Reuse

Requirements Engineering Process

Software Project Management II

Static program checking and verification

1/29/2018. Starting a Program Executes its main Function. ECE 220: Computer Systems & Programming. The Function main Divides into Two Parts

CERT C++ COMPLIANCE ENFORCEMENT

Transcription:

Static and dynamic Testing Static testing Requirements specification High-level design Formal specification Detailed design Program Prototype Dynamic testing Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 1

Static testing!verifying the conformance of a software system and its specification without executing the code (by a computer)!static testing = human testing Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 2

Static testing! Involves analyses of source text by humans! Can be carried out on ANY documents produced as part of the software process! Discovers errors early in the software process! Usually more cost-effective than testing for defect detection at the unit and module level! Allows defect detection to be combined with other quality checks Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 3

Static testing effectiveness! More than 60% of program errors can be detected by informal program inspections (Meyers: 30-70 %)! More than 90% of program errors may be detectable using more rigorous mathematical program verification! The error detection process is not confused by the existence of previous errors Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 4

Program inspections! Formalised approach to document reviews! Intended explicitly for defect DETECTION (not correction)! Defects may be logical errors, anomalies in the code that might indicate an erroneous condition (e.g. an uninitialised variable) or non-compliance with standards! group code reading " team-based quality Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 5

Inspection pre-conditions! A precise specification must be available! Team members must be familiar with the organisation standards! Syntactically correct code must be available! An error checklist should be prepared! Management must accept that inspection will increase costs early in the software process! Management must not use inspections for staff appraisal Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 6

The inspection process Planning Overview Individual preparation Inspection meeting Rework Follow-up Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 7

Inspection procedure! System overview presented to inspection team! Code and associated documents are distributed to inspection team in advance! Inspection takes place and discovered errors are noted, no repair! Modifications are made to repair discovered errors! extension of checklists! Re-inspection may or may not be required Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 8

Inspection teams! Made up of at least 4 members! Author of the code being inspected! Reader who reads the code to the team! Inspectors who finds errors, omissions and inconsistencies! Moderator who chairs the meeting and notes discovered errors! Other roles are Scribe and Chief moderator! no superior Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 9

Inspection rate! 500 statements/hour during overview! 125 source statement/hour during individual preparation! 90-125 statements/hour can be inspected Meyers: 150 statements/hour Balzert: 1 page/hour! Inspection is therefore an expensive process! Inspecting 500 lines costs about 40 man/hours effort = 2800 Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 10

Inspection checklists! Checklist of common errors should be used to drive the inspection! Error checklist may be programming language dependent! Complement static semantics checks by compiler + static analyser! The 'weaker' the type checking, the larger the checklist! Coding standard / programming guidelines Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 11

Inspection checks Fault class Inspection check Data faults Are all program variables initialised before their values are used? Have all constants been named? Should the lower bound of arrays be 0, 1, or something else? Should the upper bound of arrays be equal to the size of the array or Size -1? If character strings are used, is a delimiter explicitly assigned? Control faults For each conditional statement, is the condition correct? Is each loop certain to terminate? Are compound statements correctly bracketed? In case statements, are all possible cases accounted for? Input/output faults Are all input variables used? Are all output variables assigned a value before they are output? Interface faults Do all function and procedure calls have the correct number of parameters? Do formal and actual parameter types match? Are the parameters in the right order? If components access shared memory, do they have the same model of the shared memory structure? Storage management If a linked structure is modified, have all links been faults correctly reassigned? If dynamic storage is used, has space been allocated correctly? Is space explicitly de-allocated after it is no longer Exception management faults required? Have all possible error conditions been taken account? Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 12 into