Automatic Interleaving for Testing Distributed Systems Mihal - - PowerPoint PPT Presentation

automatic interleaving for testing distributed systems
SMART_READER_LITE
LIVE PREVIEW

Automatic Interleaving for Testing Distributed Systems Mihal - - PowerPoint PPT Presentation

Automatic Interleaving for Testing Distributed Systems Mihal Brumbulli and Emmanuel Gaudin PragmaDev ERTS2 January 2016, Toulouse, France Introduction Constant ever-growing interest for large-scale distributed systems The Internet of


slide-1
SLIDE 1

Automatic Interleaving for Testing Distributed Systems

Mihal Brumbulli and Emmanuel Gaudin PragmaDev

ERTS2 January 2016, Toulouse, France

slide-2
SLIDE 2

Introduction

  • Constant ever-growing interest for large-scale

distributed systems

– The Internet of Things interconnects billions of smart objects

  • Complex applications due to heterogeneity

and distribution scale

– Testing is not a trivial task

slide-3
SLIDE 3

Motivation

  • Operation of nodes is not isolated

– Test cases must account for the distribution and interaction between nodes

  • Existing test cases have to be adapted to consider

distribution

– Introduce concurrency handling into test cases (need to modify existing test cases) – Controlled concurrent execution that deals with all relevant interleavings (need to control execution, e.g., scheduler)

slide-4
SLIDE 4

TECHNOLOGY

Specification and Description Language (ITU-T) Unified Modeling Language (OMG) Testing and Test Control Notation Version 3 (ETSI)

slide-5
SLIDE 5

Structure & Behavior

slide-6
SLIDE 6

Deployment & Test

slide-7
SLIDE 7

INTERLEAVING

What are the effects of distributed execution of test cases? Rewrite the test cases or execute them in parallel? Can we simulate parallelism efficiently?

slide-8
SLIDE 8

Problem

  • Concurrent execution of 𝑳 test cases

– with 𝒐𝒋 instructions for 𝒋 = 𝟐, 𝟑, … 𝑳 – the number of all interleavings is

𝑱 = ∑ 𝒐𝒋

𝑳 𝒋=𝟐

! ∏ 𝒐𝒋!

𝑳 𝒋=𝟐

  • Concurrent execution of 𝑳 instances of the same test case

– with 𝒐𝒋 = 𝑶 ∀𝒋 instructions – the number of all interleavings is

𝑱 = 𝑳𝑶 ! 𝑶! 𝑳

  • Typical case of the state-explosion problem which makes execution of all

interleavings unpractical. However, …

slide-9
SLIDE 9

Solution

  • Not all interleavings are relevant

– Distribution may affect behavior only if there is an interaction between nodes – If the execution of a test case does not involve any interaction, then distribution will not have any impact

  • Interleave execution at critical points

– instructions that trigger interaction between nodes

slide-10
SLIDE 10
  • Group the instructions and then interleave execution of the groups
  • Each group must include at most one instruction which triggers

interaction 𝒏𝟐

𝟏, 𝒏𝟑 𝟐, 𝒏𝟒 𝟏, 𝒏𝟓 𝟐, 𝒏𝟔 𝟐, 𝒏𝟕 𝟏, 𝒏𝟖 𝟐, 𝒏𝟗 𝟏, 𝒏𝟘 𝟏, 𝒏𝟐𝟏 𝟐

𝒉𝟐 𝒉𝟑 𝒉𝟒 𝒉𝟓 𝒉𝟔

  • 𝒏𝒋

𝒌 is an instruction in the test case

– 𝒋 = 𝟐, 𝟑, … 𝑶 is the index (relative order) of the instruction, – 𝒌 = 𝟏, 𝟐 if the given instruction triggers (or not) any interaction

  • A group consists of all subsequent 𝒏𝒋

𝒌 for which ∑ 𝒌 ≤ 𝟐

Algorithm

slide-11
SLIDE 11

SIMULATION

Normal mode: execute test case and mark instructions that trigger interaction based on the deployment diagram Interleaving mode: automatically generate and execute all interleavings

slide-12
SLIDE 12

PragmaDev Co-Simulator

slide-13
SLIDE 13

Example

  • Access system has

terminals and a central unit

– Terminal has a slot for the card and a keypad for the key – Central unit checks whether access should be granted to a user

  • A user can be either

administrator or normal

slide-14
SLIDE 14

Example

  • Test case: try to get in and out of administrator

mode

– 1 interleaving point; 2 groups – 2 terminals; 6 interleavings to execute – not much to expect, however… – one terminal blocked indefinitely waiting for a reply from the central unit!

  • Other 4 problems with the system were identified

in the same way

slide-15
SLIDE 15

Conclusions

  • The algorithm may not always produce significantly

less interleavings

– Degree of interaction between nodes – High degree is more an exception than the rule

  • Successful application of the approach with a simple

example

– Working on more complex systems

  • The approach is based on simulation

– Cannot be applied (at present) for test cases on real target

slide-16
SLIDE 16

THANK YOU!

Questions?