UniTesK: Model Based Testing in Industrial Practice Victor Kuliamin Alexander Petrenko Alexander Kossatchev Igor Burdonov Institute for System Programming.

Slides:



Advertisements
Similar presentations
Creation of Automaton Classes from Graphical Models and Automatic Solution for Inverse Problem Yuri A. Gubin student of SPb SU ITMO supervised by Anatoly.
Advertisements

Abstraction and Modular Reasoning for the Verification of Software Corina Pasareanu NASA Ames Research Center.
Model Based Testing in Linux Standard Base Compliance Program A.V.Khoroshilov, A.K.Petrenko { khoroshilov, petrenko ispras.ru MBT Users Conference.
Multi-Paradigm Models as Source for Automatic Test Construction Victor Kuliamin ISP RAS, Moscow.
Theory and Practice of Co-verification Process: UniTesK Story RedVerst group of ISP RAS Alexander K. Petrenko Victor V. Kuliamin
Alternate Software Development Methodologies
ISBN Chapter 3 Describing Syntax and Semantics.
How Can Simple Model Test Complex System Model Based Testing of Large-Scale Software Victor Kuliamin ISP RAS, Moscow.
Testing AJAX functionality with UniTESK Yevgeny Gerlits, a postgraduate student from Lomonosov Moscow State University SYRCoSE 2010.
Copyright © 2006 Software Quality Research Laboratory DANSE Software Quality Assurance Tom Swain Software Quality Research Laboratory University of Tennessee.
Software Testing and Quality Assurance
CS5371 Theory of Computation Lecture 6: Automata Theory IV (Regular Expression = NFA = DFA)
Describing Syntax and Semantics
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Copyright © 2006 by The McGraw-Hill Companies,
1 Scenario-based Analysis of UML Design Class Models Lijun Yu October 4th, 2010 Oslo, Norway.
Introduction to Software Testing
Formal Methods in Industrial Software Standards Enforcement A. Grinevich, A. Khoroshilov V. Kuliamin, D. Markovtsev A. Petrenko, V. Rubanov ISP RAS, Moscow,
Software Testing Sudipto Ghosh CS 406 Fall 99 November 9, 1999.
Formal Methods 1. Software Engineering and Formal Methods  Every software engineering methodology is based on a recommended development process  proceeding.
TEST SUITE DEVELOPMENT FOR CONFORMANCE TESTING OF PROTOCOLS Anastasia Tugaenko Scientific Adviser: Nikolay Pakulin, PhD Institute for System Programming.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 6 Slide 1 Requirements Engineering Processes l Processes used to discover, analyse and.
What is a life cycle model? Framework under which a software product is going to be developed. – Defines the phases that the product under development.
Contract Specification of Pipelined Designs Alexander Kamkin Institute for System Programming of RAS
Theory and Practice of Co-verification Process: UniTesK Story RedVerst group of ISP RAS Alexander K. Petrenko
Automated Generation of Test Suites from Formal Specifications Alexander K.Petrenko Institute for System Programming of Russian Academy of Sciences (ISP.
Intel Academic Forum. Budapest, September, 2002 ISPRAS Experience in Model Based Testing Alexander K. Petrenko, Institute for System Programming.
Software Verification Academician V.P.Ivannikov, Director of ISPRAS Moscow, November 2008.
Development and Application of Logical Actors Mathematical Apparatus for Logic Programming of Web Agents Alexei A. Morozov PhD, Senior Researcher Institute.
Theory and Practice of Co-verification Process: UniTesK Story RedVerst group of ISP RAS Alexander K. Petrenko
111 Protocols CS 4311 Wirfs Brock et al., Designing Object-Oriented Software, Prentice Hall, (Chapter 8) Meyer, B., Applying design by contract,
Systems Analysis and Design in a Changing World, 3rd Edition
CS 363 Comparative Programming Languages Semantics.
Fundamental Programming: Fundamental Programming K.Chinnasarn, Ph.D.
Unit Testing 101 Black Box v. White Box. Definition of V&V Verification - is the product correct Validation - is it the correct product.
Applying Model Based Testing in Different Contexts Alexander Petrenko Victor Kuliamin ISP RAS, Moscow.
1 Application of UniTESK Technology for Functional Testing of Infrastructural Grid Software Sergey Smolov, Institute for System Programming, RAS
Chapter 3 Part II Describing Syntax and Semantics.
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.
Using Cycle-Accurate Contract Specifications for Testing Hardware Models Alexander Kamkin Institute for System Programming of RAS
Time Abstraction in Simulation-Based Hardware Verification Alexander Kamkin Institute for System Programming of the Russian Academy of.
ISP RAS Java Specification Extension for Automated Test Development Igor B. Bourdonov, Alexei V. Demakov, Andrei A. Jarov, Alexander S. Kossatchev, Victor.
 Programming - the process of creating computer programs.
UniTesK Test Suite Architecture Igor Bourdonov Alexander Kossatchev Victor Kuliamin Alexander Petrenko.
SASI Enforcement of Security Policies : A Retrospective* PSLab 오민경.
1 The Software Development Process ► Systems analysis ► Systems design ► Implementation ► Testing ► Documentation ► Evaluation ► Maintenance.
Andrey Karaulov, Alexander Strabykin Institute for System Programming Russian Academy of Sciences SYRCoSE: Spring Young Researchers Colloquium on Software.
/ PSWLAB Evidence-Based Analysis and Inferring Preconditions for Bug Detection By D. Brand, M. Buss, V. C. Sreedhar published in ICSM 2007.
UniTesK Test Suite Architecture Igor Bourdonov Alexander Kossatchev Victor Kuliamin Alexander Petrenko.
Whole Test Suite Generation. Abstract Not all bugs lead to program crashes, and not always is there a formal specification to check the correctness of.
Parallelizing Functional Tests for Computer Systems Using Distributed Graph Exploration Alexey Demakov, Alexander Kamkin, and Alexander Sortov
Saint-Petersburg State University ITMO Automata-based Algorithms Visualization Framework Georgiy Korneev Computer Technology Department,
Study 1 Purpose of the tool. Test architecture.. Testing Target system Test system Testing results results affecting.
Simulation-Based Verification of Microprocessor Units Based on Cycle-Accurate Contract Specifications Mikhail Chupilko, Alexander Kamkin, and Dmitry Vorobyev.
Study 1 Purpose of the tool. Test architecture.. Testing Target system Test system Testing results results affecting.
Finding bugs with a constraint solver daniel jackson. mandana vaziri mit laboratory for computer science issta 2000.
1 Igor Burdonov Alexander Kossatchev Building direct and back spanning trees by automata on a graph The Institute for System Programming (ISP) of the Russian.
ASSEMBLY AND DISASSEMBLY: AN OVERVIEW AND FRAMEWORK FOR COOPERATION REQUIREMENT PLANNING WITH CONFLICT RESOLUTION in Journal of Intelligent and Robotic.
CPSC 372 John D. McGregor Module 8 Session 1 Testing.
From requirements to specification Specification is a refinement of requirements Can be included together as Software Requirements Specifications (SRS)
Working with Java.
John D. McGregor Session 9 Testing Vocabulary
Introduction to Visual Basic 2008 Programming
Introduction to JUnit CS 4501 / 6501 Software Testing
Arab Open University 2nd Semester, M301 Unit 5
Mikhail Chupilko, Alexander Protsenko
John D. McGregor Session 9 Testing Vocabulary
John D. McGregor Session 9 Testing Vocabulary
Introduction to Software Testing
Ada – 1983 History’s largest design effort
V. Kuliamin, A. Petrenko, N.!Pakoulin, I.!Bourdonov, A.!Kossatchev
Presentation transcript:

UniTesK: Model Based Testing in Industrial Practice Victor Kuliamin Alexander Petrenko Alexander Kossatchev Igor Burdonov Institute for System Programming Moscow, Russia

Outline Origin of UniTesK Method UniTesK Manifesto UniTesK Solutions Case Studies

Origin of UniTesK Method 1994 – 1996 ISP RAS – Nortel Networks project on functional test suite development for Switch Operating System kernel  Few hundreds of bugs found in the OS kernel, which had been in use for 10 years KVEST technology About 600K lines of Nortel code tested by 2000 BUT: Failed to be introduced in Nortel processes

UniTesK Test Construction System under Test Behavior Model Testing Model Coverage Model Test Input Behavior Correctness Checking

Specification Development Test Development Process Test Quality Criteria Requirements Interface Definition Scenario Development System under Test Mediator Development Test Execution Behavior Specifications Test Scenarios Mediators Test Reports Design Test Results Analysis

Engineering Problems How to simplify transformation of requirements into formal specifications? How to minimize human involvement in test development, but make it possible in necessary points? How to support a large variety of problem domains and test completeness criteria? How to decouple tests and implementation, but keep them working together? How to measure testing quality without implementation? To make easier their usage for ordinary software engineers To make relation between them more clear To increase productivity, but not to loose flexibility To make possible early start of test development To make specifications and tests more reusable

UniTesK Manifesto Maximum simplification of MBT techniques Automation where possible Accommodation to current industrial practice Integration with widely used tools Integration with widely used languages

Tools CTesK

UniTesK Test Architecture Oracle Test action construction System under Test Test Engine Test Action Iterator Specification  ✕ Mediator Test Scenario

Example Client Data Management System: A number of clients Clients can be related as parent-subsidiary  Client can have only one parent, but may have several subsidiaries  No cycles along parent-subsidiary links  When parent is removed, all its subsidiaries should be removed

Example : Interface class ClientManager { Client addClient ( String name ); boolean removeClient ( Client client ); } class Client { boolean addSubsidiary ( Client client ); }

Example : Client Data class Client { String name; ClientSpecification parent = null; HashSet children = new HashSet(); invariant ParentChildLink() { if(parent != null && !parent.children.contains(this)) return false; Iterator j = children.iterator(); while(j.hasNext()) if(((Client)j.next()).parent != this) return false; return true; } invariant NoCyclesAlongLinks() { Client r = this; do { r = r.parent; if(r == this) return false; } while(r != null); return true; }

Example : addClient() Method class ClientManager { specification Client addClient ( String name ) updates clients.? { post { if(name == null || clients.containsKey(name)) { // Client cannot be created return addClient == null && } else { // Client can be created HashMap oldClients = (HashMap)clients.clone(); oldClients.remove(name); return addClient != null && addClient.name.equals(name) && addClient.parent == null && addClient.children.isEmpty() && clients.get(name) == addClient && }

Test Coverage Criteria branch “Single branch” return post { } if(a || b) branches“Single branch” predicates( a || b )!( a || b ) disjunctsa!a && b!a && !b branch “Single branch” branches “Single branch” disjuncts a!a && !b predicates ( a || b ) !( a || b ) !a && b if( a || b)

class ClientManager { specification Client addClient ( String name ) updates clients.? { post { if(name == null || clients.containsKey(name)) { branch "Client cannot be created"; return addClient == null && } else { branch "Client can be created"; HashMap oldClients = (HashMap)clients.clone(); oldClients.remove(name); return addClient != null && addClient.name.equals(name) && addClient.parent == null && addClient.children.isEmpty() && clients.get(name) == addClient && } Example : addClient() Method

Automaton from Coverage Goals states parametersoperation domain coverage goals

Implicit Automata Description Implicit specifications cannot be resolved To decrease effort they should not be resolved Huge automata can be described shortly

Test Scenarios User can describe an automaton implicitly in the form of Test Scenario Functions: Provide the current state identifier Provide the next admissible stimulus in this state

Test Scenario : State scenario class ClientManagerTestScenario { ClientManager target; AbstractGenState getGenState() { IntToIntMapGenState genstate = new IntToIntMapGenState(); int n = 0, m = 0; Iterator j = objectUnderTest.clients.keySet().iterator(); while(j.hasNext()) { String s = (String)j.next(); n = Integer.parseInt(s); if(((Client)target.clients.get(s)).parent == null) genstate.setValue(n, 0); else { m = Integer.parseInt(((Client)target.clients.get(s)).parent.name); genstate.setValue(n, m); } return genstate; }

Test Scenario : Stimuli scenario class ClientManagerTestScenario { scenario boolean addClient() { iterate(int i = 0; i < numberOfClients; i++; ) { String name = (i == 0)?(null):("" + i); if( target.precondition_addClient( name ) ) target.addClient( name ); } return true; } scenario boolean removeClient() { iterate(int i = -1; i < numberOfClients; i++; ) { Client client = (i < 0)? ClientMediator.create(new ClientImpl("1")) : (Client)target.clients.get(("" + i)); if( target.precondition_removeClient( client ) ) target.removeClient( client ); } return true; }

Test Execution : First Stage Test Engine Test Scenario

Factorization

Testing Concurrency : Modeling ?a ?{a,b} ?b ?{a,a} ?{b,b} ?{a,a,a} ?{a,a,b} How to model responses on all possible multistimuli? Plain concurrency axiom : reaction on multistimulus is the same as on some sequence of its stimuli

Asynchronous Reaction Specification specification reaction UDPPacket UDPResponse ( ) { pre { return !ModelUDPPackets.isEmpty ( ); } post { return ( UDPResponse ) && !ModelUDPPackets.contains ( UDPResponse ); }

Providing Concurrent Inputs s 11 System under Test s 21 s 31 s 12 s 32 s 13 s 22 s 23 s 14 s 24 s 33 Multisequence is used instead of sequence of stimuli

Collecting Asynchronous Reactions Reactions form a partially ordered set System under Test r 33 r 32 r 12 r 23 r 22 r 11 r 21 r 31 Time

Evaluation of Reactions StimuliReactions Plain concurrency axiom   ✕

UniTesK Test Architecture, 2 Oracle Test input construction System under Test Test Engine Test Action Iterator Mediator Synchronization Manager Reaction Collector Serializer ✕   ✕

UniTesK Tools (C++ Link) Java (C++) / NetBeans, Eclipse (plan) CTesK C / Visual Studio 6.0, gcc C# / Visual Studio.NET 7.1 OTK Specialized tool for compiler testing

Technology Transfer Forms  Training  Pilot projects  Joint projects  Project supervising Successful transfers  Lanit-Tercom CTesK, Feb 2002  Luxoft (IBS group) Jul 2003  Intel OTK, Nov 2003

Case Studies IPv6 implementations  Microsoft Research  Mobile IPv6 (in Windows CE 4.1)  Oktet Intel compilers Web-based client management system in bank Enterprise application development framework Billing system

References 1. V. Kuliamin, A. Petrenko, N. Pakoulin, I. Bourdonov, and A. Kossatchev. Integration of Functional and Timed Testing of Real-time and Concurrent Systems. Proc. of PSI LNCS, Springer-Verlag, V. Kuliamin, A. Petrenko, I. Bourdonov, and A. Kossatchev. UniTesK Test Suite Architecture. Proc. of FME LNCS 2391, pp , Springer-Verlag, A. K. Petrenko, I. B. Bourdonov, A. S. Kossatchev, V. V. Kuliamin. Experiences in using testing tools and technology in real-life applications. Proceedings of SETT’01, India, Pune, I. B. Bourdonov, A. S. Kossatchev, V. V. Kuliamin. Using Finite State Machines in Program Testing. "Programmirovanije", 2000, No. 2 (in Russian). Programming and Computer Software, Vol. 26, No. 2, 2000, pp (English version) 5. I. Bourdonov, A. Kossatchev, A. Petrenko, and D. Galter. KVEST: Automated Generation of Test Suites from Formal Specifications. Proceedings of World Congress of Formal Methods, Toulouse, France, LNCS, No. 1708, 1999, pp

Contacts Victor V. Kuliamin Alexander K. Petrenko , B. Kommunisticheskaya, 25 Moscow, Russia Web: Phone: Fax:

Thank you!