Property-based Testing – ProTest FP7 Strep John Derrick University of Sheffield, and members of the ProTest team.

Slides:



Advertisements
Similar presentations
HOlistic Platform Design for Smart Buildings
Advertisements

Verification and Validation
ECOE 560 Design Methodologies and Tools for Software/Hardware Systems Spring 2004 Serdar Taşıran.
Lecture # 2 : Process Models
Professor John Hosking, Dean of Engineering and Computer Science Models, Modelling, MBSE.
Alternate Software Development Methodologies
Refactoring Erlang Programs Huiqing Li Simon Thompson University of Kent.
R R R CSE870: Advanced Software Engineering (Cheng): Intro to Software Engineering1 Advanced Software Engineering Dr. Cheng Overview of Software Engineering.
Software Requirements
WRT 2007 Refactoring Functional Programs Huiqing Li Simon Thompson Computing Lab Chris Brown Claus Reinke University of Kent.
Software Engineering For Beginners. General Information Lecturer, Patricia O’Byrne, office K115A. –
The Rare Glitch Project: Verification Tools for Embedded Systems Carnegie Mellon University Pittsburgh, PA Ed Clarke, David Garlan, Bruce Krogh, Reid Simmons,
CS 290C: Formal Models for Web Software Lecture 6: Model Driven Development for Web Software with WebML Instructor: Tevfik Bultan.
Supplement 02CASE Tools1 Supplement 02 - Case Tools And Franchise Colleges By MANSHA NAWAZ.
5/24/011 Advanced Tool Integration for Embedded Systems Assurance Insup Lee Department of Computer and Information Science University of Pennsylvania.
Chapter 1 The Systems Development Environment Modern Systems Analysis and Design Sixth Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich.
Verification and Validation
Chapter 1 The Systems Development Environment
Basic Concepts The Unified Modeling Language (UML) SYSC System Analysis and Design.
CASE Tools And Their Effect On Software Quality Peter Geddis – pxg07u.
02/06/05 “Investigating a Finite–State Machine Notation for Discrete–Event Systems” Nikolay Stoimenov.
Software Testing Verification and validation planning Software inspections Software Inspection vs. Testing Automated static analysis Cleanroom software.
1COM6030 Systems Analysis and Design © University of Sheffield 2005 COM 6030 Software Analysis and Design Lecture 4 - System modelling Dr Richard Clayton.
S/W Project Management Software Process Models. Objectives To understand  Software process and process models, including the main characteristics of.
Architecting Secure Mobile P2P Systems James Walkerdine, Peter Phillips, Simon Lock Lancaster University.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Verification and Validation.
1 Systems Analysis and Design in a Changing World, Fourth Edition.
Objective 1.2 Cloud Computing, Internet of Services and Advanced Software Engineering Arian Zwegers European Commission Information Society and Media Directorate.
ECE 720T5 Winter 2014 Cyber-Physical Systems Rodolfo Pellizzoni.
1 소프트웨어공학 강좌 Chap 9. Distributed Systems Architectures - Architectural design for software that executes on more than one processor -
Software Inspection A basic tool for defect removal A basic tool for defect removal Urgent need for QA and removal can be supported by inspection Urgent.
By: Md Rezaul Huda Reza 5Ps for SE Process Project Product People Problem.
System Development Process Prof. Sujata Rao. 2Overview Systems development life cycle (SDLC) – Provides overall framework for managing system development.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 6 Slide 1 Requirements Engineering Processes l Processes used to discover, analyse and.
Assessing the Suitability of UML for Modeling Software Architectures Nenad Medvidovic Computer Science Department University of Southern California Los.
Architecting Web Services Unit – II – PART - III.
1 The Software Development Process  Systems analysis  Systems design  Implementation  Testing  Documentation  Evaluation  Maintenance.
Reliable Design of Safety Critical Systems Dr. Abhik Roychoudhury School of Computing
Information System Development Courses Figure: ISD Course Structure.
University of Southern California Center for Systems and Software Engineering Model-Based Software Engineering Supannika Koolmanojwong Spring 2013.
Supported by ELTE IKKK, Ericsson Hungary, in cooperation with University of Kent Erlang refactoring with relational database Anikó Víg and Tamás Nagy Supervisors:
Lecture 7: Requirements Engineering
1 Systems Analysis and Design in a Changing World, Thursday, January 18, 2007.
Content The system development life cycle
© 2012 xtUML.org Bill Chown – Mentor Graphics Model Driven Engineering.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Software Verification, Validation and Testing.
Software Engineering Prof. Ing. Ivo Vondrak, CSc. Dept. of Computer Science Technical University of Ostrava
University of Toronto at Scarborough © Kersti Wain-Bantin CSCC40 other methodologies 1 Method/Process = step-by-step description of the steps involved.
Refactoring Erlang Programs Huiqing Li Simon Thompson University of Kent Zoltán Horváth Eötvös Loránd Univ.
Systems Analysis and Design in a Changing World, Fourth Edition
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.
Experiences from Representing Software Architecture in a Large Industrial Project Using Model Driven Development Andres Mattsson 1 Björn Lundell 2 Brian.
The Software Development Process
Chapter 6 CASE Tools Software Engineering Chapter 6-- CASE TOOLS
Toulouse, September 2003 Page 1 JOURNEE ALTARICA Airbus ESACS  ISAAC.
Chapter 2 Object-Oriented Paradigm Overview. Getting Acquainted with the Class Project Read the requirements specification carefully Make note of any.
Architecture View Models A model is a complete, simplified description of a system from a particular perspective or viewpoint. There is no single view.
Scalable Clone Detection and Elimination for Erlang Programs Huiqing Li, Simon Thompson University of Kent Canterbury, UK.
International Telecommunication Union © ITU-T Study Group 17 Integrated Application of SDL Amardeo Sarma NEC Europe Ltd.
Computing Systems: Next Call for Proposals Dr. Panagiotis Tsarchopoulos Computing Systems ICT Programme European Commission.
Lectures 2 & 3: Software Process Models Neelam Gupta.
LECTURE 5 Nangwonvuma M/ Byansi D. Components, interfaces and integration Infrastructure, Middleware and Platforms Techniques – Data warehouses, extending.
Copyright 1999 G.v. Bochmann ELG 7186C ch.1 1 Course Notes ELG 7186C Formal Methods for the Development of Real-Time System Applications Gregor v. Bochmann.
Laurea Triennale in Informatica – Corso di Ingegneria del Software I – A.A. 2006/2007 Andrea Polini XVII. Verification and Validation.
The Development Process of Web Applications
Architecting Web Services
Architecting Web Services
Software Processes (a)
Analysis models and design models
From Use Cases to Implementation
Presentation transcript:

Property-based Testing – ProTest FP7 Strep John Derrick University of Sheffield, and members of the ProTest team.

Consortium University of Sheffield - USFD - UK University of Kent - Kent - UK Universidad Politécnica de Madrid - UPM - Spain University of Göteborg - ITU1 - Sweden Chalmers University of Technology - ITU2 - Sweden Ericsson - Sweden Erlang Training and Consulting Ltd - ETC - UK Quviq AB- Sweden LambdaStream - Lambda - Spain

Motivation Communication networks, based on telephony, wireless and Internet are converging. Increasing numbers of services are being added to these merging networks, and services are becoming more complex. Telecoms industry provides 5-nines reliability, ie % reliability, of core systems. How to maintain 5-nines reliability in future service-oriented networks and systems.

Ensuring reliability The software for new services and network devices is rapidly growing in complexity. Key ingredients for ensuring reliability of complex systems: suitable architecture and technologies, improving the software process, and thorough and efficient in testing. Aim to support the European software industry in its testing methodology for software in network and service infrastructures.

Testing Testing of complex systems is difficult and time-consuming. Radical approaches are needed, and will be welcomed by industry — if they work. In ProTest we build upon on the idea of using properties as objects for testing software. Eg random testing driven by LTL description of properties. In order to deliver dynamic services and interoperable network applications with guaranteed properties, we focus testing around these properties.

Property-based testing Property-based testing aims to deliver more effective tests, more efficiently, and so deliver economic benefits to the European software industry. Testing with properties as objects improves the competitiveness of software developers, since they can deliver higher quality software for a lower price. It also allows collaborating companies to improve the definition of their software interfaces and so improve the compatibility between their services. We will deliver methods and tools to support property-based development of systems.

Project components In order to deliver full benefits we need tools to integrate property-based testing into the development life cycle: Property discovery. Current testing is based on sets of test cases embedded in test suites; we are building techniques and tools to aid the software developers to extract properties from this test data. Current specifications and models are often informal: we are developing specialised property languages to ease the formalisation of existing specifications.

Test and property evolution. All software systems are subject to change and evolution; we are building refactoring tools to support the evolution of tests and properties in line with the evolution of the system itself. Property monitoring. Not all properties can be tested in advance of systems being executed; not all faults will be found during testing. We will provide tools to support the post hoc examination of trace details for conformance to particular constraints. Analysing concurrent systems. At the heart of service oriented systems is concurrency. We are designing model- checkers so that concurrent systems can be analysed for fundamental properties.

Erlang/OTP Property-driven development can be used in a variety of programming languages and systems. Chosen platform for initial implementation is Erlang/OTP, but dissemination into model-driven development arena (UML) and other languages (C/C++, Java, etc). Erlang/OTP was developed by Ericsson during the early nineties as a platform for rapid development of network applications. Erlang is a concurrent functional language with specific support for the development of distributed, fault-tolerant systems with soft real-time requirements.

Erlang/OTP - robustness and reliability within the telecoms sector, eg, in the implementation of the AXD301 ATM telecoms switch by Ericsson. Applications of Erlang include computer telephony, banking, TCP/IP programming (HTTP, SSL, , Instant messaging, etc) and 3D-modelling. There is a wide user base which over the years has grown beyond the telecoms sector, and companies such as Amazon are interested in the suitability of Erlang for programming massively concurrent distributed systems. Erlang is particularly well placed to exploit multi-core processor chips: the concurrency model of Erlang allows separate processes to run on the different cores with no change to the source code.

Consortium Mix of Universities, SMEs, and a larger industrial company. The academics bring experience of testing, formal verification, language development, and refactoring. Quviq is a spin-off, founded to commercialise an innovative property-based testing tool (QuickCheck). System builders (Ericsson, LambdaStream), consultants, and trainers (ETC), provide insights into what is required of practical tools, what properties will need to be checked, and ways of fitting the results from the project into practical software development methods.

Overview - 5 technical WPs

WP1 - Property discovery

Property discovery Using QuickCheck - a tool combines random test case generation from properties written in Erlang, with a flexible language for specifying generators. Automatic simplification of test cases. Develop Domain Specific Languages for dealing with several fragments of UML. Likely to include behavioural aspects such as sequence diagrams. Developing a method and prototype tool to obtain properties from combining a number of test cases.

Developed a technique to reverse-engineer testable models from program execution traces. Being integrated into an automated iterative process, where hypothesised models are refined by testing them against the implementation.

WP2 - System evolution and assurance

System Evolution and Assurance Refactoring means changing the design or structure of a program … without changing its behaviour. Develop a method to refactor properties and test cases. Implemented in the Wrangler refactoring tool. Refactoring of test cases and properties by connecting it to refactoring of the actual subject under test.

-module (test). -export([f/1]). add_one (N, [H|T]) -> [H+N | add_one(N,T)]; add_one (N,[]) -> []. f(X) -> add_one(1, X). -module (test). -export([f/1]). add_int (N, [H|T]) -> [H+N | add_int(N,T)]; add_int (N,[]) -> []. f(X) -> add_int(1, X). Generalisation -module (test). -export([f/1]). add_one ([H|T]) -> [H+1 | add_one(T)]; add_one ([]) -> []. f(X) -> add_one(X).

Wrangler Embedded in Emacs … and Eclipse. Structural, data type and module refactorings. Tree-based analysis and transformation. Work with multiple modules. Support undo of refactorings Preserve layout and comments. Respects aspects of the macro system.

Structural, data type and module-level refactorings. In Erlang + emacs = distel Uses the Erlang system framework … … + untyped Erlang transformation library. Respects aspects of the macro system.

Refactorings in Wrangler Renaming variable, function, module, process, … Function generalisation Move function Function extraction Fold against defn. Tuple function arguments Register a process From function to process Add a tag to messages

Duplicate Code Detection Report syntactically well-formed code fragments that are identical after consistent renaming of variables … … ignoring differences in literals, layout. Integrated with the refactoring system.

Code Inspection Support Variable use / binding information. Caller functions. Caller and callee modules. Long functions or modules. Case, if, receive expressions nested more than n times. Non tail-recursive servers. Non-flushed unknown messages

Ongoing work Continue the integration of Wrangler with Eclipse + Erlide. More refactorings are being added including introduce macros, from module to process, etc. To investigate the use of trace information to help the refactoring process, especially process-related refactorings.

Refactoring test code Integration of refactoring and tests EUnit: unit tests QuickCheck: property-based testing CommonTest / TestServer: system tests

Issues in refactoring and testing Keeping track of names, including module names. Some refactorings carry over easily … … others require respecting of conventions. The role of makefiles and project management in system evolution … … and the question of integration: Erlide.

WP3 - Property monitoring

Property monitoring The Erlang run-time system has a built-in trace recording functionality. How to check properties for a trace. Develop methods for presenting trace information to the user in a comprehensible way, and also present minimal counter-examples in case a property does not hold for a trace. By studying the trace we can see which test cases that are efficient and what aspects of the system is not exercised by a test case.

WP4 - Analysis of concurrent systems Model checking is a complementary technique to testing for verifying concurrent systems. Model checking provides the possibility to fully verify a system. Develop two model-checkers for Erlang: McErlang, and etomcrl - based on an abstraction of Erlang into the process algebra, mCRL. We are integrating the QuickCheck based testing framework with the model checker. This involves harmonizing the property specification language of QuickCheck and McErlang, and we plan to investigate the link between model based specification and testing using QuickCheck.

WP5 - Property driven development Undertake a larger case study that will be used to evaluate and assess the results in an industrial setting. LambdaStream will use the property-based development methodology supported by the QuickCheck tool and refactoring techniques, and evaluate the property monitoring methodology and the model-checking tools and techniques.

More information: Papers at Refactoring Workshop Papers at ACM SIGPLAN Erlang Workshop Papers at: IEEE/ACM conf on Automated Soft. Eng. (ASE’08) International Workshop on Model Checking and AI FORTE 2008, etc, etc. A number of video’s, tutorials and lectures available. See webpages.

Questions?