LSR Test purposes: adapting the notion of specification to testing Yves Ledru, L. du Bousquet, P. Bontron, O. Maury, C. Oriat, M.-L. Potet LSR/IMAG Grenoble,

Slides:



Advertisements
Similar presentations
Auto-Generation of Test Cases for Infinite States Reactive Systems Based on Symbolic Execution and Formula Rewriting Donghuo Chen School of Computer Science.
Advertisements

Automating Software Module Testing for FAA Certification Usha Santhanam The Boeing Company.
Testing Workflow Purpose
2009 – E. Félix Security DSL Toward model-based security engineering: developing a security analysis DSML Véronique Normand, Edith Félix, Thales Research.
Introducing Formal Methods, Module 1, Version 1.1, Oct., Formal Specification and Analytical Verification L 5.
Architecture Representation
Automated Test Design ™ © 2011 Conformiq, Inc. CONFORMIQ DESIGNER On ES v1.2.1 Stephan Schulz MBT Working Meeting/MTS#56, Göttingen.
A Brief Introduction. Acknowledgements  The material in this tutorial is based in part on: Concurrency: State Models & Java Programming, by Jeff Magee.
Ch6: Software Verification. 1 White-box testing  Structural testing:  (In)adequacy criteria  Control flow coverage criteria.
ISBN Chapter 3 Describing Syntax and Semantics.
1 Semantic Description of Programming languages. 2 Static versus Dynamic Semantics n Static Semantics represents legal forms of programs that cannot be.
CS 355 – Programming Languages
Formal Methods in Software Engineering Credit Hours: 3+0 By: Qaisar Javaid Assistant Professor Formal Methods in Software Engineering1.
Train Control Language Teaching Computers Interlocking By: J. Endresen, E. Carlson, T. Moen1, K. J. Alme, Haugen, G. K. Olsen & A. Svendsen Synthesizing.
Software Testing and Quality Assurance
Ch6: Software Verification. 1 Statement coverage criterion  Informally:  Formally:  Difficult to minimize the number of test cases and still ensure.
UML CASE Tool. ABSTRACT Domain analysis enables identifying families of applications and capturing their terminology in order to assist and guide system.
LSR TOBIAS and some ASE challenges Y. Ledru P. Bontron, O. Maury, L. du Bousquet, M.L. Potet, C. Oriat, S. Beghdadi, H. Bouldjedri LSR/IMAG – Grenoble.
(c) 2007 Mauro Pezzè & Michal Young Ch 1, slide 1 Software Test and Analysis in a Nutshell.
Describing Syntax and Semantics
End-to-End Design of Embedded Real-Time Systems Kang G. Shin Real-Time Computing Laboratory EECS Department The University of Michigan Ann Arbor, MI
1 3rd of July 2009 CEA LIST Symbolic execution based model checking of open systems with unbounded variables Nicolas RAPIN CEA LIST.
High Level: Generic Test Process (from chapter 6 of your text and earlier lesson) Test Planning & Preparation Test Execution Goals met? Analysis & Follow-up.
LSR ASE 2005 Panel on Education in Automated Software Engineering Yves Ledru LSR/IMAG, University of Grenoble-1, (France) Long Beach, CA,Nov. 11th 2005.
Basic Concepts The Unified Modeling Language (UML) SYSC System Analysis and Design.
Romaric GUILLERM Hamid DEMMOU LAAS-CNRS Nabil SADOU SUPELEC/IETR.
Formal Methods 1. Software Engineering and Formal Methods  Every software engineering methodology is based on a recommended development process  proceeding.
Software Testing. Recap Software testing – Why do we do testing? – When it is done? – Who does it? Software testing process / phases in software testing.
An Introduction to MBT  what, why and when 张 坚
Requirements Analysis
Copyright © Siemens AG All rights reserved. Essential Criteria on MBT to Ensure Quality of Software in Industry PVR Murthy Andreas Ulrich Siemens.
CMSC 345 Fall 2000 Unit Testing. The testing process.
Chapter 6: Testing Overview Basic idea of testing - execute software and observe its behavior or outcome. If failure is observed, analyze execution record.
Overview of Formal Methods. Topics Introduction and terminology FM and Software Engineering Applications of FM Propositional and Predicate Logic Program.
Testing Workflow In the Unified Process and Agile/Scrum processes.
Software Engineering Research paper presentation Ali Ahmad Formal Approaches to Software Testing Hierarchal GUI Test Case Generation Using Automated Planning.
Framework for the Development and Testing of Dependable and Safety-Critical Systems IKTA 065/ Supported by the Information and Communication.
BE-SECBS FISA 2003 November 13th 2003 page 1 DSR/SAMS/BASP IRSN BE SECBS – IRSN assessment Context application of IRSN methodology to the reference case.
ISBN Chapter 3 Describing Semantics -Attribute Grammars -Dynamic Semantics.
16 October Reminder Types of Testing: Purpose  Functional testing  Usability testing  Conformance testing  Performance testing  Acceptance.
Formal Verification Lecture 9. Formal Verification Formal verification relies on Descriptions of the properties or requirements Descriptions of systems.
Software Construction Lecture 18 Software Testing.
Unified Modeling Language* Keng Siau University of Nebraska-Lincoln *Adapted from “Software Architecture and the UML” by Grady Booch.
Lach1MAPLD 2005/241 Accessible Formal Verification for Safety-Critical FPGA Design John Lach, Scott Bingham, Carl Elks, Travis Lenhart Charles L. Brown.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Chapter 19 Verification and Validation.
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.
Experimentation in Computer Science (Part 2). Experimentation in Software Engineering --- Outline  Empirical Strategies  Measurement  Experiment Process.
HACNet Simulation-based Validation of Security Protocols Vinay Venkataraghavan Advisors: S.Nair, P.-M. Seidel HACNet Lab Computer Science and Engineering.
Dynamic Testing.
1 Phase Testing. Janice Regan, For each group of units Overview of Implementation phase Create Class Skeletons Define Implementation Plan (+ determine.
Testing Overview Software Reliability Techniques Testing Concepts CEN 4010 Class 24 – 11/17.
Chapter 8 Testing the Programs. Integration Testing  Combine individual comp., into a working s/m.  Test strategy gives why & how comp., are combined.
Verification vs. Validation Verification: "Are we building the product right?" The software should conform to its specification.The software should conform.
The PLA Model: On the Combination of Product-Line Analyses 강태준.
Introduction to Software Testing (2nd edition) Chapter 5 Criteria-Based Test Design Paul Ammann & Jeff Offutt
1 Process activities. 2 Software specification Software design and implementation Software validation Software evolution.
A Review of Software Testing - P. David Coward
Formal Specification.
Security analysis of COM with Alloy
Testing Tutorial 7.
OpenChain Third Meeting 10/7/14.
The Systems Engineering Context
Chapter 13 & 14 Software Testing Strategies and Techniques
Testing Approaches.
Software Design Methodology
Prepared by Stephen M. Thebaut, Ph.D. University of Florida
It is great that we automate our tests, but why are they so bad?
IS 2935: Developing Secure Systems
Chapter 10 – Software Testing
Presentation transcript:

LSR Test purposes: adapting the notion of specification to testing Yves Ledru, L. du Bousquet, P. Bontron, O. Maury, C. Oriat, M.-L. Potet LSR/IMAG Grenoble, France ASE2001, Nov , San Diego

LSR Conformance testing Given a black box And its specification Test cases compare the black box to its specification X = sqrt(X)*sqrt(X) and sqrt(X) >= 0 ?sqrt(4) !2 accept sqrt

LSR Complex test cases Unfortunately, complex applications often result in complex test cases! ?Money_Transfer( €) !OK accept e-Bank Money_transfer

LSR Specifying test cases It then makes sense to specify these complex test cases « I want a test case that will execute the Money_transfer procedure successfully! » It is the notion of test purpose! ?Money_Transfer( €) !OK accept

LSR The COTE project COTE: –conformance testing of components vs UML specifications –Softeam, France Telecom, Gemplus, IRISA, LSR/IMAG –Languages and tools to express and exploit test purposes and test cases –(compilers from test cases to target technologies) This work comes from a brainstorming activity around the notion of test purpose within the COTE project

LSR The notion of test purpose Test purpose : Description of a precise goal of the test case, in terms of exercising a particular execution path or verifying the compliance with a specific requirement [ISO IEC …conformance testing methodology and framework…] This notion is used: –As a structuring element in industrial test suites –In some tools based on formal specifications (SAMSTAG, TGV, TorX)

LSR Test purposes in TGV TGV is a tool developed jointly by IRISA (Rennes) and Vérimag (Grenoble) Test synthesis tool Given –A specification of the system under test –A test purpose It generates one corresponding test case.

LSR Example : coffee machine ?coin(1) ?coin(2) Pay 1 or 2 coins ?sugar Ask for sugar (optional) ?tea ?coffee Ask for tea or coffee !coffee !tea !sugar Get the beverage Loop

LSR TGV ?coin(1) ?coin(2) ?sugar ?tea ?coffee !coffee !tea !sugar Dynamic specification ?coin(1) ?coin(2) ?sugar ?tea ?coffee !coffee !tea !sugar A sample synthesis !coffee accept Test purpose ?coin(2) ?coffee !coffee Test case

LSR Test purposes as specification A test purpose (P) is an abstraction of test cases In TGV, a partial sequence of the test cases A test purpose specifies a set of test cases !coffee accept ?coin(2) ?coffee !coffee ?coin(1) ?sugar ?tea ?coffee !coffee ?coin(1) ?coin(2) ?sugar ?tea ?coffee !coffee !tea !sugar

LSR Benefits of abstraction Capture the essence of the test (here test the delivery of coffee) Shorter to state than the full test case (clerical completion left to the tool) Robust to evolutions of the dynamic specification (test cases are affected more often than test purposes, e.g. pay 3 instead of 2) !coffee accept

LSR Relations between test purposes (P), test cases (C) and specifications (S)

LSR Weakly_refines(C,P) A test case « refines » the test purpose (if it includes the partial sequence) But several irrelevant test cases refine the test purpose also. Þ Weak refinement! !coffee accept ?coin(2) ?coffee !coffee test case not conforming to the specification !coffee

LSR refines(C,P,S) The refinement takes place in the context of the specification !coffee accept ?coin(2) ?coffee !coffee ?coin(1) ?coin(2) ?sugar ?tea ?coffee !coffee !tea !sugar refines

LSR weakly_refines vs refines Refines is a ternary relation Weakly_refines is defined as weakly_refines(C,P) Û E S ¥ refines(C,P,S) refines weakly_refines Test case (C) Specification (S) Test Purpose (P)

LSR Semantics for refines(C,P,S) Depending on the languages used for C, P, and S, a semantics can be defined for refines(C,P,S) Semantics of refines in TGV: C is one of the paths of the synchronous product of P and S See also, in the paper: semantics of a test refinement relation in the context of the B method

LSR Semantics of weakly_refines As a consequence: weakly_refines(C,P) Û E S ¥ refines(C,P,S) gives a semantics to weakly_refines on top of the semantics of refines

LSR conforms(C,S) conforms(C,S) Û E P ¥ refines(C,P,S) Conforms checks that the test case corresponds to the specification refines Test case (C) Specification (S) Test Purpose (P) conforms

LSR consistent(P,S) consistent(P,S) Û E C ¥ refines(C,P,S) Consistent checks if the test purpose is compatible with the specification refines consistent Test case (C) Specification (S) Test Purpose (P)

LSR Summary If refines(C,P,S) has a semantics, it gives a semantics to the binary relations! In some cases, it is possible to systematically construct the third element of the relation refines weakly_refines consistent Test case (C) Specification (S) Test Purpose (P) conforms

LSR Test specification vs software specification

LSR refines SW Program (M) Software Specification (SS) refines Test case (C) Specification (S) Test Purpose (P)

LSR Automated Software Engineering Formal specs as a basis for software tools: –Verification of specification consistency –Program synthesis –Program verification

LSR Specification consistency often demonstrated by proving: E M ¥ refines SW (M,SS) (there exists a model which refines the specification) corresponds to consistent(P,S) Û E C ¥ refines(C,P,S) (a test purpose makes sense if there exists a test case) Tool Detection of inconsistent purposes (e.g. !sugar comes after !coffee) avoids useless searches !coffee accept reject ?coin(*) !sugar

LSR Synthesis Major theme at ASE synthesis SW (SS)  M corresponds to test synthesis e.g., TGV can be seen as a function synthesis TGV (P,S)  C Good news for tools The search domain is restricted by S (more decidable?, less complex?)

LSR Verification checks refines SW (M,SS) (program M is a valid refinement of specification SS) corresponds to 3 possible test case verifications –refines(C,P,S) C is a refinement of P in the context of S –weakly_refines(C,P) C is a refinement of P in some context –conforms(C,S) C is a test case for S

LSR Tools for test verification Synthesis involves searching a huge space of solutions If verification is cheaper than synthesis, it provides a natural complement. Two examples: –Evolution of specifications –Test case retrieval

LSR Evolution of specifications Evolution of S into S’ –Given a set of (Ci,Pi) for S –Verify refines(Ci,Pi,S’) for each (Ci,Pi) –When it fails, verify conforms(Ci,S’) –A second failure reveals regression of S’ Example: No need to recompute existing test cases if the coffee machine also serves hot chocolate ?tea ?coffee ?choc

LSR Test case retrieval Given a large set of test cases –Retrieve a test that weakly_refines a new test purpose –Minimize the set by identifying test cases that weakly_refine several test purposes !coffee accept ?coin(2) ?coffee !coffee weakly_refines ?coin(2) accept

LSR Related work and conclusion

LSR Test selection criteria 1st category: domain independent –Coverage criteria –Fault models (mutation testing) –Analysis rules, strategies –Random testing 2nd category: exploits domain knowledge –Test purposes (based on reqts) –Operational profiles Must be consistent with the reference Synthesis tool Test selection criterion (aka test requirement) Test case(s) Reference (specification, program)

LSR Conclusion Test purposes are a specification of test cases! 4 relations between C, P, and S –Not specific to a given tool or language –Not specific to an application domain (TGV: reactive systems, B: transf. systems) Tools: from ASE to Automated Test Eng. –Based on these 4 relations –Test verification complements test synthesis –Applications to specification evolution, test case retrieval,…

LSR Interactive Coffee Crafting