+ All Categories
Home > Documents > Qualitätssicherung von Software (SWQS)

Qualitätssicherung von Software (SWQS)

Date post: 08-Jan-2016
Category:
Upload: yetta
View: 26 times
Download: 2 times
Share this document with a friend
Description:
Qualitätssicherung von Software (SWQS). Prof. Dr. Holger Schlingloff Humboldt-Universität zu Berlin und Fraunhofer FOKUS. 15.7.2014: Modellbasierter Test (Jaroslav Svacina). Specification-based Testing. Constructing the test suite from the specification - PowerPoint PPT Presentation
27
Qualitätssicherung von Software (SWQS) Prof. Dr. Holger Schlingloff Humboldt-Universität zu Berlin und Fraunhofer FOKUS 15.7.2014: Modellbasierter Test (Jaroslav Svacina)
Transcript
Page 1: Qualitätssicherung von Software (SWQS)

Qualitätssicherung von Software (SWQS)

Prof. Dr. Holger Schlingloff

Humboldt-Universität zu Berlinund

Fraunhofer FOKUS

15.7.2014: Modellbasierter Test (Jaroslav Svacina)

Page 2: Qualitätssicherung von Software (SWQS)

Folie 3H. Schlingloff, Software-Qualitätssicherung

Specification-based Testing

• Constructing the test suite from the specification as opposed to constructing it from the implementation

(= code-based testing)

code-based testing cannot detect missing requirements specification-based testing cannot detect additional

(unspecified) features

specifiedbehaviour

implementedbehaviour

testedbehaviour

Page 3: Qualitätssicherung von Software (SWQS)

Folie 4H. Schlingloff, Software-Qualitätssicherung

Model-based Testing

• SUT is compared to a formal model (requirements)

• Automation of test case design• Early validation of requirements• Traceability• Easy maintenance of test suites for regression

testing

Page 4: Qualitätssicherung von Software (SWQS)

Folie 5H. Schlingloff, Software-Qualitätssicherung

Model-based Design and Model-based Testing

• Often: same syntax, different pragmatics e.g. test cases can be formulated in Java e.g. system spec can be formulated with LTL

Requirements

System Spec Test Spec

System Model

System Impl. Test Cases

Test Model

Page 5: Qualitätssicherung von Software (SWQS)

Folie 6H. Schlingloff, Software-Qualitätssicherung

System models vs. Test models

• Models can help in the development of complex systems

• The more concrete the formalism, the closer it is to an implementation executable code may be generated from state

diagrams We might add additional information such as timing,

communication, variables and such.

• Test model as opposed to implementation model describes properties of the targeted system not aiming at a complete description of the system not aiming at the generation of executable code

Page 6: Qualitätssicherung von Software (SWQS)

Folie 7H. Schlingloff, Software-Qualitätssicherung

Model-based Testing

Page 7: Qualitätssicherung von Software (SWQS)

Folie 8H. Schlingloff, Software-Qualitätssicherung

Model-based Testing

Page 8: Qualitätssicherung von Software (SWQS)

Folie 9H. Schlingloff, Software-Qualitätssicherung

Modelling

• Describe system requirements for test generation

• High abstraction level

Page 9: Qualitätssicherung von Software (SWQS)

Folie 11H. Schlingloff, Software-Qualitätssicherung

Modelling Notations

•Pre/Post (state based) notations State variables, operations

(pre-/postcondition) B, SpecExplorer (c#), UML OCL

•Transition based notations Focus on describing the transitions between

states of the system UML State Machines, Simulink State Flow

•…

Page 10: Qualitätssicherung von Software (SWQS)

Folie 12H. Schlingloff, Software-Qualitätssicherung

Example: A Kitchen Toaster

•A toaster what is the

technical process? what are the states,

events and signals of the (technical) process?

what are the boundaries of the system? which information processing is to be done? what are the interfaces between technical

system and information processing component?

Page 11: Qualitätssicherung von Software (SWQS)

Folie 13H. Schlingloff, Software-Qualitätssicherung

Modeling the Toaster

• User Interfaces: turning knob, side lever, stop button

• Internals: heating element, retainer latch

• Extra: defrost button

• First approach: timing is neglected (timer event)

• Advanced approach: timing depends on various parameters

Page 12: Qualitätssicherung von Software (SWQS)

Folie 14H. Schlingloff, Software-Qualitätssicherung

Toaster – Simple State Machine

Page 13: Qualitätssicherung von Software (SWQS)

Folie 15H. Schlingloff, Software-Qualitätssicherung

Toaster – Hierarchical Design

Page 14: Qualitätssicherung von Software (SWQS)

Folie 16H. Schlingloff, Software-Qualitätssicherung

Toaster – with Variables

Page 15: Qualitätssicherung von Software (SWQS)

Folie 17H. Schlingloff, Software-Qualitätssicherung

Test Generation

Page 16: Qualitätssicherung von Software (SWQS)

Folie 18H. Schlingloff, Software-Qualitätssicherung

Test Generation

•Algorithm Graph traversal yields abstract test cases

- Dijkstra shortest path algorithm

- Depth-first and breadth-first search

Evolutionary algorithm

•Model Transformation

•Static analysis for input parameters Partition Testing Classification tree method Boundary value analysis

Page 17: Qualitätssicherung von Software (SWQS)

Folie 19H. Schlingloff, Software-Qualitätssicherung

All-States with Dijkstra and DFS

Page 18: Qualitätssicherung von Software (SWQS)

Folie 20H. Schlingloff, Software-Qualitätssicherung

Evolutionary Test Generation

Page 19: Qualitätssicherung von Software (SWQS)

Folie 22H. Schlingloff, Software-Qualitätssicherung

Test Selection

Page 20: Qualitätssicherung von Software (SWQS)

Folie 23H. Schlingloff, Software-Qualitätssicherung

Test Generation from State Machines

•Define a test case to be any execution path•How to generate such paths? How many

paths to generate? When to stop testing? Coverage criteria e.g.

all-states all-transitions all-transition-pairs all-n-paths

•Test goal: one particular item to be covered

Page 21: Qualitätssicherung von Software (SWQS)

Folie 25H. Schlingloff, Software-Qualitätssicherung

Tests for State Machines

• For a state machine, a test case is just a finite sequence of external triggers and actions

• A test goal is a particular entity of the state machine (region, pseudostate, transition, n-path, …; for each test and goal it is defined whether the test reaches this goal

• The coverage of a test suite is the percentage of reached test goals the coverage can either be measured during the

execution of a test suite, or statically before execution

Page 22: Qualitätssicherung von Software (SWQS)

Folie 26H. Schlingloff, Software-Qualitätssicherung

Coverage for State Machines

• common coverage criteria for UML state machines all-states all-transitions all configurations: all combinations of parallel substates n-transition-coverage means all reachable transition

sequences of length n are covered (esp.: pairs) All-loop-free-paths All-n-loop-paths decision coverage, condition coverage, MC/DC, ...

• all-requirements

Page 23: Qualitätssicherung von Software (SWQS)

Folie 27H. Schlingloff, Software-Qualitätssicherung

Szenarien als Testselektionskriterium• Schwierige, nicht ausreichende Möglichkeiten zur

Beschreibung der Testselektionskriterien

• Einflussnahme der Domänenexperten auf den Testselektionsprozess

Page 24: Qualitätssicherung von Software (SWQS)

Folie 28H. Schlingloff, Software-Qualitätssicherung

Szenarien als Testselektionskriterium

Page 25: Qualitätssicherung von Software (SWQS)

Folie 29H. Schlingloff, Software-Qualitätssicherung

Automated Test Generation Tools

• More than a dozen commercial and experimental research tools available

• Usually quite costly (>10K€ per license)

• Mostly from UML State Machines

• Comparison e.g. by mutation analysis

Page 26: Qualitätssicherung von Software (SWQS)

Folie 30H. Schlingloff, Software-Qualitätssicherung

Conformiq

Page 27: Qualitätssicherung von Software (SWQS)

Folie 31H. Schlingloff, Software-Qualitätssicherung

ParTeG – Partition Test Generator

• Since we didn’t like the pricing, and wanted to experiment with different technologies, a Ph.D. student built his own… http://parteg.sourceforge.net/

• UML class & state transition diagrams, connected by OCL • Plugin for Eclipse, supports XMI import / export


Recommended