程建群 博士 (Dr. Jason Cheng) 13522913536 2008 年 03 月 Software Engineering Part 08.

Slides:



Advertisements
Similar presentations
1 CS101 Introduction to Computing Lecture 17 Algorithms II.
Advertisements

Selection (decision) control structure Learning objective
Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
Unified Modeling Language
CSE 1302 Lecture 8 Inheritance Richard Gesick Figures from Deitel, “Visual C#”, Pearson.
Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page: Lecture.
Introduction To System Analysis and Design
Use-case Modeling.
1 Software Testing and Quality Assurance Lecture 12 - The Testing Perspective (Chapter 2, A Practical Guide to Testing Object-Oriented Software)
Fall 2007CS 225 Introduction to Software Design Chapter 1.
Introduction to Software Design Chapter 1. Chapter 1: Introduction to Software Design2 Chapter Objectives To become familiar with the software challenge.
Chapter 1 Software Development. Copyright © 2005 Pearson Addison-Wesley. All rights reserved. 1-2 Chapter Objectives Discuss the goals of software development.
Aalborg Media Lab 21-Jun-15 Software Design Lecture 1 “ Introduction to Java and OOP”
1 Lecture 5 Introduction to Software Engineering Overview  What is Software Engineering  Software Engineering Issues  Waterfall Model  Waterfall Model.
Kendall & KendallCopyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall 9 Kendall & Kendall Systems Analysis and Design, 9e Process Specifications.
6. 2Object-Oriented Analysis and Design with the Unified Process Objectives  Explain how events can be used to identify use cases that define requirements.
Chapter 3 : Software Process and Other Models Juthawut Chantharamalee Curriculum of Computer Science Faculty of Science and Technology, Suan Dusit University.
Introduction to Software Design Chapter 1. Chapter 1: Introduction to Software Design2 Chapter Objectives To become familiar with the software challenge.
Kendall & KendallCopyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall 9 Kendall & Kendall Systems Analysis and Design, 9e Process Specifications.
Test coverage Tor Stålhane. What is test coverage Let c denote the unit type that is considered – e.g. requirements or statements. We then have C c =
Software Testing Sudipto Ghosh CS 406 Fall 99 November 9, 1999.
Introduction To System Analysis and design
Starting Chapter 4 Starting. 1 Course Outline* Covered in first half until Dr. Li takes over. JAVA and OO: Review what is Object Oriented Programming.
Katanosh Morovat.   This concept is a formal approach for identifying the rules that encapsulate the structure, constraint, and control of the operation.
Design Patterns OOD. Course topics Design Principles UML –Class Diagrams –Sequence Diagrams Design Patterns C#,.NET (all the course examples) Design Principles.
MT311 Java Application Development and Programming Languages Li Tak Sing( 李德成 )
Lecture 8 Inheritance Richard Gesick. 2 OBJECTIVES How inheritance promotes software reusability. The concepts of base classes and derived classes. To.
程建群 博士(Dr. Jason Cheng) 年03月
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 7 Slide 1 System models l Abstract descriptions of systems whose requirements are being.
Class Specification Implementation Graph By: Njume Njinimbam Chi-Chang Sun.
System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed.
Overview of Software Testing 07/12/2013 WISTPC 2013 Peter Clarke.
Requirements Engineering Requirements Elicitation Process Lecture-8.
Introduction to Software Design Chapter 1. Chapter Objectives  To become familiar with the software challenge and the software life cycle  To understand.
Introduction To System Analysis and Design
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 18 Slide 1 Software Reuse.
Introduction Algorithms and Conventions The design and analysis of algorithms is the core subject matter of Computer Science. Given a problem, we want.
Chapter 7 System models.
Test Coverage CS-300 Fall 2005 Supreeth Venkataraman.
1 Software Development Software Engineering is the study of the techniques and theory that support the development of high-quality software The focus is.
Software Testing. Software testing is the execution of software with test data from the problem domain. Software testing is the execution of software.
1/26 On-demand Learning Series Software Engineering of Web Application - Object-Oriented Development & UML Hunan University, Software School.
SOFTWARE DESIGN. INTRODUCTION There are 3 distinct types of activities in design 1.External design 2.Architectural design 3.Detailed design Architectural.
CS251 – Software Engineering Lecture 9: Software Design Slides by Mohammad El-Ramly, PhD
1-1 Software Development Objectives: Discuss the goals of software development Identify various aspects of software quality Examine two development life.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
OOP Review CS 124.
SOFTWARE TESTING. Introduction Software Testing is the process of executing a program or system with the intent of finding errors. It involves any activity.
OO in Context Lecture 13: Dolores Zage. Confused about OO Not alone, there is much confusion about OO many programs are claimed to be OO but are not really.
Rigorous Testing by Merging Structural and Behavioral UML Representations Presented by Chin-Yi Tsai.
Chapter 8 Testing the Programs. Integration Testing  Combine individual comp., into a working s/m.  Test strategy gives why & how comp., are combined.
Verification vs. Validation Verification: "Are we building the product right?" The software should conform to its specification.The software should conform.
GROUP MEMBERS AYAZ JAVED BITF06A002 SADAF SARFARAZ BITF06A003 SAMIN ATIQA BITF06A028 BILAL KHALID BITF06A042.
CS223: Software Engineering Lecture 25: Software Testing.
1 M206 Chapter 31: An Overview of Software Development 1.Defining the problem 2.Analyzing the requirement – constructing initial structural model 3.Analyzing.
Business System Development
Object-Oriented Software Engineering Using UML, Patterns, and Java,
Unified Modeling Language
About the Presentations
Design Thinking for Additive Manufacturing
Abstract descriptions of systems whose requirements are being analysed
Structural testing, Path Testing
CHAPTER 4 Test Design Techniques
Computer Programming.
Lecture 22 Inheritance Richard Gesick.
Test coverage Tor Stålhane.
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
Chapter 22 Object-Oriented Systems Analysis and Design and UML
CGS 2545: Database Concepts Summer 2006
Presentation transcript:

程建群 博士 (Dr. Jason Cheng) 年 03 月 Software Engineering Part 08

Software Engineering Software Testing

Software Engineering Introduction Software testing is the execution of the software with actual test data. Sometimes it is called dynamic software testing to distinguish it from static analysis, which is sometimes called static testing. Static analysis involves analyzing the source code to identify problems. Although other techniques are very useful in validating software, actual execution of the software with real test data is essential. Software Testing

Software Engineering Software Testing Fundamentals Exhaustive testing is the execution of every possible test case. Even simple systems have too many possible test cases. Thus, testing is always executing a very small percentage of the possible test cases. Software Testing

Software Engineering Software Testing Fundamentals Tow basic concerns in software testing are: (1)What test cases to use (test case selection) and (2)How many test cases are necessary (stopping criterion). Software Testing

Software Engineering Test Coverage Criterion Software Testing A test coverage criterion is a rule about how to select tests and when to stop testing. One basic issue in testing research is how to compare the effectiveness of different test coverage criteria. The standard approach is to use the subsumes relationship.

Software Engineering Test Coverage Criterion Software Testing A test criterion A subsumes test coverage criterion B if any test set that satisfies criterion A also satisfies criterion B. This means that the test coverage criterion A somehow include the criterion B Subsumes

Software Engineering Test Coverage Criterion Software Testing For example, if one test coverage criterion required every statement to be executed and another criterion required every statement to be executed and some additional tests, then the second criterion would subsume the first criterion. Subsumes

Software Engineering Software Testing Fundamentals In functional testing, the specification of the software is used to identify subdomains that should be tested. All special cases should have a test case. Tricky situations should be tested. Common mistakes and misconceptions should be tested. The result should be s set of test cases that will thoroughly test the program when it is implemented. Software Testing Functional Testing

Software Engineering Software Testing Fundamentals A way to formalize this identification of subdomains is to build a matrix using the conditions that we can identify from the specification and then to systematically identify all combinations of these conditions as being true or false. Software Testing Test Matrices

Software Engineering Software Testing Fundamentals Structural testing is based on the structure of the source code. The simplest structural testing criterion is every statement coverage, often called C0 coverage. Software Testing Structural Testing

Software Engineering Software Testing Fundamentals CO – Every Statement Coverage This criterion is that every statement of the source code should be executed by some test case. The normal approach to achieving C0 coverage is to select test cases until a coverage tool indicates that all statements in the code have been executed. Software Testing Structural Testing

Software Engineering Software Testing Fundamentals The following pseudo code implements the triangle problem. The matrix shows which lines are executed by which test cases. Note that the first three statements (A, B, and C) can be considered parts of the same node. Software Testing Example 8.1

Software Engineering Software Testing Fundamentals Software Testing Example 8.1

Software Engineering Software Testing Fundamentals Software Testing Example 8.1 By the fourth test case, every statement has been executed. This set of test cases is not the smallest set that would cover every statement. However, finding the smallest test set would often not find a good test set.

Software Engineering Software Testing Fundamentals Software Testing C1 – Every Branch Testing A more thorough test criterion is every-branch testing, which is often called C1 test coverage. In this criterion, the goal is to go both ways out of every decision. Structural Testing

Software Engineering Software Testing Fundamentals Software Testing Every-Path Testing Even more thorough is the every-path testing criterion. A path is a unique sequence of program nodes that are executed by a test case. Structural Testing

Software Engineering Software Testing Fundamentals Software Testing Multiple-Condition Coverage A multiple-condition testing criterion requires that each primitive relation condition is evaluated both true and false. Additionally, all combinations of T/F for the primitive relations in a condition must be tried. Structural Testing

Software Engineering Software Development Methods

Software Engineering Object-Oriented Development Software Development Methods Object-oriented software is different than conventional software. There are potentially many benefits to object-oriented development. Among these benefits are simplification of requirements, design, and implementation. Introduction

Software Engineering Object-Oriented Development Software Development Methods These benefits are achieved by modeling the problem domain with objects that represent the important entities, by encapsulating the functions with the data, by reusing objects within a project and between projects, and by having a solution that is much closer intellectually to the problem. The Unified Modeling Language (UML) is the standard notation for object-oriented models. Introduction

Software Engineering Object-Oriented Development Software Development Methods Inheritance comes from the recognition of the hierarchy of ideas and concepts, and how this hiearchy/classification involves much inherent reuse of ideas and so on from the higher-level concepts to the lower- level specialization of those concepts. Inheritance

Software Engineering Object-Oriented Development Software Development Methods Example 8.1 Draw an object model that identifies all the commonalities between cars and vehicles. Next figure shows that cars and vehicles both have bodies, engines, wheels (maybe not four), headlights, brand names, manufacturer, and cost. Inheritance

Software Engineering Object-Oriented Development Software Development Methods It refers to functions that can deal with different versions or forms of the object or parameter list. In object-oriented software, it often means a function that can deal with the base type or a derived type. In the car vehicle example, the base class will have polymorphic functions for tasks that all vehicles perform but may perform differently, such as turn corners. Each derived class will either use the base class function or provide a version that is suitable for the derived class. Polymorphism

Software Engineering Object-Oriented Development Software Development Methods Example 8.2 Find the functions in the library problem that can be common for all of the items and the functions that will have to be specialized for the derived class. Common – Checkout and check in functions (except maybe for checkout limitations). Specialized – Cataloging functions will differ. Polymorphism

Software Engineering Object-Oriented Development Software Development Methods A college wants a system that handles the courses, sections of courses, and students. Draw an object model and identify the associations between the objects. The college will need to access the students for printing out student information. To print out courses taken by students, there needs to be access from students to sections. To print out the line schedule that prints the sections that are available, there needs to be access to courses and then to sections for each course. Example 8.3

Software Engineering Object-Oriented Development Software Development Methods Example 8.3

Software Engineering Object-Oriented Development Software Development Methods Example 8.4 Use existence dependency to determine the association in the student section problem of last example. The object model developed in last example does not satisfy the existence dependency rules, since section cannot be existence dependent on student or vice versa. Thus, an additional object called enrollment must be used.

Software Engineering Object-Oriented Development Software Development Methods Example 8.4