From 55e17d23c133681cf4a6a24e5190216f5378f1e8 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 27 Jul 2020 14:54:13 +0200 Subject: validation: Add ability to skip action transitions --- spec/spec/requirement-action-skip-reasons.yml | 27 ++++++++++++++++++++++++ spec/spec/requirement-action-transition-post.yml | 10 +++++++++ spec/spec/requirement-action.yml | 4 ++++ 3 files changed, 41 insertions(+) create mode 100644 spec/spec/requirement-action-skip-reasons.yml (limited to 'spec/spec') diff --git a/spec/spec/requirement-action-skip-reasons.yml b/spec/spec/requirement-action-skip-reasons.yml new file mode 100644 index 00000000..75be7ede --- /dev/null +++ b/spec/spec/requirement-action-skip-reasons.yml @@ -0,0 +1,27 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +enabled-by: true +links: +- role: spec-member + uid: root +spec-description: null +spec-example: null +spec-info: + dict: + attributes: {} + description: | + This set of attributes specifies skip reasons used to justify why + transitions in the transition map are skipped. + generic-attributes: + description: | + The key defines the name of a skip reason. The name can be used in + :ref:`SpecTypeActionRequirementTransitionPostConditions` to skip the + corresponding transitions. The value shall give a reason why the + transitions are skipped. + key-spec-type: requirement-action-name + value-spec-type: str + mandatory-attributes: all +spec-name: Action Requirement Skip Reasons +spec-type: requirement-action-skip-reasons +type: spec diff --git a/spec/spec/requirement-action-transition-post.yml b/spec/spec/requirement-action-transition-post.yml index 7fca2f11..935484e3 100644 --- a/spec/spec/requirement-action-transition-post.yml +++ b/spec/spec/requirement-action-transition-post.yml @@ -22,6 +22,16 @@ spec-info: key-spec-type: requirement-action-name value-spec-type: requirement-action-name mandatory-attributes: all + str: + assert: + and: + - re: ^[A-Z][a-zA-Z0-9]+$ + - not: + eq: NA + description: | + It shall be the name of a skip reason. If a skip reason is given instead + of a listing of post-condition states, then this transition is skipped + and no test code runs for this transition. spec-name: Action Requirement Transition Post-Conditions spec-type: requirement-action-transition-post type: spec diff --git a/spec/spec/requirement-action.yml b/spec/spec/requirement-action.yml index 8eb7b7be..6afa7879 100644 --- a/spec/spec/requirement-action.yml +++ b/spec/spec/requirement-action.yml @@ -81,6 +81,7 @@ spec-example: | test-epilogue: null test-prologue: null requirement-type: functional + skip-reasons: {} test-action: | /* Call the function of the action */ test-brief: null @@ -137,6 +138,9 @@ spec-info: pre-conditions: description: null spec-type: requirement-action-condition-list + skip-reasons: + description: null + spec-type: requirement-action-skip-reasons test-action: description: | It shall be the test action code. -- cgit v1.2.3