300 likes | 531 Views
Model Based Testing . Aparna Vijaya & Beaulah Vineela P. Supervisor: Antonio Cicchetti. Presentation Outline . Model Driven Development Model Based Testing (MBT) MBT Tools Survey Supporting the automatic test case and oracle generation using system models – Aparna
E N D
Model Based Testing Aparna Vijaya & Beaulah Vineela P Supervisor: Antonio Cicchetti
Presentation Outline • Model Driven Development • Model Based Testing (MBT) • MBT Tools Survey • Supporting the automatic test case and oracle generation using system models– Aparna • Traceability in MBT– Beaulah
Motivation Significance of Model Driven Development in Software Engineering - Emerging trend in software industry - Handle system complexity - Deviation from traditional development - Support requirements change - Support for highly distributed systems - Improve consistency - Provide quality solutions - Improve the productivity
Models and Modeling • What is a Model ? A Model is an abstract representation of the system • Modeling Languages - UML - xtUML - SysML
Generalized approach for MDD • Shift focus from writing code to developing models • User works on a platform independent model • Selects the specific target platform • Tool generates the code. “Design once, run anywhere” www.cs.tufts.edu/comp/180/teams/t4/site/MDD_all2.ppt
Model System AbstractTests Executable Tests Model Based Testing – Overview • “Model-based testing is black box testing process for derivation of test cases from a model that describe functional aspects of the system under test and executing those test cases.” is a partial description of can be derived from can be run against are abstract versions of
Model Based Testing Approach • Five Main Steps • Model the SUT • Generate abstract tests from the model. • Concretize the abstract tests to make them executable • Execute the tests on the SUT and assign verdicts. • Analyze the test results. Practical Model Based Testing- A Tools Approach, Mark Utting & Bruno Legeard
Pros & Cons of MBT • Improved quality of the product • Better communication using models • Eases updating of test suites for changed requirements • Early exposure of ambiguities in specification and design • Generate variety of test suites from the same model by different test selection criteria. • Complexity of the models
Problem Statement “To design a test generator that addresses the whole test design problem from choosing input values and generating sequence of operation calls to generate executable tests that include verdict information”
Model based testing at Ericsson Spirent testing tool Qtronic Bridgepoint
Existing Approaches • Combinatorial Design Paradigm - What is it all about? - Pros and Cons of this approach David M. Cohen, Siddhartha R. Dalal, Jesse Parelius, & Gardner C. Patton, "The Combinatorial Design Approach to Automatic Test Generation”
Existing Approaches contd… Clementine Nebut, Franck Fleurey, Yves Le Traon & Jean-marc Jezequel, “Automatic Test Generation: A Use Case Driven Approach” • Usecase approach
Existing Approaches contd… Leirios Test Generator - Main principles - Approach in LEIRIOS tool C. Grandpierre, B. Legeard, F. Peureux , F. Bouquet , “A Test Generation Solution to Automate Software Testing”
Overview of technologies used in proposed approaches Tefkat Metamodel MOFScript TTCN 3 Ecore model XMI format State Diagrams
Proposed Approach (1) Source Metamodel Tefkat Adaptor (Ecore model) MOF script Source Model (Class Diagram) Target Text (XMI format) State Diagram Test Result Execute tests Generate Test (TTCN 3) Traversed transitions Data-flow testing techniques From Class diagrams Keith Duddy, Anna Gerber, Michael Lawley, Kerry Raymond & Jim Steel, Model Transformation: A declarative, reusable patterns approach
Proposed Approach (2) Sequence Diagram (Bridgepoint) XMI snippet (Bridgepoint) Control Flow Graph AI Framework Determine coverage for test AI framework for determining test path Execute tests in test harness Test Result Generate tests (TTCN3) From Sequence diagrams C Doungsa-ard, K Dahal, and A Hossain, “AI Based Framework for Automatic Test Data Generation”
Analysis & Future work Why MOFScript generation in method one. Class diagrams with pre and post conditions of the particular state Automatic test case generation can be done as a background process while the user is creating models could also be a research area
Problem statement “Achievingtraceability between the test cases generated and requirements in amodel based testing(MBT) scenario”
Quick glance about traceability • Ensure interrelation between different artifacts involved software engineering • Enable to perform quick and easy impact analysis • Enhance the product quality • SDLC Phase - Artifacts • Specification - requirements • Design - design models • Implementation - code( functions, libraries) • Validation - test case
Requirements Traceability in MBT Would enable • Relevance of the test case generated from model • How a modification in the model would effect the generated test case • Provides the effective coverage
State of the Art for Traceability in MBT RM TOOLS ReqTracer DOORS Requisite Pro
Drawbacks & Alternative Drawbacks - • Semantic variation between source artifact and target artifact • Need for an RM tool to support modeling notations of MBT tool • Integration problems Alternative - • Need to have traceability with in MBT tool • Benefits of traceability through model transformations with in MDD tools
Requirements trace model • A new requirement trace model is introduced • Provided as input MBT tool • All the requirements are represented in trace model and linked to the corresponding system functions
How this approach works • A transition to new state in state chart diagram is done by an action or function • New state corresponds to state of system which is desired to be => in new state system might has fulfilled a requirement • Requirement identifiers are tagged with corresponding method in trace model • By generating test cases using state chart diagram and linking trace model, traceability is achieved with MBT tool
Conclusion – Future work • This would avoid problems with semantics while linking requirements between different tools • Not only with state chart diagrams, we can have traceability model linked with other test generation models