Behaviour-driven model development and test-driven model review

Behaviour-Driven Model Development and Test-Driven Model Review combines Behaviour-Driven Development concepts, Model-Driven Development and Model-Based Testing to auto-generate code and associated tests.
Develop high-quality behaviour models in UML that are fit for test and code generation. High-quality functional tests are a side-product. The model can also be used to generate non-functional tests.

Behaviour-Driven Model Development and Test-Driven Model Review combines Behaviour-Driven Development [BHM1] concepts, Model-Driven Development and Model-Based Testing in the following steps:

  1. Define the test interface as methods and signal receptions in UML class diagrams
  2. Express scenarios from the requirements as UML sequence diagrams
  3. Model the required behaviour as UML state machine diagrams
    • While doing so, continually run the scenarios from the sequence diagrams against the state machines. The modeler gets feedback which scenarios do not run through yet and where they get stuck.
  4. Validate, that the scenarios work on the finished state machine models
  5. Evaluate coverage of the scenarios on the state machines
  6. Generate a minimal set of tests to complete the coverage
  7. Review the generated tests – they represent all behaviour that might have been unintentionally added while modelling the state machines.
    • Go back and change the model and the initial scenarios, if necessary and repeat.
  8. Use the model to generate code
  9. Run the original and the generated scenarios against
    • the generated code (to exclude problems introduced by the code generator)
    • the target compiled code (to exclude problems introduced by the compiler or the platform)
    • the deployed binary in the target environment (to exclude problems introduced by the environment and production periphery)

The approach has been described in more detail in [BHM2], it is similar to Behaviour-Driven Formal Model Development [BHM3].

  • Produces high-quality behaviour models
  • Enables domain experts to review the model indirectly by reviewing scenarios
  • Only limited tool support available yet
  • [BHM1] Solis and X. Wang, “A study of the characteristics of behaviour-driven development,” in2011 37th EUROMICRO Conference on Software Engineering and Advanced Applications, pp. 383–387.
  • [BHM2] Schlick R., Krenn W. (2019) Tackling the Challenges of Internet-of-Things-Development using Models. 2ndInternational Workshop on Embedded Software for the Industrial IOT, DATE, Florence, 2019.
  • [BHM3] Snook C. et al. (2018) Behaviour-Driven Formal Model Development. In: Sun J., Sun M. (eds) Formal Methods and Software Engineering. ICFEM 2018. Lecture Notes in Computer Science, vol 11232. Springer, Cham. https://doi.org/10.1007/978-3-030-02450-5_2
Method Dimensions
In-the-lab environment, Closed evaluation environment
Experimental - Testing, Analytical - Formal, Analytical - Semi-Formal
Hardware, Model, Software
Integration testing, Unit testing, Detail Design
Thinking, Acting, Sensing
Functional
V&V process criteria
Relations
Contents

There are currently no items in this folder.