V&V: Model-based testing

Similar documents
Harmonizing System Development and Test Development with MDA

Process and data flow modeling

2016 / 2017 Model-based Testing User Survey: Results

Certified Model-Based Tester

SECURITY TESTING USING MODELS AND TEST PATTERNS. Presented by [Bruno Legeard, Elizabeta Fourneret]

Component Design. Systems Engineering BSc Course. Budapest University of Technology and Economics Department of Measurement and Information Systems

AN EFFICIENT APPROACH FOR MODEL- BASED TESTING: SIEMENS USE CASE IN THE MBAT EUROPEAN PROJECT

First Steps Towards Conceptual Schema Testing

Best Practices for Model-Based Systems Engineering

SECURITY TESTING USING MODELS AND TEST PATTERNS. Presented by [Bruno Legeard, Elizabeta Fourneret]

Architectural Blueprint

A scenario-based test approach for testing reactive concurrent systems

Modeling Requirements, Architectures, Behaviour...

From U2TP Models to Executable Tests with TTCN-3 - An Approach to Model Driven Testing -

Certified Automotive Software Tester Sample Exam Paper Syllabus Version 2.0

DO WE NEED TEST SPECIFICATION LANGUAGES?!

Test Design Techniques ISTQB (International Software Testing Qualifications Board)

Model Transformers for Test Generation from System Models

MARTE Based Modeling Tools Usage Scenarios in Avionics Software Development Workflows

Development and Deployment of ECU based Control Systems through MBD. Imperative role of Model based design in System Engineering

Hardware Design and Simulation for Verification

Model-Driven Architecture, the revolution of software engineering

Certification of Model Transformations

Automated Test Design with TTCN-3

Quality-of-Service Modeling and Analysis of Dependable Aplication Models

No Source Code. EEC 521: Software Engineering. Specification-Based Testing. Advantages

ISO Compliant Automatic Requirements-Based Testing for TargetLink

A multi-view approach for component based design

Designing a System Engineering Environment in a structured way

Practical Model-based Testing With Papyrus and RT-Tester

Week 9 Implementation

Modeling Requirements

Automatic test generation based on functional coverage

Black Box Testing. EEC 521: Software Engineering. Specification-Based Testing. No Source Code. Software Testing

Towards Open Modular Critical Systems

Three General Principles of QA. COMP 4004 Fall Notes Adapted from Dr. A. Williams

A Structured Approach for Efficient Model-Based Testing in Large IT Projects

Model Driven Architecture based Testing Tool based on Architecture Views

Software Verification and Validation (VIMMD052) Introduction. Istvan Majzik Budapest University of Technology and Economics

!MDA$based*Teaching*and* Research*in*Software*Engineering*!

Automatic Code Generation Technology Adoption Lessons Learned from Commercial Vehicle Case Studies

DRYING CONTROL LOGIC DEVELOPMENT USING MODEL BASED DESIGN

ECE 587 Hardware/Software Co-Design Lecture 12 Verification II, System Modeling

TDL. bridging the gap between specifications and testing. Dr. Gusztáv Adamis Dr. GyÖrgy réthy Ericsson Hungary Test Solutions and Competence Center

Sample Exam Syllabus

ISO compliant verification of functional requirements in the model-based software development process

UML 2.0 UML 2.0. Scott Uk-Jin Lee. Division of Computer Science, College of Computing Hanyang University ERICA Campus

Verification and Validation. Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 22 Slide 1

The Bizarre Truth! Automating the Automation. Complicated & Confusing taxonomy of Model Based Testing approach A CONFORMIQ WHITEPAPER

An Information Model for High-Integrity Real Time Systems

Platform modeling and allocation

L04. Model-based Testing: Principles Henry Muccini. Dipartimento di Informatica, Universityof L Aquila

Introducing MBT to Standardization. ETSI All rights reserved

Hardware/Software Co-design

Simulink to Embedded Hardware Paul Peeling MathWorks

Test Architect A Key Role defined by Siemens

Assertion and Model Checking of SystemC

Test and Verification Solutions. ARM Based SOC Design and Verification

Reuse of Hardware Independent Test Sequences across MiL-, SiL- and HiL-Test Scenarios

UML-Based Modeling of Roaming with Bluetooth Devices

Testing! Prof. Leon Osterweil! CS 520/620! Spring 2013!

Adaptation of Model Based Testing to Industry

TEST DERIVATION AND REUSE USING HORIZONTAL TRANSFORMATION OF SYSTEM MODELS. Jenis Kavadiya

Model based testing and Hardware-in-the-Loop simulation of embedded CANopen control devices

Functional Safety and Safety Standards: Challenges and Comparison of Solutions AA309

SE 2730 Final Review

Integrity 10. Curriculum Guide

Specification-based test design

CTFL -Automotive Software Tester Sample Exam Paper Syllabus Version 2.0

Separation of Transitions, Actions, and Exceptions in Model-based Testing

ETSI ES V1.1.1 ( )

Requirements and Design Overview

1 Visible deviation from the specification or expected behavior for end-user is called: a) an error b) a fault c) a failure d) a defect e) a mistake

Joint Agile Delivery Phase 3

Agile Tester Foundation E-learning Course Outline

Specification and Testing of Banknote Processing Systems with Coloured Petri Nets

Effective Verification Strategies for Distributed Body Control Applications based on Plant Modeling and Test Case Reuse

RE for Embedded Systems - Part 1

T : Protocol Design

Formal Verification and Automatic Testing for Model-based Development in compliance with ISO 26262

OMG Systems Modeling Language Tutorial May, 2012

Semantics-Based Integration of Embedded Systems Models

Automated model-based test generation and execution

Lecture 16: (Architecture IV)

Implementation Work Flow. CSC 532: Advanced Software Engineer Louisiana Tech University

Selection of UML Models for Test Case Generation: A Discussion on Techniques to Generate Test Cases

MATT: Multi Agents Testing Tool Based Nets within Nets

Objectives. Explain the purpose and objectives of objectoriented. Develop design class diagrams

Model-Based Design for effective HW/SW Co-Design Alexander Schreiber Senior Application Engineer MathWorks, Germany

Masterarbeit. Test Case Generation using Model Transformations

Software architecture in ASPICE and Even-André Karlsson

model centric Testing (.mzt)

Sequence Diagrams. Massimo Felici. Massimo Felici Sequence Diagrams c

SWE 760 Lecture 1: Introduction to Analysis & Design of Real-Time Embedded Systems

DIVERSITY TG Automatic Test Case Generation from Matlab/Simulink models. Diane Bahrami, Alain Faivre, Arnault Lapitre

Deriving safety requirements according to ISO for complex systems: How to avoid getting lost?

Variants and Traceability as the Challenge

Background Project Purpose & Goals. SW Reliability Statistical Testing Model Based Specification and Testing

Generating system documentation augmented with traceability information, using a central XML-based repository

Case Study Experiences from the DIAMONDS Project 8 th ETSI Security Conference January, Sophia Antipolis - France

Transcription:

V&V: Model-based testing Systems Engineering BSc Course Budapest University of Technology and Economics Department of Measurement and Information Systems

Traceability Platform-based systems design Verification and Validation Requirements HW library Functional model HW/SW allocation Platform model Fault tolerance & safety Component behav. model Architecture model Config. model Source code code generation Compiler Linker code generation Config. file Binary code 2

Learning Objectives Model-based testing Recall what is model-based testing List how models can be used in testing Test modeling Explain the concepts in UML 2 Testing Profile Apply U2TP to specify configurations and scenarios in test models 3

Introduction to MBT 4

What is model-based testing? Testing based on or involving models [ISTQB] Not just test generation Not just automatic execution Not just for model-driven engineering Source of definition: ISTQB. Foundation Level Certified Model-Based Tester Syllabus, Version 2015 5

Landscape of MBT goals Test data creation Tests fully executable Simulation Shared understanding Checking specifications more informal more formal 6

Using models in testing (examples) Behavior of SUT Test configuration timer t; t.start(5.0); alt { [] i.receive("coffee") { Count := Count+1; } [] t.timeout { } } Test sequences Test sequences Source: OMG UTP 7

Benefits of using models Close communication with stakeholders o Understanding of domain and requirements Early testing: modeling/simulation/generation Higher abstraction level (manage complexity) Automation (different artefacts) 8

More specific meaning: Test generation MBT encompasses the processes and techniques for - the automatic derivation of abstract test cases from abstract models, - the generation of concrete tests from abstract tests, - the manual or automated execution of the resulting concrete test cases Source: M. Utting, A. Pretschner, B. Legeard. A taxonomy of model-based testing approaches, STVR 2012; 22:297 312 9

Typical MBT process State, path, requirement coverage Test model Abstract test case Concretization Source: M. Utting, A. Pretschner, B. Legeard. A taxonomy of model-based testing approaches, STVR 2012; 22:297 312 10

DEMO MBT example Create test model using FSMs Use GraphWalker to generate test sequences Write adaptation to connect to Java code 11

Reuse: Development and Test modeling What if I have existing design models? Problem: what do we test here? Approach: separate dev. and test models A. Pretschner, J. Philipps. Methodological Issues in Model-Based Testing, Model-Based Testing of Reactive Systems, 2005. 12

Example: Model driven workflow Source: Kimmo Nupponen. Model driven workflow, 2016. 13

MBT User Survey 2014 ~100 participants 32 questions - approx. 80h needed to become proficient - MBT is effective - Lots of other details! Overview: Model-based Testing: Where Does It Stand? Source: http://model-based-testing.info/2014/12/09/2014-mbt-user-survey-results/ 14

Recap: Tests in finite state machines (System modeling VIMIAA00 course) Sequence of input events and expected actions Model coverage o State coverage o Transition coverage Selecting tests to achieve coverage goals 15

Note In the current course we will mainly work on test modeling and not automated test generation (see MSc courses on that topic) 16

UML 2 Testing Profile (U2TP)

UML 2 Testing Profile (U2TP) UML profile by OMG Capture information for functional black-box testing (specification of test artifacts) o Mapping rules to TTCN-3, JUnit Language (notation) and not a method (how to test) Defines stereotypes 18

Packages (concept groups) Test Architecture o Elements and relationship involved in test o Importing the UML design model of the SUT Test Data o Structures and values to be processed in a test Test Behavior o Observations and activities during testing Time Concepts o Timer (start, stop, read, timeout), TimeZone (synchronized) 19

Supplying test data Overview of test architecture Driving the SUT; evaluate response Controlling test execution MIL / SIL / HIL / PIL Black box; different levels Connecting to implementation How SUT and test components are connected Source: OMG UTP 20

U2TP Test Architecture package Identification of main components: SUT: System Under Test o Characterized by interfaces to control and observation o System, subsystem, component, class, object Test Component: part of the test system (e.g., simulator) o Realizes the behavior of a test case Test Context: collaboration of test architecture elements o Initial test configuration (test components) o Test control (decision on execution, e.g., if a test fails) Scheduler: controls the execution of test components o Creation and destruction of test components Arbiter: calculation of final test results o E.g., threshold on the basis of test component verdicts 21

Example: U2TP Test Architecture 22 Source: OMG UTP

U2TP Test Data package Identification of types and values for test (sent and received data) Test Parameter (Stimulus and observation) Abstract test data o Wildcards (* or?) o Data Partition: Equivalence class for a given type Concrete test data o Instances with concrete values o Data Selector: Retrieving data out of a data pool 23

Example: U2TP Test Data Equivalence classes (abstract) Concrete values usable in tests 24 Source: UML Testing Profile Tutorial

U2TP Test Behavior package Specification of default/expected behavior Identification of behavioral elements: o Test Stimulus: test data sent to SUT o Test Observation: reactions from the SUT o Verdict: pass, fail, error, inconclusive values o Actions: Validation Action (inform Arbiter), Log Action Test Case: Specifies one case to test the SUT o Test Objective: named element o Test Trace: result of test execution Messages exchanged o Verdict 25

Example: U2TP Test Behavior Data partition Timer Stimulus Observation Duration Verdict Source: OMG UTP 26

Summary of U2TP concepts Test Architecture Test Behavior Test Data Time SUT Test objective Wildcards Timer Test components Test case Logical partition Time zone Test suite Defaults Coding rules Test configuration Verdicts Test control Validation action Arbiter Test trace Utility part Log action 27

Recommended method for using U2TP 1. Define a new package for tests 2. Use interfaces and data types from design model 3. Define test objectives and focus of test 4. Test architecture 1. Assign SUT to tested component/system 2. Define test components 3. Specify test configurations (instances) 5. Test behavior 1. Design test cases (manually) 2. Specify defaults and test data 28

Case study: U2TP Test models for Bluetooth roaming Source: Zhen Ru Dai et al. From Design to Test with UML: Applied to a Roaming Algorithm for Bluetooth Devices, TestCom 2004, pp 22-49 29

About the case study Bluetooth: short-range wireless communication Standard: HW (radio, baseband) + SW (protocol) Roaming algorithm: o Master devices connected to LAN o Slave devices move, may loose connection to master o Roaming: Check periodically the quality of link to master Select a new master if necessary

Components and protocol stack Test objective: Slave Roaming Layer functionality o Monitoring link quality o Connecting to a different master 31

Possible test levels and setups (1) Component/module test with software Test component Test component 32

Possible test levels and setups (2) Integration test with software Test component Test component / emulator 33

Possible test levels and setups (3) Integration test with software Test component Test component Emulator 34

Possible test levels and setups (4) System test with hardware Test component Test component Moving physical devices or wireless test chamber 35

Refining test objective Slave Roaming Layer functionality 1. Is the Slave Roaming layer able to choose a new master by looking up its roaming list when the connection with its current master gets weak? 2. Does the Slave Roaming layer request a connection establishment to the chosen master? 3. Does the Slave Roaming layer wait for a connection confirmation of the master when the connection has been established? 4. Does the Slave Roaming layer send a warning to the environment, when no master can be found and the roaming list is empty? 36

Selected test configuration SUT Multiple masters 37

U2TP Test architecture: components Test package Test context 38

U2TP Test architecture: configuration Test configuration 39

Test behavior Selecting test scenarios for test objectives Objective: o Choosing new master when the connection with its current master gets weak Scenario 1: o After the exchange of two data packages, the link quality between Slave and its current master m1 becomes bad. The first alternative master in the roaming list m2 cannot be reached since the link quality is also weak. Thus, after at most two seconds, a further master m3 is chosen from the roaming list and the connection is established successfully. 40

Test scenario 41

Test scenarios (details) Sequence diagrams Default behaviors specified to catch the observations that lead to verdicts Here: Processing timer events 42

Summary 43