A Test Automation Language for Behavioral Models

Slides:



Advertisements
Similar presentations
Withdrawal Transaction Use Case Primary Actor: Customer Pre-conditions: The customer must have a valid ATM card and PIN. Post-conditions: The customer.
Advertisements

Rigorous Software Development CSCI-GA Instructor: Thomas Wies Spring 2012 Lecture 13.
Of 23 Generating Automated Tests from Behavioral Models Jeff Offutt (Research with Dr. Nan Li, currently with MediData Solutions) Software Engineering.
CS 355 – Programming Languages
Software Reliability CIS 640 Adapted from the lecture notes by Doron Pelel (
Formal Methods of Systems Specification Logical Specification of Hard- and Software Prof. Dr. Holger Schlingloff Institut für Informatik der.
1 Software Testing and Quality Assurance Lecture 28 – Testing Class Hierarchies.
© 2008 IBM Corporation Behavioral Models for Software Development Andrei Kirshin, Dolev Dotan, Alan Hartman January 2008.
#PhUSE Standard Scripts Project Proposal for Qualification of Standard Scripts.
Basic Concepts The Unified Modeling Language (UML) SYSC System Analysis and Design.
Spectra Software Defined Radio Products Applying Model Driven Design, Generative Programming, and Agile Software Techniques to the SDR Domain OOPSLA '05.
WG5 P02 Proposal2014 Qualification of Standard ScriptsStandard Scripts.
WG5 P02 Proposal2014 Qualification of Standard ScriptsStandard Scripts.
Software Engineering Research paper presentation Ali Ahmad Formal Approaches to Software Testing Hierarchal GUI Test Case Generation Using Automated Planning.
Business Integration Technologies © 2006 IBM Corporation Zurich Research Laboratory - BIT Validation.
Composition of UML Described Refactoring Rules Presented by Chin-Yi Tsai.
OOSC - JMSAssert. Design By Contract A powerful technique for writing reliable software. Specifying the software purpose with the implementation. Key.
1 ECE 750 Topic 8 Meta-programming languages, systems, and applications Evolving Object-Oriented Designs with Refactorings – Lance Tokuda and Don Batory.
1 Contractual Consistency Between BON Static and Dynamic Diagrams Ali Taleghani July 30, 2004.
CSC3315 (Spring 2009)1 CSC 3315 Languages & Compilers Hamid Harroud School of Science and Engineering, Akhawayn University
Object Design More Design Patterns Object Constraint Language Object Design Specifying Interfaces Review Exam 2 CEN 4010 Class 18 – 11/03.
1 Budapest University of Technology and Economics Department of Measurement and Information Systems Budapest University of Technology and Economics Fault.
Introduction to Software Testing (2nd edition) Chapter 5 Criteria-Based Test Design Paul Ammann & Jeff Offutt
Software Defined Networking BY RAVI NAMBOORI. Overview  Origins of SDN.  What is SDN ?  Original Definition of SDN.  What = Why We need SDN ?  Conclusion.
Automated Object’s Statechart Generation and Testing from Class-Method Contracts Atul Gupta PhD Scholar, IIT Kapur, India.
Why don’t programmers have to program in machine code?
UML Chapter 17.
ACTIVITY DIAGRAMS 《UML面向对象建模基础》.
Chapter 4: Business Process and Functional Modeling, continued
Generic Feature-Based Composition
TQS - Teste e Qualidade de Software (Software Testing and Quality) Test Case Design – Model Based Testing João Pascoal.
Generating Automated Tests from Behavior Models
SysML v2 Formalism: Requirements & Benefits
Software Engineering (CSI 321)
Review for Midterm, Fall 2009
Graph Coverage Criteria CS 4501 / 6501 Software Testing
Input Space Partition Testing CS 4501 / 6501 Software Testing
State-Space and Behavior
Arab Open University 2nd Semester, M301 Unit 5
Graph Coverage for Specifications CS 4501 / 6501 Software Testing
Introduction to Software Testing Chapter 3.5 Logic Coverage for FSMs
Beyond Test Automation (Why Are My Tests Dumb?)
Design by Contract in Python: Present and Future Aaron Bingham
State Machine Diagrams
UNIT-4 BLACKBOX AND WHITEBOX TESTING
It is great that we automate our tests, but why are they so bad?
Behavioral Models for Software Development
From Spec-based Testing to Test Automation and Beyond
Domain Class Diagram Chapter 4 Part 2 pp
Standard Scripts Project 2
Introduction to Software Testing Chapter 3, Sec# 3.5
Introduction to Software Testing Chapter 3.5 Logic Coverage for FSMs
Graph Coverage for Design Elements CS 4501 / 6501 Software Testing
Graph Coverage for Specifications CS 4501 / 6501 Software Testing
Graph Coverage for Source Code
(some of) My Research Engineering is about getting technology to do what it does well so humans can do what they do well Jeff Offutt Professor of Software.
Graph Coverage Criteria CS 4501 / 6501 Software Testing
Graph Coverage Criteria
Graph Coverage Criteria
Overview of the ETSI Test Description Language
Standard Scripts Project 2
WG5 P02 Proposal 2014 Qualification of Standard Scripts
Introduction to Software Testing Chapter 8.5 Logic Coverage for FSMs
Standard Scripts Project 2
Respectful Type Converters
George Mason University
Paul Ammann & Jeff Offutt
Standard Scripts Project 2
WG5 P02 Proposal 2014 Qualification of Standard Scripts
UNIT-4 BLACKBOX AND WHITEBOX TESTING
Presentation transcript:

A Test Automation Language for Behavioral Models Nan Li, Medidata Solutions

A Test Automation Language for Behavioral Models Nan Li Medidata Solutions This work is part of Nan’s PhD dissertation at George Mason University and a paper is submitted to ICST 2015

Model-based Testing What is model-based testing Why to use model-based testing ICST 2014: model-based testing is the future Usually applied to complicated software Software for planes, trains, cars, etc. ICST 2014 keynote speech from Tom Wissink (Lockheed Martin) Model-based testing is the future Drawback: complicated to use https://sites.google.com/site/icst2014/program/keynotes/2014%20ICST%20De javu%20IandT.pptx?attredirects=0&d=1

Model-based Testing Model Test Requirements (TRs) Abstract Tests Concrete Tests Test Execution and Reports Criteria Extra Info

An Example - Vending Machine Coverage Criteria TRs e.g. [1, 3] Generate abstract tests test paths (TPs) e.g. [1, 3, 4] how to generate TPs to satisfy TRs with minimum costs? Generate concrete tests solve constraints Coin 1 Coin 2 GetChoc AddChoc AddChoc Coin 3 4 GetChoc AddChoc AddChoc / Coin State name: state invariants State1: credit = 0 & #stock = 0 State2: credit > 0 & #stock = 0 State3: credit = 0 & #stock > 0 State4: credit > 0 & #stock > 0 composite states, joins, etc. node, edge, edge-pair, prime path state invariants, preconditions and postconditions

The Mapping Problem Transform abstract tests to concrete tests [1, 3, 4, 1, 2, 4] [AddChoc, Coin, GetChoc, Coin, AddChoc] Coin 1 Coin 2 GetChoc AddChoc AddChoc Coin 3 4 Existing approaches use too many additional models GetChoc AddChoc AddChoc / Coin State name: state invariants State1: credit = 0 & #stock = 0 State2: credit > 0 & #stock = 0 State3: credit = 0 & #stock > 0 State4: credit > 0 & #stock > 0 When requirements change, models and code have to change Testers often convert abstract tests to concrete tests by hand AddChoc, Coin, and GetChoc appear multiple times

Solution The structured test automation language (TAL) Use only behavioral models (state machine diagrams) Identifiable elements Transitions and constraints Mappings From elements to executable code Element and object mappings

Element Mapping Mapping mappingName TYPEOFELEMENT nameOfElement Requires objectMappingName … [TYPEOFCONSTRAINT nameOfElement …] … { test code } TYPEOFELEMENT: transition or constraint TYPEOFCONSTRAINT: guards, post-conditions, or state-invariants

Object Mapping Mapping mappingName Class nameOfClass Object nameOfObject Requires objectMappingName … { test code }

Mapping Examples Mapping coinOver90 Transition coin { VendingMachine vm = new VendingMachine(); vm.coin (100);} Mapping vmInit Class VendingMachine Object vm { VendingMachine vm = new VendingMachine (); } Mapping coinOver90 Transition coin Requires vmInit { vm.coin (100);}

Mapping Examples (Cont.) Mapping constraintCredit Constraint ConstriantCreditOver0 StateInvariants State2, State4 { vm.getCredit () > 0;}

Concrete Test Generation … State3 (credit = 0 & #stock > 0), Coin, State4 (credit > 0 & #stock > 0), ... To satisfy a constraint, select a mapping for the preceding transition Report to users if all mappings cannot satisfy the constraint Inability to satisfy constraints may suggest that models or programs have errors

Summary and Future Applications at Medidata Automate the mapping problem Original Requirements Use TAL Requirements in TAL Original Data Automatic Validation Transformed Data Inspiration: To automate the test generation and validation, we need to change the requirement formats and use automation languages to connect the requirements to test code At Medidata, we plan to create another TAL to translate requirements for validating data transformation

Thank you Nan Li nli@mdsol.com Medidata Solutions http://cs.gmu.edu/~nli1/stale/ http://www.cs.gmu.edu/~offutt/documents/theses/NanLiDissertation.pdf