-
Notifications
You must be signed in to change notification settings - Fork 16
Item that contains a ‘message’ has zero coverage #408
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
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,8 @@ | ||
| requirements "Requirements" { | ||
| source: "trlc_message_trace_coverage.lobster"; | ||
| } | ||
|
|
||
| implementation "Code" { | ||
| source: "python_message_trace_coverage.lobster"; | ||
| trace to: "Requirements"; | ||
| } |
26 changes: 26 additions & 0 deletions
26
tests_system/lobster_report/data/python_message_trace_coverage.lobster
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,26 @@ | ||
| { | ||
| "data": [ | ||
| { | ||
| "tag": "python software.Example", | ||
| "location": { | ||
| "kind": "file", | ||
| "file": ".\\software.py", | ||
| "line": 1, | ||
| "column": null | ||
| }, | ||
| "name": "software.Example", | ||
| "messages": ["trace"], | ||
| "just_up": [], | ||
| "just_down": [], | ||
| "just_global": [], | ||
| "refs": [ | ||
| "req example.adas_100" | ||
| ], | ||
| "language": "Python", | ||
| "kind": "Function" | ||
| } | ||
| ], | ||
| "generator": "lobster_python", | ||
| "schema": "lobster-imp-trace", | ||
| "version": 3 | ||
| } |
102 changes: 102 additions & 0 deletions
102
tests_system/lobster_report/data/report_message_trace_coverage.lobster
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,102 @@ | ||
| { | ||
| "schema": "lobster-report", | ||
| "version": 2, | ||
| "generator": "lobster_report", | ||
| "levels": [ | ||
| { | ||
| "name": "Requirements", | ||
| "kind": "requirements", | ||
| "items": [ | ||
| { | ||
| "tag": "req example.adas_100", | ||
| "location": { | ||
| "kind": "file", | ||
| "file": "./demo.trlc", | ||
| "line": 3, | ||
| "column": 13 | ||
| }, | ||
| "name": "example.adas_100", | ||
| "messages": [], | ||
| "just_up": [], | ||
| "just_down": [], | ||
| "just_global": [], | ||
| "ref_up": [], | ||
| "ref_down": [ | ||
| "python software.Example" | ||
| ], | ||
| "tracing_status": "OK", | ||
| "framework": "TRLC", | ||
| "kind": "Requirement", | ||
| "text": "keep the vehicle in lane.", | ||
| "status": null | ||
| } | ||
| ], | ||
| "coverage": 100.0 | ||
| }, | ||
| { | ||
| "name": "Code", | ||
| "kind": "implementation", | ||
| "items": [ | ||
| { | ||
| "tag": "python software.Example", | ||
| "location": { | ||
| "kind": "file", | ||
| "file": "./software.py", | ||
| "line": 1, | ||
| "column": null | ||
| }, | ||
| "name": "software.Example", | ||
| "messages": [ | ||
| "trace" | ||
| ], | ||
| "just_up": [], | ||
| "just_down": [], | ||
| "just_global": [], | ||
| "ref_up": [ | ||
| "req example.adas_100" | ||
| ], | ||
| "ref_down": [], | ||
| "tracing_status": "PARTIAL", | ||
| "language": "Python", | ||
| "kind": "Function" | ||
| } | ||
| ], | ||
| "coverage": 0.0 | ||
| } | ||
| ], | ||
| "policy": { | ||
| "Requirements": { | ||
| "name": "Requirements", | ||
| "kind": "requirements", | ||
| "traces": [], | ||
| "source": [ | ||
| { | ||
| "file": "trlc_message_trace_coverage.lobster" | ||
| } | ||
| ], | ||
| "needs_tracing_up": false, | ||
| "needs_tracing_down": true, | ||
| "breakdown_requirements": [ | ||
| [ | ||
| "Code" | ||
| ] | ||
| ] | ||
| }, | ||
| "Code": { | ||
| "name": "Code", | ||
| "kind": "implementation", | ||
| "traces": [ | ||
| "Requirements" | ||
| ], | ||
| "source": [ | ||
| { | ||
| "file": "python_message_trace_coverage.lobster" | ||
| } | ||
| ], | ||
| "needs_tracing_up": true, | ||
| "needs_tracing_down": false, | ||
| "breakdown_requirements": [] | ||
| } | ||
| }, | ||
| "matrix": [] | ||
| } |
25 changes: 25 additions & 0 deletions
25
tests_system/lobster_report/data/trlc_message_trace_coverage.lobster
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,25 @@ | ||
| { | ||
| "data": [ | ||
| { | ||
| "tag": "req example.adas_100", | ||
| "location": { | ||
| "kind": "file", | ||
| "file": ".\\demo.trlc", | ||
| "line": 3, | ||
| "column": 13 | ||
| }, | ||
| "name": "example.adas_100", | ||
| "messages": [], | ||
| "just_up": [], | ||
| "just_down": [], | ||
| "just_global": [], | ||
| "framework": "TRLC", | ||
| "kind": "Requirement", | ||
| "text": "keep the vehicle in lane.", | ||
| "status": null | ||
| } | ||
| ], | ||
| "generator": "lobster-trlc", | ||
| "schema": "lobster-req-trace", | ||
| "version": 4 | ||
| } |
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wrong! The traced item may be traced by several items! If there are only two items in total, then the formulation is correct.
Furthermore:
So a system requirement can only specify that the item shall be counted as "not okay" if it has got a message. And this rule has precedence over all other traceability rules. So even if the item properly traces to another item (as requested by the tracing policy), the item must still be counted as "not okay" if it has got a message.
However, a justification has even higher priority. An item with "justification" is counted as "okay", even if it has got a "message".