source: rtems-central/spec/spec/requirement-action.yml @ 55e17d2

Last change on this file since 55e17d2 was 55e17d2, checked in by Sebastian Huber <sebastian.huber@…>, on 07/27/20 at 12:54:13

validation: Add ability to skip action transitions

  • Property mode set to 100644
File size: 6.5 KB
Line 
1SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
2copyrights:
3- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
4enabled-by: true
5links:
6- role: spec-member
7  uid: root
8- role: spec-refinement
9  spec-key: functional-type
10  spec-value: action
11  uid: requirement-functional
12spec-description: null
13spec-example: |
14  SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
15  copyrights:
16  - Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
17  enabled-by: true
18  functional-type: action
19  links: []
20  post-conditions:
21  - name: Status
22    states:
23    - name: Success
24      test-code: |
25        /* Check that the status is SUCCESS */
26      text: |
27        The status shall be SUCCESS.
28    - name: Error
29      test-code: |
30        /* Check that the status is ERROR */
31      text: |
32        The status shall be ERROR.
33    test-epilogue: null
34    test-prologue: null
35  - name: Data
36    states:
37    - name: Unchanged
38      test-code: |
39        /* Check that the data is unchanged */
40      text: |
41        The data shall be unchanged by the action.
42    - name: Red
43      test-code: |
44        /* Check that the data is red */
45      text: |
46        The data shall be red.
47    - name: Green
48      test-code: |
49        /* Check that the data is green */
50      text: |
51        The data shall be green.
52    test-epilogue: null
53    test-prologue: null
54  pre-conditions:
55  - name: Data
56    states:
57    - name: NullPtr
58      test-code: |
59        /* Set data pointer to NULL */
60      text: |
61        The data pointer shall be NULL.
62    - name: Valid
63      test-code: |
64        /* Set data pointer to reference a valid data buffer */
65      text: |
66        The data pointer shall reference a valid data buffer.
67    test-epilogue: null
68    test-prologue: null
69  - name: Option
70    states:
71    - name: Red
72      test-code: |
73        /* Set option to RED */
74      text: |
75        The option shall be RED.
76    - name: Green
77      test-code: |
78        /* Set option to GREEN */
79      text: |
80        The option shall be GREEN.
81    test-epilogue: null
82    test-prologue: null
83  requirement-type: functional
84  skip-reasons: {}
85  test-action: |
86    /* Call the function of the action */
87  test-brief: null
88  test-context:
89  - brief: null
90    description: null
91    member: void *data
92  - brief: null
93    description: null
94    member: option_type option
95  test-description: null
96  test-header: null
97  test-includes: []
98  test-local-includes: []
99  test-name: RedGreenData
100  test-setup: null
101  test-stop: null
102  test-support: null
103  test-target: tc-red-green-data.c
104  test-teardown: null
105  transition-map:
106  - enabled-by: true
107    post-conditions:
108      Status: Error
109      Data: Unchanged
110    pre-conditions:
111      Data: NullPtr
112      Option: all
113  - enabled-by: true
114    post-conditions:
115      Status: Success
116      Data: Red
117    pre-conditions:
118      Data: Valid
119      Option: Red
120  - enabled-by: true
121    post-conditions:
122      Status: Success
123      Data: Green
124    pre-conditions:
125      Data: Valid
126      Option: Green
127  rationale: null
128  references: []
129  text: |
130    ${.:/text-template}
131  type: requirement
132spec-info:
133  dict:
134    attributes:
135      post-conditions:
136        description: null
137        spec-type: requirement-action-condition-list
138      pre-conditions:
139        description: null
140        spec-type: requirement-action-condition-list
141      skip-reasons:
142        description: null
143        spec-type: requirement-action-skip-reasons
144      test-action:
145        description: |
146          It shall be the test action code.
147        spec-type: str
148      test-brief:
149        description: |
150          If the value is present, then it shall be the test case brief
151          description.
152        spec-type: optional-str
153      test-context:
154        description: null
155        spec-type: requirement-action-test-context-list
156      test-description:
157        description: |
158          If the value is present, then it shall be the test case description.
159        spec-type: optional-str
160      test-header:
161        description: null
162        spec-type: requirement-action-test-header
163      test-includes:
164        description: |
165          It shall be a list of header files included via ``#include <...>``.
166        spec-type: list-str
167      test-local-includes:
168        description: |
169          It shall be a list of header files included via ``#include "..."``.
170        spec-type: list-str
171      test-name:
172        description: null
173        spec-type: test-name
174      test-setup:
175        description: null
176        spec-type: requirement-action-test-fixture
177      test-stop:
178        description: null
179        spec-type: requirement-action-test-fixture
180      test-support:
181        description: |
182          If the value is present, then it shall be the test case support code.
183          The support code is placed at file scope before the test case code.
184        spec-type: optional-str
185      test-target:
186        description: |
187          It shall be the path to the generated test case source file.
188        spec-type: str
189      test-teardown:
190        description: null
191        spec-type: requirement-action-test-fixture
192      transition-map:
193        description: null
194        spec-type: requirement-action-transition-list
195    description: |
196      This set of attributes specifies functional requirements and
197      corresponding validation test code.  The functional requirements of an
198      action are specified.  An action performs a step in a finite state
199      machine.  An action is implemented through a function or a macro.  The
200      action is performed through a call of the function or an execution of the
201      code of a macro expansion by an actor.  The actor is for example a task
202      or an interrupt service routine.
203
204      For action requirements which specify the function of an interface, there
205      shall be exactly one link with the ${interface-function-role:/spec-name}
206      to the interface of the action.
207
208      The action requirements are specified by
209
210      * a list of pre-conditions, each with a set of states,
211
212      * a list of post-conditions, each with a set of states,
213
214      * the transition of pre-condition states to post-condition states through
215        the action.
216
217      Along with the requirements, the test code to generate a validation test
218      is specified.  For an action requirement it is verified that all
219      variations of pre-condition states have a set of post-condition states
220      specified in the transition map.  All transitions are covered by the
221      generated test code.
222    mandatory-attributes: all
223spec-name: Action Requirement Item Type
224spec-type: requirement-action
225type: spec
Note: See TracBrowser for help on using the repository browser.