As a traceability manager I want the traceability report to list items that fulfill the tracing policy, and how they do so, so that I can decide whether to release my product.
Example: If the tracing policy is: Tests --(trace to)--> Requirements, then the report shall list all tests that link to at least one requirement, and the report shall list all linked requirements per test.
The use case applies to the reverse direction as well.
Issues:
missing reference to System Requirements
Build Reference: main | Timestamp: 2026-10-19 07:48:19+00:00 UTC
As a traceability manager I want the traceability report to list items that are not covered by other items, where coverage rules are specified by the tracing policy, so that I can identify gaps in the coverage.
Example: If the tracing policy is: Tests --(trace to)--> Requirements, then the report shall list all tests that do not link to any requirement.
The use case applies to the reverse direction as well.
Issues:
missing reference to System Requirements
Build Reference: main | Timestamp: 2026-10-19 07:48:19+00:00 UTC
As a traceability manager I want the traceability report to show the fraction of the number of items in one level (of the tracing policy) which fulfill the tracing policy, divided by the total number of items in that level (of the tracing policy). The fraction shall be shown as percentage.
Example: If the tracing policy is: Tests --(trace to)--> Requirements, then the report shall show the fraction of requirements which are covered by at least one test, divided by the total number of requirements.
Issues:
missing reference to System Requirements
Build Reference: main | Timestamp: 2026-10-19 07:48:19+00:00 UTC
As a CI administrator I want a tool that inspects a generated traceability report and exits with a non-zero return code whenever at least one item is not fully traced, AND printing each problem in a compiler-message style, CI pipeline can catch broken traceability automatically.
As a CI administrator I want that the tool exits with a non-zero return code whenever it encounters invalid input so that the CI pipeline can catch invalid input automatically.
As a CI administrator I want to invoke LOBSTER tools through Bazel commands (e.g. "bazel run //:lobster-ci-report -- <FILE>") instead of calling the underlying Python scripts directly, and I want a relative path typed on the command line to be resolved against the directory from which I invoked Bazel, even though Bazel itself executes the tool from a different working directory.
As a user of LOBSTER I want to have a good usability and standard command-line ergonomics, like built-in help or automatic creation of output destinations, so that using the tools is intuitive and seamless in scripts and interactive use.
As a requirements manager I want to see the per-level traceability coverage percentage printed directly to the console when checking a LOBSTER report, without having to generate or open an HTML report.
IF the given LOBSTER report contains at least one item whose tracing status is neither OK nor JUSTIFIED, THEN the tool SHALL print one line per associated message to STDOUT in the format "<file>:<line>:<column>: lobster error: <message>" AND SHALL exit with a non-zero return code.
IF every item in the given LOBSTER report has tracing status OK or JUSTIFIED (including the case of zero items), THEN the tool SHALL print nothing to STDOUT AND SHALL exit with return code 0.
IF the report file, whether given explicitly or defaulted (see [[Ci_Report_Default_Report_File]]), does not exist, THEN the tool SHALL print an error message to STDERR identifying whether no file was specified or which file was not found, AND SHALL exit with a non-zero return code.
IF the command line flag "--show-coverage" is given, THEN the tool SHALL additionally print one line per report level to STDOUT in the format "coverage: <level>: <percentage>% (<covered> of <total> items)", reflecting the coverage value already stored in the given LOBSTER report file.
IF a relative report file path is given AND the environment variable "BUILD_WORKING_DIRECTORY" is set, THEN the tool SHALL resolve that path relative to the directory named by "BUILD_WORKING_DIRECTORY" instead of the current working directory.
IF the given report path is relative AND the environment variable "BUILD_WORKING_DIRECTORY" is set, THEN the function SHALL return the path joined onto the directory named by that environment variable, OTHERWISE it SHALL return the path unchanged.
The function "report_errors_for_untraced_items" SHALL emit an error (via report.mh.error) for each message of every item in the given report whose tracing status is neither OK nor JUSTIFIED, AND SHALL emit no error for an item whose tracing status is OK or JUSTIFIED.
Note: This is what causes "report.mh.errors" to be non-zero IF AND ONLY IF at least one item is not fully traced, including the case of a report with zero items (zero errors emitted).
The command line argument "lobster_report" of "CiReportTool" SHALL have the default value "report.lobster", so that it is used IF no report file is given on the command line.
The function "ensure_report_file_exists" SHALL raise an argument parser error (leading to program exit) with a message naming the given report file, IF that file does not exist AND was given explicitly (i.e. is not the unmodified default value "report.lobster"), OTHERWISE (file does not exist AND is still the default value) it SHALL raise an argument parser error stating that a report file must be specified.
The function "format_coverage_lines" SHALL return one formatted string per report level, in the format "coverage: <level>: <percentage>% (<covered> of <total> items)", reflecting the coverage value already stored in the given report.