1 / 49

UML Testing Profile Tutorial

UML Testing Profile Tutorial. MBT User Conference, 18 th of October 2011 Marc-Florian Wendland, Ina Schieferdecker, Markus Schacher, Armin Metzger. Understand what UTP is and what it was made for Get an overview of the current status of UTP Become acquainted with its main concepts

eydie
Download Presentation

UML Testing Profile Tutorial

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. UML Testing Profile Tutorial MBT User Conference, 18th of October 2011 Marc-Florian Wendland, Ina Schieferdecker, Markus Schacher, Armin Metzger

  2. Understand what UTP is and what it was made for Get an overview of the current status of UTP Become acquainted with its main concepts Insight into real-world UTP-based projects Demonstrate newly incorporated test management capabilities Quo vadis, UTP? Introduction UTP Tutorial – MBT UC 2011 What is the goal of this tutorial? Clear-up myths and legends around UTP

  3. Introduction UTP en detail UTP @ Work • Modelling with UTP • Model-based test management • UTP in a safety-critical domain Outlook UTP Tutorial – MBT UC 2011

  4. Introduction UTP en detail UTP @ Work • Modelling with UTP • Model-based test management • UTP in a safety-critical domain Outlook UTP Tutorial – MBT UC 2011

  5. UML natively lacks concepts for testing of systems/software Domain-independent specification of test concepts based on UML A language for creation, documentation, visualization, specification and exchange of model-based test specifications Defines two complementary specifications • A native UML profile (for combination with UML) • A standalone MOF-based metamodel (using UTP without UML) Introduction UTP Tutorial – MBT UC 2011 What is UTP and if so, how many?

  6. 2001: RFP for a test-related UML profile 2003: Initial submission elaborated by testers, UML and test solution vendors • Industrial members (a.o. Ericcson, Telelogic, IBM, Softeam) • Academic members (a.o. Fraunhofer FOKUS, University Luebeck) 2005: Final adopted version 1.0 released by the OMG June 2010: UTP 1.1 RTF was chartered June 2011: UTP 1.2 was chartered Introduction UTP Tutorial – MBT UC 2011 History

  7. Provide a set of domain-/process-independent, test-related concept for the definition of test models • Reuse or combine the UTP with other domain-specific profiles of the OMG like MARTE, SysML, SoaML, … Reuse the benefits of model-driven development • Raised level of abstraction • Use Model-to-Model transformations • Use Model-to-Code transformations Bridging the gap! Introduction UTP Tutorial – MBT UC 2011 Targets of the UML Testing Profile

  8. UTP was/is not widespreadly used in industry • Lack of experiences with UML 2 • Insufficient support of mature UML 2 tools • Model-based testing was/is rather academic „vodoo“ • Lack of test modeling knowledge with UML (and UTP) Criticisms of UTP • Insufficient tool support • Missing methodology, guide lines, experience reports … • Inadequate readability of the specification document • MOF-based metamodel and native UML profile was confusing Introduction UTP Tutorial – MBT UC 2011 UTP Perception until now UTP was ahead of its time

  9. Domain-independent testmodelling • Test basis • Test specifiction Test casespecification • Abstract/concrete vs. logical/technical Test dataspecification Test deployment Test resultvisualisation Combinationwithotherprofiles (SysML, MARTE, SoaML) … Introduction UTP Tutorial – MBT UC 2011 What is UTP made for…

  10. Test casegeneration White-Box approaches Audits and Reviews Test management (partiallyaddressed) Test methodology Introduction UTP Tutorial – MBT UC 2011 …and what is out of scope?

  11. Introduction UTP en detail UTP @ Work • Modelling with UTP • Model-based test management • UTP in a safety-critical domain Outlook UTP Tutorial – MBT UC 2011

  12. UTP en detail UTP Tutorial – MBT UC 2011 UML is a GPL • Appropriate for object-oriented/component-based analysis/design • Some (important) concepts out of scope, e.g. requirememts, testing, service-oriented concepts, embedded and real-time systems UML can be leveraged for the design of a domain-specific language (DSL) • UML vs. DSL – A false dichotomy? • Different extension mechanism Profiling is a native UML mechanism • Indirect extension of UML Superstructure • Allows to add new features/constraints to existing metaclasses What is a UML Profile?

  13. UTP en detail UTP Tutorial – MBT UC 2011 Origin of UML Testing Profile

  14. Test Architecture • Architectural foundation to create test architectures Test Behavior • Behavioral additions and test-specific actions for test case behavior Test Data • Concepts to define data partitions, data pools and wildcards Timer Concepts • Imperative timer mechanism Test Management • Optional concepts for model-based test management UTP en detail UTP Tutorial – MBT UC 2011 Parts of UML Testing Profile

  15. UTP en detail UTP Tutorial – MBT UC 2011 TestContext is the outmost concept in UTP for • test case grouping • test configuration definition • test control specification TestComponent is intended to stimulate the SUT and to evaluate its (expected) outcome SUT (system under test) represents the test object for a particular test context Arbiter is a predefined interface for verdict calculation and assignment UTP Test Architecture

  16. UTP en detail UTP Tutorial – MBT UC 2011 TestCase marks operations or behaviors as test case specifications. They comprise the respective test steps that represent the interaction between test components and SUT (e.g. the expected test data instances that are exchanged) Verdict reprsents the final conclusion of a test case. The precedence of the predefined verdict kinds is: none < pass < inconclusive < fail < error TestObjective describes the purpose for realization and execution of a test case Test Behavior – Test Cases and Objectives

  17. UTP en detail UTP Tutorial – MBT UC 2011 ValidationAction is used to set/calculate the verdict of a test case, or a single test step. LogAction enables the tester to capture log traces for further analysis FinishAction allows the termination of a test component for a particular test case determAlt calculates the entry conditions of CombinedFragments in a deterministic way Test Behavior – Test Actions

  18. UTP en detail UTP Tutorial – MBT UC 2011 Default behavior for outsourcing the handling of unexpected reactions of the SUT are described as autarcic behavior TestLog describes the traces of an actual execution of a test case (e.g. the real instances of data that are exchanged among test components and SUT) Respective applications bind both concepts to corresponding test cases or test steps Test Behavior – Defaults and Logs

  19. UTP en detail UTP Tutorial – MBT UC 2011 DataPartition allows the definition of logical partitions of test-relevant data types. DataPartitions can be created from scratch or reuse existing type definitions DataPool is used for the specification of data tables that can be used for repeated test case execution Instances of DataPartition and DataPool represent concrete test data instances, which are used to test case execution Test Data

  20. UTP en detail UTP Tutorial – MBT UC 2011 LiteralAny/LiteralAnyOrNull are used to express wildcards for concret test data instances. • Targets an easier creation of test data instances • Allows a tester to focus only on the relevant parts of test data instances CodingRule defines how values of messages shall be decoded/encoded for communication between the SUT and test components (e.g.ASN.1, SOAP …) Test Data

  21. UTP en detail UTP Tutorial – MBT UC 2011 Time is a primitive type for an abstract description of time units within test case executions Timer is a predefined interface that represents the timer handling interface of the test execution environment. It is responsible to manage the creation and expiration of timers used by test components within a test case. Start-/Stop-/ReadTimerActions are used in the test case execution to call the operations of the Timer interface Timer Concepts

  22. UTP en detail UTP Tutorial – MBT UC 2011 Test Management Will be discussed in greater detail later on

  23. Introduction UTP en detail UTP @ Work • Modelling with UTP • Model-based test management • UTP in a safety-critical domain Outlook UTP Tutorial – MBT UC 2011

  24. Modelling with UTP Structural test modelling • Test architecture • Test configuration Behavioral test modelling • Abstract/concrete vs. logical/technical test cases Test data modelling • Stimuli and oracles • Data partitions and data pools Modelling with UTP UTP Tutorial – MBT UC 2011 Outline

  25. Modelling with UTP UTP Tutorial – MBT UC 2011 Views on a Test Model Test model Test Basis Model Test Specification Model generates Test Cases directly (e.g. Interactions) Behavioral descriptions used for test case generation (e.g. State Machines)

  26. Modelling with UTP UTP Tutorial – MBT UC 2011 Modelling with UTP (2)

  27. Modelling with UTP UTP Tutorial – MBT UC 2011 Modelling with UTP (2) requirements, use cases, interfaces, type definitions

  28. Structural elements are the foundational concepts in UML • No disembodied behavior, i.e. behavior exists only in combination with structure • Allows the visualiuation of structural/architectural view on the system Test structure describes the structure of a system and the test system from a tester‘s point of view Analysis and identification of the test objects Configuration of environmental model for the SUT Modelling with UTP UTP Tutorial – MBT UC 2011 Structural test modelling

  29. Modelling with UTP UTP Tutorial – MBT UC 2011 Structural test modelling (2) Test Object Communication Ports

  30. Modelling with UTP UTP Tutorial – MBT UC 2011 Structural test modelling (3) Test Object Extended Test Object Test-specific extensions

  31. Modelling with UTP Structural test modelling (4) Mirrored Test Component

  32. Modelling with UTP UTP Tutorial – MBT UC 2011 Structural test modelling (5)

  33. Modelling with UTP UTP Tutorial – MBT UC 2011 Structural test modelling (6)

  34. Modelling with UTP UTP Tutorial – MBT UC 2011 Structural test modelling (7)

  35. Modelling with UTP UTP Tutorial – MBT UC 2011

  36. Test behavior provides a tester‘s view of how the system should be used according to its requirements specification All UML behavior types usable! Test behaviors may vary in their degree of maturity • Abstract/concrete vs. logical/technical Test behavior expressed as • behavioral description of the SUT (within the SUT) • behavioral description of test components • direct interaction among SUT and test components • global representation of the interaction Modelling with UTP UTP Tutorial – MBT UC 2011 Behavioral test modelling

  37. Modelling with UTP UTP Tutorial – MBT UC 2011 Most literaturedistinguishbetweenabstractandconcretetestcase • Abstracttestcasesomitstestdata • Concreteincorporatestestdata This distinctionis not sufficient! Test casetermcanbefurhterrefinedinto • Logical (whatshallthetestverify/check?), and • Technical (howshallitcommunicatewiththe SUT?) testcases Eachcanbeabstractorconcreteregardingtestdata! Logical/Technical vs. Abstract/Concrete

  38. Modelling with UTP UTP Tutorial – MBT UC 2011 A logical test case describe what a test case shall verify – not how! Can be created, read, reviewed by a domain expert Logical test case specification Logical concrete Logical abstract Test Data flow

  39. Modelling with UTP UTP Tutorial – MBT UC 2011 Technical test case specification concrete abstract Timerstart send via Connector Message arguments DetermAlt Timerstop Validation Action Timerexpired Validation Action

  40. Modelling with UTP UTP Tutorial – MBT UC 2011 Application of Defaults

  41. Test datais vital fortesting „Data that exists (for example, in a database) before a test is executed, and that affects or is affected by the (test) component or system under test.“ [ISTQB] UTP Test Datacanbeusedtodefine • Data partitions (equivalenceclass) andrespectiverepresentatives • Data structures (classificationtrees, equivalenceclasstables) Modelling with UTP UTP Tutorial – MBT UC 2011 It‘s all about data exchange…

  42. Modelling with UTP UTP Tutorial – MBT UC 2011 Test data modelling – Data Partitions for Types

  43. Modelling with UTP UTP Tutorial – MBT UC 2011 Test data modelling – Data Partitions for Operations

  44. Modelling with UTP UTP Tutorial – MBT UC 2011 Test data modelling – Data structures • Equivalence class tables / Boundary value anaylsis • Rules for Equivalence Class Table-based test case specification

  45. Modelling with UTP UTP Tutorial – MBT UC 2011 Test data modelling – Data structures 1..*

  46. Modelling with UTP UTP Tutorial – MBT UC 2011 Test data modelling – Data structures (3) Parametrized test case Data table access

  47. Modelling with UTP UTP Tutorial – MBT UC 2011 Test data modelling – Data structures (2) instanceof instanceof instanceof

  48. Modelling with UTP Test data modelling – Data structures (2) bind bind

  49. Introduction UTP en detail UTP @ Work • Modelling with UTP • Model-based test management • UTP in a safety-critical domain Conclusion and Outlook UTP Tutorial – MBT UC 2011

More Related