-
Notifications
You must be signed in to change notification settings - Fork 27
test: cover more requirements #658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
a-zw
wants to merge
6
commits into
eclipse-score:main
Choose a base branch
from
etas-contrib:test-existing-implementation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
f3c3909
test: cover more requirements
a-zw f4fb93e
fix: review comments
a-zw e640fdf
fix: use versioned links in rst tests
a-zw 0f50d83
fix: use 'fully' verified where appropriate
a-zw 14fcf00
fix: version==2 in some cases
a-zw 0f998ad
feat: warn if test links to older req version
a-zw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
src/extensions/score_metamodel/tests/rst/attributes/test_std_types.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| .. | ||
| # ******************************************************************************* | ||
| # Copyright (c) 2026 Contributors to the Eclipse Foundation | ||
| # | ||
| # See the NOTICE file(s) distributed with this work for additional | ||
| # information regarding copyright ownership. | ||
| # | ||
| # This program and the accompanying materials are made available under the | ||
| # terms of the Apache License Version 2.0 which is available at | ||
| # https://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # ******************************************************************************* | ||
|
|
||
|
|
||
| .. test_metadata:: | ||
| :id: test_metadata__std_types | ||
| :partially_verifies_list: tool_req__docs_stdreq_types, tool_req__docs_stdwp_types | ||
|
a-zw marked this conversation as resolved.
Outdated
|
||
| :test_type: requirements_based | ||
| :derivation_technique: requirements_based | ||
|
|
||
| Tests that std_req and std_wp directives are supported by the metamodel. | ||
|
|
||
|
|
||
| .. std_req:: Standard requirement | ||
| :id: std_req__iso26262__test__001 | ||
| :status: valid | ||
| :expect_not: unknown directive | ||
|
|
||
|
|
||
| .. std_wp:: Standard workproduct | ||
| :id: std_wp__iso26262__test__001 | ||
| :status: valid | ||
| :expect_not: unknown directive | ||
121 changes: 121 additions & 0 deletions
121
src/extensions/score_metamodel/tests/rst/safety/test_saf_mandatory_attrs.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,121 @@ | ||
| .. | ||
| # ******************************************************************************* | ||
| # Copyright (c) 2026 Contributors to the Eclipse Foundation | ||
| # | ||
| # See the NOTICE file(s) distributed with this work for additional | ||
| # information regarding copyright ownership. | ||
| # | ||
| # This program and the accompanying materials are made available under the | ||
| # terms of the Apache License Version 2.0 which is available at | ||
| # https://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # ******************************************************************************* | ||
|
|
||
|
|
||
| .. test_metadata:: | ||
| :id: test_metadata__saf_mandatory_attrs | ||
| :partially_verifies_list: tool_req__docs_saf_attrs_mandatory, tool_req__docs_saf_attr_dfa_failure_id, tool_req__docs_saf_attr_fmea_fault_id, tool_req__docs_saf_attrs_sufficient, tool_req__docs_saf_attrs_content | ||
| :test_type: requirements_based | ||
| :derivation_technique: requirements_based | ||
|
|
||
| Tests that all safety analysis types have required mandatory attributes: | ||
| - DFA: failure_id | ||
| - FMEA: fault_id | ||
| - All: failure_effect, status, sufficient, content | ||
|
|
||
|
|
||
| .. feat_saf_dfa:: Missing failure_id | ||
| :id: feat_saf_dfa__test__missing_fid | ||
| :status: valid | ||
| :failure_effect: signal lost | ||
| :sufficient: yes | ||
| :expect: is missing required attribute: `failure_id` | ||
|
|
||
|
|
||
| .. comp_saf_dfa:: Valid failure_id | ||
| :id: comp_saf_dfa__test__good_fid | ||
| :status: valid | ||
| :failure_id: df_good_001 | ||
| :failure_effect: communication lost | ||
| :sufficient: no | ||
| :expect_not: missing required attribute: `failure_id` | ||
|
|
||
|
|
||
| .. feat_saf_fmea:: Missing fault_id | ||
| :id: feat_saf_fmea__test__missing_fault | ||
| :status: valid | ||
| :failure_effect: valve stuck | ||
| :sufficient: yes | ||
| :expect: is missing required attribute: `fault_id` | ||
|
|
||
|
|
||
| .. comp_saf_fmea:: Valid fault_id | ||
| :id: comp_saf_fmea__test__good_fault | ||
| :status: valid | ||
| :fault_id: fault_good_001 | ||
| :failure_effect: valve stuck | ||
| :sufficient: no | ||
| :expect_not: missing required attribute: `fault_id` | ||
|
|
||
|
|
||
| .. plat_saf_dfa:: Missing failure_effect | ||
| :id: plat_saf_dfa__test__missing_fe | ||
| :status: valid | ||
| :failure_id: df_fe_bad | ||
| :sufficient: yes | ||
| :expect: is missing required attribute: `failure_effect` | ||
|
|
||
|
|
||
| .. feat_saf_dfa:: Missing sufficient | ||
| :id: feat_saf_dfa__test__missing_suff | ||
| :status: valid | ||
| :failure_id: df_suff_bad | ||
| :failure_effect: output wrong | ||
| :expect: is missing required attribute: `sufficient` | ||
|
|
||
|
|
||
| .. feat_saf_fmea:: Valid sufficient yes | ||
| :id: feat_saf_fmea__test__suff_ok_1 | ||
| :status: valid | ||
| :fault_id: fault_suff_ok_1 | ||
| :failure_effect: system error | ||
| :sufficient: yes | ||
| :expect_not: does not follow pattern | ||
|
|
||
|
|
||
| .. comp_saf_dfa:: Valid sufficient no | ||
| :id: comp_saf_dfa__test__suff_ok_2 | ||
| :status: valid | ||
| :failure_id: df_suff_ok_2 | ||
| :failure_effect: signal lost | ||
| :sufficient: no | ||
| :expect_not: does not follow pattern | ||
|
|
||
|
|
||
| .. feat_saf_dfa:: Invalid sufficient value | ||
| :id: feat_saf_dfa__test__suff_bad | ||
| :status: valid | ||
| :failure_id: df_suff_bad_2 | ||
| :failure_effect: bad output | ||
| :sufficient: maybe | ||
| :expect: does not follow pattern | ||
|
|
||
|
|
||
| .. feat_saf_fmea:: Valid content | ||
| :id: feat_saf_fmea__test__content_ok | ||
| :status: valid | ||
| :fault_id: fault_content_ok | ||
| :failure_effect: crash | ||
| :sufficient: yes | ||
|
|
||
| This is the content of the FMEA entry. | ||
|
|
||
|
|
||
| .. comp_saf_dfa:: Missing content | ||
| :id: comp_saf_dfa__test__content_bad | ||
| :status: valid | ||
| :failure_id: df_content_bad | ||
| :failure_effect: no response | ||
| :sufficient: no | ||
| :expect: is missing required attribute: `content`. |
88 changes: 88 additions & 0 deletions
88
src/extensions/score_metamodel/tests/rst/safety/test_saf_optional_attrs.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| .. | ||
| # ******************************************************************************* | ||
| # Copyright (c) 2026 Contributors to the Eclipse Foundation | ||
| # | ||
| # See the NOTICE file(s) distributed with this work for additional | ||
| # information regarding copyright ownership. | ||
| # | ||
| # This program and the accompanying materials are made available under the | ||
| # terms of the Apache License Version 2.0 which is available at | ||
| # https://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # ******************************************************************************* | ||
|
|
||
| .. test_metadata:: | ||
| :id: test_metadata__saf_optional_attrs | ||
| :partially_verifies_list: tool_req__docs_saf_attrs_mitigation_issue, tool_req__docs_saf_attrs_safety_relevant, tool_req__docs_saf_attrs_root_cause | ||
| :test_type: requirements_based | ||
| :derivation_technique: requirements_based | ||
|
|
||
| Tests optional attributes for safety analysis types: | ||
| - mitigation_issue: GitHub issue URL pattern | ||
| - safety_relevant: yes/no for all SAF types | ||
| - root_cause: non-empty content for FMEA | ||
|
|
||
|
|
||
| .. feat_saf_dfa:: Valid mitigation issue | ||
| :id: feat_saf_dfa__opt__001 | ||
| :failure_id: df_opt_001 | ||
| :failure_effect: comms loss | ||
| :sufficient: no | ||
| :status: valid | ||
| :mitigation_issue: https://github.com/eclipse-score/docs-as-code/issues/42 | ||
|
|
||
|
|
||
| .. feat_saf_fmea:: Valid mitigation issue 2 | ||
| :id: feat_saf_fmea__opt__001 | ||
| :fault_id: fault_opt_001 | ||
| :failure_effect: valve stuck | ||
| :sufficient: yes | ||
| :status: valid | ||
| :mitigation_issue: https://github.com/owner/repo/issues/123 | ||
|
|
||
|
|
||
| .. comp_saf_dfa:: Safety relevant yes | ||
| :id: comp_saf_dfa__opt__001 | ||
| :failure_id: df_opt_003 | ||
| :failure_effect: signal noise | ||
| :sufficient: no | ||
| :status: valid | ||
| :safety_relevant: yes | ||
|
|
||
|
|
||
| .. comp_saf_dfa:: Safety relevant no | ||
| :id: comp_saf_dfa__opt__002 | ||
| :failure_id: df_opt_004 | ||
| :failure_effect: power failure | ||
| :sufficient: yes | ||
| :status: valid | ||
| :safety_relevant: no | ||
|
|
||
|
|
||
| .. feat_saf_dfa:: Invalid safety relevant | ||
| :id: feat_saf_dfa__opt__bad_001 | ||
| :failure_id: df_opt_bad_001 | ||
| :failure_effect: bad value | ||
| :sufficient: no | ||
| :status: valid | ||
| :safety_relevant: perhaps | ||
| :expect: does not follow pattern | ||
|
|
||
|
|
||
| .. feat_saf_fmea:: FMEA with root cause | ||
| :id: feat_saf_fmea__opt__002 | ||
| :fault_id: fault_opt_002 | ||
| :failure_effect: component failure | ||
| :sufficient: no | ||
| :status: valid | ||
| :root_cause: manufacturing defect in solder joints | ||
|
|
||
|
|
||
| .. comp_saf_fmea:: Comp FMEA with root cause | ||
| :id: comp_saf_fmea__opt__001 | ||
| :fault_id: fault_opt_003 | ||
| :failure_effect: software crash | ||
| :sufficient: yes | ||
| :status: valid | ||
| :root_cause: null pointer dereference in interrupt handler |
83 changes: 83 additions & 0 deletions
83
src/extensions/score_metamodel/tests/rst/safety/test_saf_types.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| .. | ||
| # ******************************************************************************* | ||
| # Copyright (c) 2026 Contributors to the Eclipse Foundation | ||
| # | ||
| # See the NOTICE file(s) distributed with this work for additional | ||
| # information regarding copyright ownership. | ||
| # | ||
| # This program and the accompanying materials are made available under the | ||
| # terms of the Apache License Version 2.0 which is available at | ||
| # https://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # ******************************************************************************* | ||
|
|
||
| .. test_metadata:: | ||
| :id: test_metadata__saf_types | ||
| :partially_verifies_list: tool_req__docs_saf_types, tool_req__docs_saf_attrs_mandatory | ||
| :test_type: requirements_based | ||
| :derivation_technique: requirements_based | ||
|
|
||
| Tests that all safety analysis need types are supported and that | ||
| mandatory attributes are enforced. | ||
|
|
||
|
|
||
| .. feat_saf_fmea:: Feature FMEA entry | ||
| :id: feat_saf_fmea__test__001 | ||
| :status: valid | ||
| :fault_id: fault_1 | ||
| :failure_effect: system hangs | ||
| :sufficient: yes | ||
| :expect_not: unknown directive | ||
|
|
||
|
|
||
| .. comp_saf_fmea:: Component FMEA entry | ||
| :id: comp_saf_fmea__test__001 | ||
| :status: valid | ||
| :fault_id: fault_2 | ||
| :failure_effect: valve stuck open | ||
| :sufficient: no | ||
| :expect_not: unknown directive | ||
|
|
||
|
|
||
| .. plat_saf_dfa:: Platform DFA entry | ||
| :id: plat_saf_dfa__test__001 | ||
| :status: valid | ||
| :failure_id: df_1 | ||
| :failure_effect: signal delay | ||
| :sufficient: yes | ||
| :expect_not: unknown directive | ||
|
|
||
|
|
||
| .. feat_saf_dfa:: Feature DFA entry | ||
| :id: feat_saf_dfa__test__001 | ||
| :status: valid | ||
| :failure_id: df_2 | ||
| :failure_effect: unexpected output | ||
| :sufficient: yes | ||
| :expect_not: unknown directive | ||
|
|
||
|
|
||
| .. comp_saf_dfa:: Component DFA entry | ||
| :id: comp_saf_dfa__test__001 | ||
| :status: valid | ||
| :failure_id: df_3 | ||
| :failure_effect: communication loss | ||
| :sufficient: no | ||
| :expect_not: unknown directive | ||
|
|
||
|
|
||
| .. feat_saf_fmea:: Missing failure effect | ||
| :id: feat_saf_fmea__test__bad_001 | ||
| :status: valid | ||
| :fault_id: fault_bad | ||
| :sufficient: yes | ||
| :expect: is missing required attribute: `failure_effect`. | ||
|
|
||
|
|
||
| .. comp_saf_dfa:: Missing status | ||
| :id: comp_saf_dfa__test__bad_001 | ||
| :failure_id: df_bad | ||
| :failure_effect: no status | ||
| :sufficient: yes | ||
| :expect: is missing required attribute: `status`. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.