Vesal Vojdani. Formal Methods (2013) Department of Computer Science University of Tartu. Formal Methods in SW Engineering.

Similar documents
Model-Based Testing. (DIT848 / DAT260) Spring Lecture 10 FSMs, EFSMs and ModelJUnit

Model-Based Testing. (DIT848 / DAT260) Spring Lecture 10 EFSMs and Executable Tests (in ModelJUnit)

Model-Based Testing. (DIT848 / DAT261) Spring Lecture 11 Executable Tests (in ModelJUnit) and EFSMs

Separation of Transitions, Actions, and Exceptions in Model-based Testing

Napa Valley College Cisco Unity Voice Mail User Guide

Script Editor Overview

Introduction to Software Testing Chapter 2, Sec#: 2.5 Graph Coverage for Specifications

Introduction to Software Testing Chapter 2.4 Graph Coverage for Design Elements Paul Ammann & Jeff Offutt

How to Use This Guide

VoIP Telephone Features & Voic Unity Voice Mail Training Manual

Advanced Scripting Techniques

Script Step Reference Information

VOICE PROCESSING. VP 100, 200 and 300 USER GUIDE TOSHIBA VOICE PROCESSING

Observability and Controllability Issues in Conformance Testing of Web Service Compositions

AVAYA VOICE OVER INTERNET PROTOCOL (VOIP) TELEPHONE REFERENCE GUIDE

Phone Works Kingston Ltd.

Auto Attendant Script Example

Towards flexible and efficient model-based testing, utilizing domain-specific modelling

Observability and Controllability Issues in Conformance Testing of Web Service Compositions

Caller dialled digit during recording. Fax routing Config? Yes. Route to Fax Extensions

Programming and Feature Codes

Setting Up Your Personal Voice Mail Outgoing Greetings Page 1 of 5

2) Message Waiting Light the light is located on the upper part of the phone and will turn on every time you have voic .

Designing an Auto Attendant Script

Master of Science in Embedded and Intelligent Systems MASTER THESIS. Generating Test Adapters for ModelJunit. Ardalan Hashemi Aghdam

Input part 3: Implementing Interaction Techniques

Overview Graph Coverage Criteria

Script Editor Overview

How to Use This Guide

Chapter 4 Defining Classes I

Principles of Testing and Analysis. COMP 4004 Fall Notes Adapted from Dr. A. Williams

Graph Coverage for Source Code. Data Flow Graph Coverage for Source Code

Aspire Basic Operation (Quick Reference)

Calling Features. Cisco Unified IP Conference Phone 8831 User Guide for Cisco Unified Communications Manager 9.3 1

ECLASS BLOCK. Description. Extension Controls

Observation-Based Modeling for Testing and Verifying Highly Dependable Systems A Practitioner s Approach

Getting Started with Exchange Unified Messaging

Avaya Unified Messenger Telephone User Interface Online Guide

Fault Management using Passive Testing formobileipv6networks

4J SCHOOL DISTRICT - VOICE MAIL SYSTEM ACTIVATING YOUR VOICE MAILBOX STEP 1

Adding Machine Run 2

Perfect Voice User Guide

Mitel 8528 Digital Handset User Guide

Creating a Phone Survey

Defining Your Own Classes

USER REFERENCE MANUAL

Inter-Tel Axxess Executive Digital Terminal Reference Guide to Frequently Used Features

Xen IPK II DIGITAL VOIC User Guide

Logistics. Final Exam on Friday at 3pm in CHEM 102

CALNET 3: AT&T Voice DNA : Quick reference guide

barge In option 127 bigdecimal variables 16 biginteger variables 16 boolean variables 15 business hours step 100

Finite State Machines

Sprint Digital Voice Models DVP 203 & DVP 403. System Administrator s Guide. Item Number

Introduction to Software Testing Chapter 2, Sections: 2.1 & 2.2 Overview Graph Coverage Criteria

HomePlan features and user guide

Input: Implementing Interaction Techniques as Finite State Machines

Cmpt 135 Assignment 2: Solutions and Marking Rubric Feb 22 nd 2016 Due: Mar 4th 11:59pm

Home Phone Features Quick Start Guide

POTS TOUCH TONE FEATURE GUIDE

How to Use This Guide

AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS

Stacks. Common data structures - useful for organizing data for specific tasks Lists Stacks - an Abstract Data Type

Nortel Networks Integrated Call Director

AT&T. Using the PARTNER MAIL VS. Voice Messaging System Graphics 1988 AT&T

Home Phone Service Guide. Calling features and services Tips and instructions

CallPilot Multimedia Messaging

Intro to Modelling and UML

Registration Details. Overall Summary

INDeX Agent Assist Administration Manual

User guide for All Types of Telephone Sets

Automatic Testing with Formal Methods

Axxess Phone Instructions (NOT ALL PHONES HAVE ALL FEATURES)

Cisco 8811 Dial Plan. Place a Call. Answer a Call. Put a Call on Hold. Feature and Session Buttons. Your Phone

BelZo Mobile. Multi IMSI SIM User Guide I WELCOME TO MULTI IMSI SIM USER GUIDE. Belzo. [Category: Key-Distributor Prospects]

NVM-2. Voice Mail with Automated Attendant. Programming Guide. Part No INS02 Issue 1-0, December 1997 (2412)

Announcements! P1 part 1 due next Tuesday P1 part 2 due next Friday

5220, 5215 and 5201 IP Phones and Voic Rev. 3/04

Voice Messaging Instructions Contents

Voice Mail User s Guide

Automated Test Design with TTCN-3

Polycom SoundPoint IP 320/330

Quick Introduction to SystemVerilog: Sequental Logic

Telephone & Voic Quick Reference Guide

>BellSouth Voice Mail. with Wireline Wireless. Service for Business. Mailbox. 4/7/04 10:07 Page 41

Yealink BASIC PHONE GUIDE T48G POWERED BY XCHANGE TELECOM

6402 Voice Terminal User s manual. DEFINITY G3 - Release 6.3 or later

Welcome Back. CSCI 262 Data Structures. Hello, Let s Review. Hello, Let s Review. How to Review 1/9/ Review. Here s a simple C++ program:

3300 IP Communications Platform

HKN CS 374 Midterm 1 Review. Tim Klem Noah Mathes Mahir Morshed

Automated Information System AIS telephone user guide

CALNET 3: Cisco Hosted Collaboration Solution from AT&T Quick reference guide

Arrival Universal Voice Mail Instructions

VZE-RS-E-6/11 USER GUIDE. Instructions on Using Verizon Calling Features

3300 CITELlink Gateway for 7000 Series Norstar Phones. T7208 Phone User Guide

ECLASS BLOCK. Description. Extension Controls. Caller Input Control

200 Receptionist s Guide

Method. Why Write Methods? Overview. CS256 Computer Science I Kevin Sahr, PhD. Lecture 21: Writing Class Methods. ClassName.methodName(arguments)

Quick Resource for Crexendo Home Office Suite

9620 / 9630 QUICK REFERENCE GUIDE

Specification-based Testing of Embedded Systems H. Schlingloff, SEFM 2008

Transcription:

Department of Computer Science University of Tartu Formal Methods (2013)

The Service Literally: Who then? Reverse telephone directory (Annuaire inversé) offered by France Telecom. It is an automated phone service. Seems no longer active, but similar online services exist in many countries. Our task: create a decent test suite for this system. Case study by Utting & Legeard.

Informal Requirements I The system answers a call with its welcome message: Welcome! Press key. Message is repeated 3 times. Each time with 6 seconds timeout. If is not pressed, system plays the notallow message: Buy a new phone, idiot! It then hangs up. If is pressed, system gives the enter message. Enter a 10 digit number followed by # Repeated 3 times; timeout 20 secs.

Informal Requirements II If no digits followed by # are pressed, system plays the bye message. If a number followed by # is received, then... If the number is special short number (112) an explanation for that number is given press to enter another number! Else if number is not 10 digits: play error message goto enter process Otherwise look up number in database. If number does not exist: play sorry and then goto enter process. If number does exist: goto info menu.

Informal Requirements III The info menu starts with the info message: Press 1 to spell the name, press 2 to hear the address, press for another search. And this is what it does: 1 & 2: respond and return to info menu. : back to the enter process. No keys: repeat info 3 times with 6 sec timeout, then bye-bye. At any time: caller may hang up.

A Finite State Machine A finite state machine with input/output (Mealy Machine): 1. Finite set of states S. 2. Finite set of input symbol I. 3. Finite set of output symbols O. 4. State transitions δ: S I S 5. Output function λ: S I O. We write a transition as follows: s 1 i/o s 2 δ(s 1, i) = s 2 λ(s 1, i) = o

Modelling as an FSM? We want a model to generate test scripts to be followed by a human tester. Input alphabet I represent tester actions. Output set O are expected responses. We care about system logic, not database content... only check a couple of representative phone numbers! What do we abstract away? What are the individual input events?

What we really care about Some special keys: 1, 2, # and. Representative phone numbers: 18 fire brigade short number. num1 05000030000 (unused) num2 01837395826 (a friend) bad 0123456789 (too short). Additional actions: dial dial! wait wait until service times out.

Specific output symbols welcome Welcome! Press key. fire 18 is the fire brigade. Press to start over. sorry The number 05000030000 is not found. Try again! name The number 01837395826 belongs to Carla Bruni. Press 1 to spell the name, 2 to hear... addr The address is Élysée Palace, Paris. Press 1 to spell... spell Bruni is spelled B-R-U-N-I. Press 1 to spell the name...

Example Sequence Our inputs and expected responses: dial/welcome wait/welcome /enter num2/name 2/addr wait/info wait/info wait/bye

The FSM model Now, we draw it... How do we deal with timeouts. (Not so elegant!) Make the output function total:. Is the transition function total?

What do we gain? Have you ever used an automated phone service? Transition are slow. We would like to check each transition. We would like to spend as little time on the phone as possible. Solution: transition tour provided by the Directed Chinese Postman Algorithm. This gives a transition tour with 4 tests and 61 transition in total.

I get following transitions dial/welcome, */enter, wait/enter, bad/error, wait/enter, num1/sorry, wait/enter, 18/fire, */enter, num2/name, wait/info, */enter, wait/enter, num2/name, wait/info, 2/addr, wait/info, 1/spell, wait/info, wait/info, */enter, wait/enter, wait/enter, bad/error, wait/enter, wait/enter, num1/sorry, wait/enter, wait/enter, 18/fire, */enter, wait/enter, wait/enter, num2/name, wait/info, wait/info, 2/addr, wait/info, wait/info, 1/spell, 2/addr, 1/spell, wait/info, wait/info, wait/bye; dial/welcome, wait/welcome, */enter, bad/error, num1/sorry, wait/enter, wait/enter, wait/bye; dial/welcome, wait/welcome, wait/welcome, */enter, num2/name, */enter, 18/fire, wait/bye; dial/welcome, wait/welcome, wait/welcome, wait/notallow.

Extended Finite State Machines Extended FSM has 1. Visible states like the FSM. 2. Internal state variables. Transitions now additionally update state variables and may have guards. Key point is the two-level abstraction: 1. Visible states drive the test generation. 2. Internal state allow more precise modeling of the system. Of course, test coverage metrics w.r.t. visible states only.

ModelJUnit Object getstate(): Returns the current visible state, i.e., the part of EFSM s fields that test generator should see. @Action void m i (): annotated action method, updates state (both internal and visible) and calls SUT methods. boolean m i Guard(): when this returns true m i may be called. Note: test generator observes via getstate() and uses reflection to make a random enabled transition.

EFSM of : State public class QuiDonc implements FsmModel { public enum State { Start, Star, Enter, Emerg, Info }; private State currstate; // visible state private int timeouts; // internal state public String WELCOME = "Welcome..." } public String getstate() { return currstate.tostring(); // + timeouts; } public void reset(boolean testing) { timeouts = 0; currstate = State.Start; }...

EFSM of : Action public class QuiDonc implements FsmModel {... public boolean starguard() { return currstate == State.Star currstate == State.Emerg currstate == State.Info; } public @Action void star() { out.println("*/"+enter); // Normally: Execute SUT! currstate = State.Enter; timeouts = 0; }...

EFSM of : Action public class QuiDonc implements FsmModel {... // no guards; always enabled public @Action void wait_() { // not overriding Object.wait() timeouts++; if (timeouts >= 3) { if (currstate == State.Star) out.println("wait/"+notallow); else out.println("wait/"+bye); currstate = State.Start; timeouts = 0; } else out.println("wait/...(repeat msg)..."); }... }

What s next? Download ModelJUnit and try the simple set examples. Download Thimbley s CPP and try the transition tour.