bdd-dsl

Logo

Metamodels and associated toolings for applying Behaviour-Driven Development (BDD) to test robotic scenarios.

View the Project on GitHub secorolab/bdd-dsl

Model-Based BDD for Robotics

This is the landing page for the associated tooling to support the specification and execution of acceptance tests for robotic applications using the Behaviour-Driven Development (BDD)1 methodology. BDD complements the ExSce by introducing the scenario view on the robotic system using a Given-When-Then cascade. The “Given” clause captures the pre-conditions including the robotic system and its state, the “When” clause describes an event that the system should react to, while the “Then” clause specifies the desired or expected behaviour. However, applying traditional BDD approaches to MRS applications can be challenging due to the complex interplay of multiple variability dimensions and domains involved in describing robotic scenarios. To address these challenges more effectively, bdd-dsl introduces a metamodel for defining composable BDD scenario templates that can be customized to specific robotic use cases. The metamodel design takes inspiration from a similar approach used for managing data structures 2 and is further supported by an analysis of competition rulebooks to identify the variability dimensions that may arise when evaluating robotic scenarios 3.

This library is one of the tools developed for the Executable Scenario Workbench

Quick start

Installation

  1. Install rdf-utils
  2. Install bdd-dsl with pip install

Gherkin generation & mockup execution with behave

A mockup test execution setup with behave is available for trying out our models. To run this setup:

  1. Generate the Gherkin feature using the generate_bdd_specs.py script. This should create a *.feature file under the examples/generated directory.
  2. Execute behave under examples/generated should run the mockup setup.

An execution setup with Nvidia Isaac Sim is available at the minhnh/bdd-isaacsim-exec repository.

Tutorials

Details on the design of the metamodel and tutorials on how to compose and transform BDD models can be found on the following pages:

  1. Concepts and relations for specifying robotic scenarios
  2. Tutorial: Modelling a pickup task as JSON-LD graphs and generating Gherkin features
  3. Tutorial: Modelling & executing BDD tests for a pickup task (WIP)

Acknowledgement

This work is partly funded by the SESAME H2020 project, under grant agreement No 101017258.

References

  1. D. North, “Behavior Modification: The evolution of behaviour-driven development”, Better Software, 2006 (Original blog post). 

  2. M. Alferez, F. Pastore, M. Sabetzadeh, et al., “Bridging the Gap between Requirements Modeling and Behavior-Driven Development,” 22nd MODELS, 2019, doi: 10.1109/MODELS.2019.00008

  3. M. Nguyen, N. Hochgeschwender, S. Wrede, “An analysis of behaviour-driven requirement specification for robotic competitions”, 5th International Workshop on Robotics Software Engineering (RoSE’23), May 2023.