Test Oracle Generation Procedures and Executable Specifications 4 th Annual International Software Testing Conference 2004 Authors: Rupak Das and Sita.

Slides:



Advertisements
Similar presentations
Requirements Engineering Processes – 2
Advertisements

Software Requirements
Unit testing in.Net. Copyright 2007 Tikal Knowledge, Ltd. | 2 | Agenda Introduction Visual Studio built-in support Open source frameworks Working together.
Convegno Progetto FIRB LSNO – Capri 19/20 aprile ESOPO: an Environment for Solving Optimization Problems Online M. DApuzzo *, M.L. De Cesare **,
A Logic Specification for Usage Control Xinwen Zhang, Jaehong Park Francesco Parisi-Presicce, Ravi Sandhu George Mason University SACMAT 2004.
Requirements Engineering Process
Distributed Systems Architectures
Chapter 7 System Models.
Requirements Engineering Process
Chapter 1 The Study of Body Function Image PowerPoint
By Rick Clements Software Testing 101 By Rick Clements
The Managing Authority –Keystone of the Control System
Automata Theory Part 1: Introduction & NFA November 2002.
Profiles Construction Eclipse ECESIS Project Construction of Complex UML Profiles UPM ETSI Telecomunicación Ciudad Universitaria s/n Madrid 28040,
Software Engineering COMP 201
Week 2 The Object-Oriented Approach to Requirements
Electric Bus Management System
Configuration management
Software change management
Software engineering and standardisation section (TEC-EME) 1 Automatic test case generation from a formal model LTG technology evaluation based on a B.
Effective Test Planning: Scope, Estimates, and Schedule Presented By: Shaun Bradshaw
OOAD – Dr. A. Alghamdi Mastering Object-Oriented Analysis and Design with UML Module 3: Requirements Overview Module 3 - Requirements Overview.
Software testing.
Testing Workflow Purpose
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 31 Slide 1 Service-centric Software Engineering.
ITEC200 Week04 Lists and the Collection Interface.
By Waqas Over the many years the people have studied software-development approaches to figure out which approaches are quickest, cheapest, most.
VOORBLAD.
Component-Based Software Engineering Main issues: assemble systems out of (reusable) components compatibility of components.
IONA Technologies Position Paper Constraints and Capabilities for Web Services
Software Requirements
Promoting Regulatory Excellence Self Assessment & Physiotherapy: the Ontario Model Jan Robinson, Registrar & CEO, College of Physiotherapists of Ontario.
© 2012 National Heart Foundation of Australia. Slide 2.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 1 Software processes 2.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 27 Slide 1 Quality Management.
Lecture 8: Testing, Verification and Validation
Chapter 10 Software Testing
Executional Architecture
Implementation Architecture
Global Analysis and Distributed Systems Software Architecture Lecture # 5-6.
CS 240 Computer Programming 1
25 seconds left…...
Copyright 2001 Advanced Strategies, Inc. 1 Data Bridging An Overview Prepared for DIGIT By Advanced Strategies, Inc.
Chapter 2 Entity-Relationship Data Modeling: Tools and Techniques
Copyright © 2003 by Prentice Hall Computers: Tools for an Information Age Chapter 15 Programming and Languages: Telling the Computer What to Do.
Chapter 10: The Traditional Approach to Design
Systems Analysis and Design in a Changing World, Fifth Edition
Chapter 9 Interactive Multimedia Authoring with Flash Introduction to Programming 1.
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
Database Administration
Chapter 11 Describing Process Specifications and Structured Decisions
Chapter 13 The Data Warehouse
14-1 © Prentice Hall, 2004 Chapter 14: OOSAD Implementation and Operation (Adapted) Object-Oriented Systems Analysis and Design Joey F. George, Dinesh.
Modeling Main issues: What do we want to build How do we write this down.
From Model-based to Model-driven Design of User Interfaces.
Chapter 8 Improving the User Interface
1 Programming Languages (CS 550) Mini Language Interpreter Jeremy R. Johnson.
1 VISWAS and On Diagnosability with IEEE P1522 and UML2.0 Testing Profile Dr Sita Ramakrishnan School Computer Science & Software Engineering Monash University,
Describing Syntax and Semantics
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Principle of Functional Verification Chapter 1~3 Presenter : Fu-Ching Yang.
Dr. Tom WayCSC Testing and Test-Driven Development CSC 4700 Software Engineering Based on Sommerville slides.
FDT Foil no 1 On Methodology from Domain to System Descriptions by Rolv Bræk NTNU Workshop on Philosophy and Applicablitiy of Formal Languages Geneve 15.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Principles of Programming & Software Engineering
Testing and Test-Driven Development CSC 4700 Software Engineering
Presentation transcript:

Test Oracle Generation Procedures and Executable Specifications 4 th Annual International Software Testing Conference 2004 Authors: Rupak Das and Sita Ramakrishnan Presented by: Dr Sita Ramakrishnan

4th International Software Testing Conference Pune, India Feb Overview Oracle – an example A Generic Test Environment Test Oracles and their Importance Problems Assertion-based Implementation Oracles Specification Oracles Real Specification Languages Testability and Diagnosability with industry standards AsmL Oracles and the Future Conclusions

4th International Software Testing Conference Pune, India Feb Oracle – an example The Oracle in Matrix Is a program Predicts choices and outcomes based on input from the Zion mainframe Test Oracles … The Oracle offers Candy to Neo, the following dialogue ensues … Neo: D'you already know if I'm going to take it? The Oracle: Wouldn't be much of an Oracle if I didn't.

4th International Software Testing Conference Pune, India Feb A Generic Test Environment

4th International Software Testing Conference Pune, India Feb A Generic Test Environment 3 main aspects to the test environment: 1.The test model, which is the application model is augmented to include testing requirements - By adding application specific constraints to the component interface protocol 2.The test model (state model) is fed to the test design software

4th International Software Testing Conference Pune, India Feb A Generic Test Environment This software tool uses the critical properties of testing requirements built in the test model to generate automated test sequences 3. The test execution phase is the diagnosis phase. Accepts test inputs from SUT, and test is evaluated as pass or fail.

4th International Software Testing Conference Pune, India Feb Testing Environment in VISWAS oOur Testing Environment in VISWAS supports such an automated process oIncludes the Test Sequence Generation phase and the System under Test

4th International Software Testing Conference Pune, India Feb Testing Environment in VISWAS oDiagnosability was not the focus of concern in VISWAS, and test execution phase of test environment was not automated in VISWAS oNext we look at Test Execution phase and Test Oracle Generation Procedures

4th International Software Testing Conference Pune, India Feb Test Oracles – What are they? A method to establish that the system under test has produced expected outputs corresponding to given test inputs. All testing techniques assume the existence of an oracle, be it a human `eyeball oracle, or a software oracle with valid input/output pairs. Valid input/output pairs (automatically) generated from specifications helps to verify `intended behaviour of the system.

4th International Software Testing Conference Pune, India Feb Active and Passive Oracles Active Oracles mimic the behaviour of the software under test mainly built for accuracy rather than efficiency Passive Oracles Verifies software behaviour without replicating it

4th International Software Testing Conference Pune, India Feb The Problems Reliable test set problem Whole input domain needs to be taken into account Otherwise it becomes impossible to create a reliable exhaustive test set Oracle problem Grey areas between intended behaviour, expected behaviour and actual behaviour Some opine that `truly general oracles may not be achieved

4th International Software Testing Conference Pune, India Feb Assertion-based Implementation Oracles Assertions are ways to specify what a system is supposed to do, and not how it is to do it Embedded assertions in source code can be used to create implementation oracles Not a dedicated specification mechanism Pre-processing of code is often required

4th International Software Testing Conference Pune, India Feb Assertion-based Implementation Oracles … Assertions AsmL specification of a stack interface

4th International Software Testing Conference Pune, India Feb Assertion-based Implementation Oracles … Anna (ANNotated Ada) APP (Annotation Pre-Processor) for C Nana (Assertion library for C/C++) Eiffel Built in assertion support Integrated with exception-handling Java Multitude of assertion systems iContract, JaWa, Handshake, JMSAssert, jContractor and JUnit

4th International Software Testing Conference Pune, India Feb Assertion-based Implementation Oracles Dependency on control points Assertions are treated as program statements with pre-defined execution points Caching of values Pre- and Post-Condition pairs relate the program states before and after method execution Expensive for complex/large data structures Existential and Universal Quantification Translating input to reflect quantification in terms of `loops of execution can be cumbersome

4th International Software Testing Conference Pune, India Feb Specification Oracles Translating a specification into an oracle irrespective of implementation Oracles can be generated automatically from specifications or documentation Can extract relevant input/output pairs of test data from specification to check intended behaviour

4th International Software Testing Conference Pune, India Feb Specification Oracles … Program Testing Assistant Defines test cases interactively Uses layer correspondences to generate test cases automatically from a library of templates Test cases execute when appropriate Success criteria defined by specifier Requires at least one successful execution to generate valid test data sets Chapman 1982, A Programmers Testing Assistant

4th International Software Testing Conference Pune, India Feb Specification Oracles … Test Oracle Generator (TOG) Automatically generates test oracles from a relational specification that uses tabular expressions Test harness (oracle) takes input/output pair from Program Under Test (PUT) Relation is evaluated Returns true/false Peters and Parnas 1994, Test Oracle Generator

4th International Software Testing Conference Pune, India Feb Specification Oracles … Documentation components required by TOG Program Specification Auxiliary Predicates and Functions User Definitions A relational specification is created If result of TOG execution is present in the relational specification table, oracle procedure execution is successful

4th International Software Testing Conference Pune, India Feb Specification Oracles TOG oracles are only as good as the specification Access to data structures required to evaluate expressions and predicates Complexity of test harness reduces readability of the oracle Developed further by Software Engineering Research Group at McMaster University, Ontario

4th International Software Testing Conference Pune, India Feb Real Specification Languages Actual specifications are translated to oracles for validation and verification Generate test oracles from specifications that are executable in their own right B, Z, AsmL (Abstract State Machine Language) Deriving test oracles require an ``executable subset of the original specification

4th International Software Testing Conference Pune, India Feb Real Specification Languages Automatic Test Result Evaluation approach – translates Z schema to an evaluation function Test Template Framework derives ``oracle templates from model based specification written in Z Multiple oracles from multi-language specifications composed as a unit

4th International Software Testing Conference Pune, India Feb Testability and Diagnosability with industry standards oDiagnostic components constructed according to standards facilitate competition in the market place in terms of risks, cost and quality oStandards imply a maturity in the underlying technology, thus adding to the level of confidence. TTCN-3 is the only standardised language for the specification & implementation of test cases.

4th International Software Testing Conference Pune, India Feb Testability and Diagnosability with industry standards oUML is a widely used industry standard for software component modelling. oGraphical format for TTCN-3 (GFT) is based on Message Sequence Charts (MSCs) and UML. oGFT extends TTCN-3 with test specific concepts such as verdicts & defaults. oGFT is the basis for the definition of UML 2.0 test profile.

4th International Software Testing Conference Pune, India Feb Testability and Diagnosability with industry standards oUML 2.0 Test Profile (UTP) has the notion of an arbiter, which is a test component aimed at separating test behaviour from test evaluation oEvaluates test results and assigns verdicts of a test case o A verdict is the outcome of a test case being pass, fail, inconc or error as defined in TTCN-3

4th International Software Testing Conference Pune, India Feb Testability and Diagnosability with industry standards oA Test case may have 4 outcomes: oPass, Fail, inconclusive or abort oDuring the execution of a test case, a test trace is generated and stored in a test log oUML 2.0 Test Profile, GFT, !TeLa! have similar diagnostic features

4th International Software Testing Conference Pune, India Feb AsmL Oracles Abstract State Machine approach has been proven suitable for large-scale executable specifications AsmL is a high-level language that implements the ASM paradigm AsmL specifications can be simulated Microsoft Research - Foundations of Software Engineering Group

4th International Software Testing Conference Pune, India Feb AsmL Oracles … Specification is a non-deterministic ASM program written in AsmL that has a fixed initial state Individual finite states are grouped together to form `hyperstates Results in a finite automaton – used to generate test suite Extraction of an FSM from an ASM specification by extracting algorithm

4th International Software Testing Conference Pune, India Feb … and the future Non-deterministic finite state machines cannot be generated from ASMs by using the extraction algorithm Combination of the Test Template Framework and Automatic Test Result Evaluation approach for Z specifications could be used AsmL as a specification and implementation language can be used to generate exhaustive executable oracles AsmL oracles can be translated to oracles for other.NET aware languages

4th International Software Testing Conference Pune, India Feb Conclusions Producing a comprehensive, precise and understandable specification is difficult enough Adding computability to specifications to generate oracles makes it even more harder Intrinsic dependence of testing on oracles make them essential Pros and Cons exist for all approaches Any of the existing approaches is better and less expensive compared to a human oracle More research and development of automated oracle generation tools will make the V & V process much easier and productive

4th International Software Testing Conference Pune, India Feb Contact Details Authors: Rupak Das and Sita Ramakrishnan Presenter: Dr Sita Ramakrishnan School Computer Science & Software Engineering Monash University Australia ph: fax: