DAIMIHenrik Bærbak Christensen1 Testability Tactics How to make software testable...

Slides:



Advertisements
Similar presentations
CHAPTER 1 SOFTWARE DEVELOPMENT. 2 Goals of software development Aspects of software quality Development life cycle models Basic concepts of algorithm.
Advertisements

Software Architecture Prof.Dr.ir. F. Gielen
Chapter 7 Other Requirements Good Fast Cheap Pick any two. 1CS John Cole.
Software Fault Injection for Survivability Jeffrey M. Voas & Anup K. Ghosh Presented by Alison Teoh.
ECE 8443 – Pattern Recognition ECE 3163 – Signals and Systems Objectives: Review Resources: Wiki: State Variables YMZ: State Variable Technique Wiki: Controllability.
SWE 4743 Strategy Patterns Richard Gesick. CSE Strategy Pattern the strategy pattern (also known as the policy pattern) is a software design.
Design Creative Process of transferring the problem into a solution
Unit 251 Implementation and Integration Implementation Unit Testing Integration Integration Approaches.
DAIMI(c) Henrik Bærbak Christensen1 BlackBox Testing based on Specification.
DAIMIHenrik Bærbak Christensen1 Testing Terminology.
DAIMIHenrik Bærbak Christensen1 Mandatory Project Part II Software Reliability and Testing.
Chapter 3: System design. System design Creating system components Three primary components – designing data structure and content – create software –
HENRIK BÆRBAK CHRISTENSEN ASSOCIATE PROFESSOR AARHUS UNIVERSITY DEPARTMENT OF COMPUTER SCIENCE 1 Experimental Software Architecture Kandidat orientering.
DAIMIHenrik Bærbak Christensen1 What is Software Quality?
Project Catalogue. DAIMIHenrik Bærbak Christensen2 building stuff Problem: –task X is slow/cumbersome/prone to errors in your organization Hypothesis:
Software Engineering I Object-Oriented Design Software Design Refinement Using Design Patterns Instructor: Dr. Hany H. Ammar Dept. of Computer Science.
DAIMIHenrik Bærbak Christensen1 Mandatory Project Exercise New Requirement.
Façade Design Pattern Source: Design Patterns – Elements of Reusable Object- Oriented Software; Gamma, et. al.
BY RAJESWARI S SOFTWARE TESTING. INTRODUCTION Software testing is the process of testing the software product. Effective software testing will contribute.
Software Development, Programming, Testing & Implementation.
Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved.McGraw-Hill/Irwin.
What is R By: Wase Siddiqui. Introduction R is a programming language which is used for statistical computing and graphics. “R is a language and environment.
Software Quality Assurance Lecture #8 By: Faraz Ahmed.
CS 501: Software Engineering Fall 1999 Lecture 16 Verification and Validation.
Software Design Refinement Using Design Patterns Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
Verification and Validation Overview References: Shach, Object Oriented and Classical Software Engineering Pressman, Software Engineering: a Practitioner’s.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Pump Controller Team Number: May06-12 Team Members Dwayne Stammer CprE Francois Munyakazi EE Dan Paulsen CprE/EE Faculity Advisor Nicola Elia Client Viking.
Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Software Systems.
Systems Development Lifecycle Testing and Documentation.
SE: CHAPTER 7 Writing The Program
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Introduction to Software Development. Systems Life Cycle Analysis  Collect and examine data  Analyze current system and data flow Design  Plan your.
Controls design Controls are “the plan of organization and all the methods and measures to safeguard its assets, check the accuracy and reliability of.
Motivation Thus far we have dealt primarily with the input/output characteristics of linear systems. State variable, or state space, representations describe.
The Software Development Process
Test Stubs... getting the world under control. TDD of State Pattern To implement GammaTown requirements I CS, AUHenrik Bærbak Christensen2.
Problem solving in control of discrete-event systems Lenko Grigorov and Karen Rudie Queen’s University Kingston, Canada.
Stéphane Ducasse 1 Strategy.
Multi Dimensional Variance: How to make ultra flexible software!
Applying the Principles Two Examples. Example 1 New Requirement It would be nice with a simple GUI “to see something” instead of just xUnit tests...
Refactoring and Integration Testing or Strategy, introduced reliably by TDD The power of automated tests.
MiniDraw Introducing a Framework... and a few patterns.
Object and Class Structuring Chapter 9 Part of Analysis Modeling Designing Concurrent, Distributed, and Real-Time Applications with UML Hassan Gomaa (2001)
Software Architecture Quality Attributes. Good or Bad? Measurable criterions required...
CS, AUHenrik Bærbak Christensen1 Compositional Design Principles The “GoF” principles Or Principles of Flexible Design.
Mandatory 3 Test Stubs State Abstract Factory. Stubs, Spies, and Fake Objects One Example Making distribution testable... Henrik Bærbak Christensen2.
Chapter 6 Graphical User Interface (GUI) and Object-Oriented Design (OOD)
Mandatory 3 Test Stubs State Abstract Factory. Do not panic! dSoftArk is about Good analyzable design not about HotCiv! Henrik Bærbak Christensen2.
Strategy in 15 minutes... derived from the principles.
CSHenrik Bærbak Christensen1 Flexibility and Maintainability And their metrics: coupling and cohesion.
QUICK CAMP DESIGNED BY: KENDALL WILLIAMSON DAKOTA ROBERSON SPECIAL THANKS TO: DON WILLIAMSON ELECTROFAB INC. MATTHEW BURKHART SURESH MUKNAHALLIPATNA VOLPI.
Software Architecture in Practice Architectural Prototyping.
Chapter I: Introduction to Computer Science. Computer: is a machine that accepts input data, processes the data and creates output data. This is a specific-purpose.
Identify internal hardware devices (e. g
Operations Machine Simulator.
Design Patterns: MORE Examples
Software Design Refinement Using Design Patterns
Software Architecture in Practice
CS 325: Software Engineering
Software Architecture in Practice
Chapter Nine The Strategy Pattern
System Design.
Software Architecture Quality Attributes
Verification and Validation Overview
Instructor: Dr. Hany H. Ammar
Software testing strategies 2
Control Award This award is given to the Team that demonstrates innovate thinking in the control system to solve game challenges such as autonomous operation,
Testability Software testability refers to the ease with which software can be made to demonstrate its faults through (typically execution-based) testing.
Model, View, Controller design pattern
Presentation transcript:

DAIMIHenrik Bærbak Christensen1 Testability Tactics How to make software testable...

DAIMIHenrik Bærbak Christensen2 Motivation You must test that the move validation algorithm in a backgammon is reliable. –validity = v(board-state, move,player, die) You must test that meteorological reports are properly formatted based upon sensor readings –how do you test fog condition on a clear day? You must test an complex RPG attack algorithm –but it is based upon calculating 8 intermediate results that are encapsulated in the AttackEvent class... You must test a Chess AI –only outputs the “best move” but did it find it the way we expect?

DAIMIHenrik Bærbak Christensen3 Bass et al. Testability –ease with which the software can be made to demonstrate its faults A backgammon that hardcode the random function is not testable A meteorological system that hardcode sensors as data sources is not testable

DAIMIHenrik Bærbak Christensen4 Bass et al. Testability Tactics: –means to enhance testability

DAIMIHenrik Bærbak Christensen5 Tactics TestCase = (input, expected output) Thus managing input/output becomes evidently important. Record/playback –capture events flowing to a UUT for later playback example: Macro recorders for GUI events allow testing graphical user interfaces (resulting output must also be recorded ) –record actual sensor readings from an airport important with realistic data. WarStory: A graph plotting package that I made was tested with range. But it should be used for laser measurements: 1e-8 range. Bang!

DAIMIHenrik Bærbak Christensen6 Tactics Separate interface from implementation –GoF 1st principle: Program to an interface –Make a ‘random’ interface and supply concrete classes (Strategy Pattern) RandomDieStrategy: Use random method JediDieStrategy: Returns a value set by a setValue method –Make a hardware encapsulating interface playback recorded data over that; or again set values

DAIMIHenrik Bærbak Christensen7 Tactics Specialized access routes/interfaces –The problem is to get hold of intermediate results or calculations. –Solution 1: Expose them in public interface  breaks encapsulation, production code clients are tempted to use them –Tactic: Expose them only in sub-interface that is not accessible from ordinary client code

DAIMIHenrik Bærbak Christensen8 Tactics Build-in Monitors –Unit records and stores volatile state information like timings, capacity, security –that can be inspected with special access interfaces –Observer pattern is often great to inject testing code unobtrusively into production code public onConsiderChessMove(Move m);

DAIMIHenrik Bærbak Christensen9 Summary Production code is often not testable be default. Tactics propose some concrete techniques that make production code more testable. Often the design also improves by lowering coupling (“program to an interface”) and introducing variability points (patterns).