Informatics 43 – May 7, 2015. Restatement of Goals for Testing Want to verify software’s correctness  Need to test  Need to decide on test cases  No.

Slides:



Advertisements
Similar presentations
Annoucements  Next labs 9 and 10 are paired for everyone. So don’t miss the lab.  There is a review session for the quiz on Monday, November 4, at 8:00.
Advertisements

10 Software Engineering Foundations of Computer Science ã Cengage Learning.
Requirements and Design
Chapter 12 ATM Case Study, Part 1: Object-Oriented Design with the UML
Object-Oriented Analysis and Design
Department of Informatics, UC Irvine SDCL Collaboration Laboratory Software Design and sdcl.ics.uci.edu 1 Informatics 43 Introduction to Software Engineering.
Informatics 43 – May 12, Restatement of Goals for Testing Want to verify software’s correctness  Need to test  Need to decide on test cases 
Use-case Modeling.
Informatics 43 – May 5, Restatement of goals Want to verify software’s correctness  Need to test  Need to decide on test cases  No set of test.
Informatics 43 – April 30, What is a test case? An input to a system, and the correct output. An “input” may be complex. Example: – What is an input.
Systems Analysis and Design in a Changing World, Fourth Edition
Chapter 14 Requirements and Specifications. Copyright © 2005 Pearson Addison-Wesley. All rights reserved Software Engineering The implementation.
The Unified Software Development Process - Workflows Ivar Jacobson, Grady Booch, James Rumbaugh Addison Wesley, 1999.
The Architecture Design Process
Automating Tasks With Macros. 2 Design a switchboard and dialog box for a graphical user interface Database developers interact directly with Access.
Component and Deployment Diagrams
Topic 13Summer ICS 52: Introduction to Software Engineering Lecture Notes for Summer Quarter, 2003 Michele Rousseau Topic 13 Partially based on.
1/31 CS 426 Senior Projects Chapter 1: What is UML? Chapter 2: What is UP? [Arlow and Neustadt, 2005] January 22, 2009.
Programming With Java ICS201 University Of Hail1 Chapter 12 UML and Patterns.
1 Software, Programmings. 2 Types of Software Figure 9.1 Shakeel Ahmad.
1 Case Study: Starting the Student Registration System Chapter 3.
The Software Product Life Cycle. Views of the Software Product Life Cycle  Management  Software engineering  Engineering design  Architectural design.
*Object-Oriented Design (Schach Chap 14)
What is Software Architecture?
Systems Analysis – Analyzing Requirements.  Analyzing requirement stage identifies user information needs and new systems requirements  IS dev team.
Lesson 7 Guide for Software Design Description (SDD)
12-CRS-0106 REVISED 8 FEB 2013 CSG2H3 Object Oriented Programming.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 1 Slide 1 Message Analysis Table.
CS 360 Lecture 6.  A model is a simplification of reality  We build models to better understand the system being developed.  We build models of complex.
Introduction to Formal Methods Based on Jeannette M. Wing. A Specifier's Introduction to Formal Methods. IEEE Computer, 23(9):8-24, September,
Programming in Java Unit 3. Learning outcome:  LO2:Be able to design Java solutions  LO3:Be able to implement Java solutions Assessment criteria: 
Object Management Group (OMG) Specifies open standards for every aspect of distributed computing Multiplatform Model Driven Architecture (MDA)
DOMAIN MODEL CLASS DIAGRAM Prepared by: Fatimah Alakeel November, 2011.
Systems Analysis and Design in a Changing World, 3rd Edition
1 Introduction to Software Engineering Lecture 1.
Software Engineering Prof. Ing. Ivo Vondrak, CSc. Dept. of Computer Science Technical University of Ostrava
Department of Informatics, UC Irvine SDCL Collaboration Laboratory Software Design and sdcl.ics.uci.edu 1 Informatics 43 Introduction to Software Engineering.
1 Advanced Software Architecture Muhammad Bilal Bashir PhD Scholar (Computer Science) Mohammad Ali Jinnah University.
Modeling system requirements. Purpose of Models Models help an analyst clarify and refine a design. Models help simplify the complexity of information.
A Use Case Primer 1. The Benefits of Use Cases  Compared to traditional methods, use cases are easy to write and to read.  Use cases force the developers.
Software Design Software Design (UML) Static Modeling using the Unified Modeling Language (UML) Material based on [Booch99, Rambaugh99, Jacobson99, Fowler97,
Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.
Course Instructor: Kashif Ihsan 1. Chapter # 3 2.
Class Diagram. Classes Software Design (UML) Class Name attributes operations A class is a description of a set of objects that share the same attributes,
Unified Modeling Language. Object Oriented Methods ► What are object-oriented (OO) methods?  OO methods provide a set of techniques for analyzing, decomposing,
Lab 5 CPIT 250 System Analysis and Design.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Lecture 9-1 : Intro. to UML (Unified Modeling Language)
Architecture View Models A model is a complete, simplified description of a system from a particular perspective or viewpoint. There is no single view.
Class Diagram Chapter 21 Applying UML and Patterns Craig Larman.
Week 04 Object Oriented Analysis and Designing. What is a model? A model is quicker and easier to build A model can be used in simulations, to learn more.
Lecture 14 22/10/15. The Object-Oriented Analysis and Design  Process of progressively developing representation of a system component (or object) through.
Chapter 3: Introducing the UML
21/1/ Analysis - Model of real-world situation - What ? System Design - Overall architecture (sub-systems) Object Design - Refinement of Design.
Class Diagram Lecture # 1. Class diagram A Class Diagram is a diagram describing the structure of a system shows the system's classes Attributes operations.
CSCI 383 Object-Oriented Programming & Design Lecture 7 Martin van Bommel.
Kyung Hee University Class Diagramming Notation OOSD 담당조교 석사과정 이정환.
25/2/16. Software Design (UML) ClassName attributes operations A class is a description of a set of objects that share the same attributes, Operations.
Introduction to UML and Rational Rose UML - Unified Modeling Language Rational Rose 98 - a GUI tool to systematically develop software through the following.
Informatics 43 – May 3, Restatement of goals Want to verify software’s correctness  Need to test  Need to decide on test cases  No set of test.
Informatics 43 – May 5, Restatement of Goals for Testing Want to verify software’s correctness  Need to test  Need to decide on test cases  No.
1 M206 Chapter 31: An Overview of Software Development 1.Defining the problem 2.Analyzing the requirement – constructing initial structural model 3.Analyzing.
Lec-4 : Unified Modeling Language (UML)
Informatics 43 – May 10, 2016.
Object-Oriented Analysis and Design
Unified Modeling Language
Informatics 43 – May 3, 2016.
Informatics 43 – April 28, 2016.
CIS 375 Bruce R. Maxim UM-Dearborn
Static Modeling using the Unified Modeling Language (UML)
Presentation transcript:

Informatics 43 – May 7, 2015

Restatement of Goals for Testing Want to verify software’s correctness  Need to test  Need to decide on test cases  No set of test cases is sufficient What is a systematic approach to the selection of test cases that will lead to accurate, thorough, repeatable identification of bugs?

The Testing Process Model 1.Decide what to test. 2.Select a test case input. 3.Determine the expected output E. 4.Run the system with the test case input. 5.Capture the actual output A. 6.Compare E and A. Different? Inform programmer. 7.Loop back to 1 or 2, if time permits.

Back to Black box test case selection Equivalence Class Partitioning – a systematic approach. 1.Identify the set of all possible inputs (to what is being tested). 2.Identify a basis for subdividing the set of inputs. size, order, structure correctness stated requirements your smarts 3.Use this basis for dividing the set of all possible inputs into subsets (domain into subdomains). 4.From each subset/subdomain, select a representative.

Basis _______________________ Input (Specific values) Expected Output Notes from execution Testing Matrix Equivalence Class Partitions

Quiz Average - Basis Length of list Input (Specific values) Expected Output Notes from execution Testing Matrix Equivalence Class Partitions 0 [] [87.3] – 4 [90, 95, 85] and up [80, 81, 82, 83, 84, 85, 86, 87, , 89, 90, 91]

Quiz Average - Basis Position of minimum value Input (Specific values) Expected Output Notes from execution Testing Matrix Equivalence Class Partitions First element [80, 87, 88, 89] 88.0 Middle element [87, 88, 80, 89] 88.0 [99, 98, 0, 97, 96] 97.5 Last element [87, 88, 89, 80] 88.0

Security Dialog Example

Basis Security Dialog #1 – choice of button Input (Specific values) Expected Output Notes from execution Testing Matrix Equivalence Partitions Ok Button Press OK see Security Dialog #2 Cancel button Enter ID “R09”, press Cancel Text boxes are cleared, dialog remains Don’t enter ID, press Cancel Same. X button Enter ID “R09”, press X Text boxes are cleared, dialog remains

Basis Security Dialog #2 – OK button pressed, validity of input Input (Specific values) Expected Output Notes from execution Testing Matrix Equivalence Partitions Valid ID, TEST1, Proceed to Matching PW Main screen Valid ID, TEST1, Audible beep, Wrong PW dialog remains. Invalid ID, TES1, Same

The Testing Process Model 1.Decide what to test. 2.Select a test case input. 3.Determine the expected output E. 4.Run the system with the test case input. 5.Capture the actual output A. 6.Compare E and A. Different? Inform programmer. 7.Loop back to 1 or 2, if time permits. Where does this come from?

Testing Oracles Where does a test case’s “expected output” come from? A “testing oracle” is a mechanism for deciding whether a test case execution succeeded or failed. Critical to testing. Difficult to create systematically – typically done with guesswork. Can be automated with formal specifications.

Testing Oracle Example The cosine function. You test input = 0.5, the actual output is What’s your oracle?

Oracles from Formal Specifications Formal specification of QuizAverage QuizAverage(list)  (sumof(list) – min(list)) / (sizeof(list) – 1) Formal specifications can be interpreted to compute or evaluate results.

The Design Phase of Software Development Something usually needs to be done after the user’s requirements are specified and before coding starts, especially on larger tasks. 1.Modularize the task so that multiple people can work on it. Define modules and their interfaces. 2.Make system-wide decisions. Architecture, languages, libraries, platforms. 3.Develop the specifications in more detail. More “how”; consideration of trade-offs.

Software Development Languages Requirements Design Coding Testing English Java, Python testing matrix Different languages are used at different stages:

Software Development Languages Requirements Design Coding Testing Different languages are used at different stages: Languages have two purposes: 1.To communicate with other people. 2.To clarify one’s own thinking and ideas. English Java, Python testing matrix

Deep thoughts about diagrams It’s important to think of a diagram as being a statement in a language that has a syntax. A diagram is not a picture. A diagram has to be interpreted. A B

What might this mean? A B A happens before B.

Unified Modeling Language (UML) A set of a dozen or so visual languages for expressing various aspects of software development.

UML Class Diagram

UML Use Case Diagram

UML Sequence Diagram

UML Activity Diagram

The UML Class Diagram helps in the decomposition of a system into sub-modules known as classes. Some “object oriented” programming languages have “class” as part of the language’s syntax and design, but UML Class Diagrams can be created and used without reference to programming language classes. Some following slides from

Software Design (UML) Classes ClassName attributes operations A class is a description of a set of objects that share the same attributes, operations, relationships, and semantics. Graphically, a class is rendered as a rectangle, usually including its name, attributes, and operations in separate, designated compartments.

Software Design (UML) Class Names ClassName attributes operations The name of the class is the only required tag in the graphical representation of a class. It always appears in the top-most compartment.

Software Design (UML) Class Attributes Person name : String address : Address birthdate : Date ssn : Id An attribute is a named property of a class that describes the object being modeled. In the class diagram, attributes appear in the second compartment just below the name-compartment.

Software Design (UML) Class Attributes (Cont’d) Person name : String address : Address birthdate : Date ssn : Id Attributes are usually listed in the form: attributeName : Type

Software Design (UML) Class Operations Person name : String address : Address birthdate : Date ssn : Id eat sleep work play Operations describe the class behavior and appear in the third compartment.

Software Design (UML) Depicting Classes Person name : String birthdate : Date ssn : Id eat() sleep() work() play() When drawing a class, you needn’t show attributes and operations in every diagram. Person name address birthdate Person eat play Person

Software Design (UML) Association Relationships If two classes in a model need to communicate with each other, there must be link between them. An association line denotes that link. Instructor Student

Software Design (UML) Association Relationships (Cont’d) We can constrain the association relationship by defining the navigability of the association. Here, a Router object requests services from a DNS object by sending messages to (invoking the operations of) the server. The direction of the association arrow indicates that the server has no knowledge of the Router. Router DomainNameServer