diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e43e571b..282487c53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,11 @@ - Added detailed examples and configuration parameters for `lobster-codebeamer`, `lobster-cpptest`, `lobster-report`, `lobster-html_report`, and `lobster-online_report` tools +* LOBSTER report + - New yaml configuration file. + - Without need to specify level types like requirement, implementation or activity. + - All lobster tools will create .lobster files without schema, all elements are items. + ### 1.0.2 * `lobster-trlc`: diff --git a/Makefile b/Makefile index ccc8d9bd2..e342f9342 100644 --- a/Makefile +++ b/Makefile @@ -71,8 +71,8 @@ packages: clean-packages PYTHONPATH= \ pip3 install --prefix test_install_monolithic \ packages/lobster-monolithic/meta_dist/*.whl - diff -Naur test_install/lib/python*/site-packages/lobster test_install_monolithic/lib/python*/site-packages/lobster -x "*.pyc" -x "*pkg*" -x "pkg/*" - diff -Naur test_install/bin test_install_monolithic/bin -x "*pkg*" -x "pkg/*" + diff -Naur test_install/lib/python*/site-packages/lobster test_install_monolithic/lib/python*/site-packages/lobster -x "*.pyc" -x "*pkg*" -x "pkg/*" -x "*yamale" + diff -Naur test_install/bin test_install_monolithic/bin -x "*pkg*" -x "pkg/*" -x "*yamale" # Very basic smoke test to ensure the tools are packaged properly python3 -m venv test_install_monolithic_venv diff --git a/data/lobster_ok.yaml b/data/lobster_ok.yaml new file mode 100644 index 000000000..f6470ad2c --- /dev/null +++ b/data/lobster_ok.yaml @@ -0,0 +1,15 @@ +Requirements: !LevelDefinition + name: Requirements + source: + - file: trlc_ok.lobster + needs_tracing_down: true + breakdown_requirements: + - - Code + +Code: !LevelDefinition + name: Code + source: + - file: python_ok.lobster + needs_tracing_up: true + traces: + - Requirements diff --git a/documentation/config_files.md b/documentation/config_files.md index 0efef0ed0..6e21af7ad 100644 --- a/documentation/config_files.md +++ b/documentation/config_files.md @@ -1,11 +1,234 @@ # LOBSTER Configuration Files -A lobster config file (by default `lobster.conf`) declares the tracing +A lobster config file (by default `lobster.yaml`) declares the tracing +policy. The syntax is fairly simple and best explained by example. +The new yaml configuration does not need an assignment to the three different +level types requirements, implementation or activity anymore. +It just reflect a image of the internal stucture of the dictionary containing the +different level definitions. + +The new yaml configuration supports lobster files with version 5 and without schema. + +## Levels + +The core feature is an item level: +A typical level declaration might look like this: + +``` yaml +Code: !LevelDefinition + name: Code + source: + - file: cpp.lobster + - file: matlab.lobster + needs_tracing_up: true + traces: + - Requirements +``` + +What we have here is an implementation level called `Code` that has +two data sources (a C++ extract and a MATLAB extract). This code is +supposed to contain tracing tags that link it to items from the +`Requirements` level. + +### Level attributes + +#### source + +The `source` attribute assigns a LOBSTER file to contribute to this +level. + +#### traces and needs_tracing_up + +The `traces` attribute declares the expected tracing link. This +declares that the items in this level are expected to be linked to +items from that level. It is possible to have more than one level +mentioned here (but it probably makes no sense). +`needs_tracing_up` need tobe set to true + +For example, here we declare that requirements are the top-level +(since there are no links expected), and code should trace to the +requirements. + +``` yaml +Requirements: !LevelDefinition + name: Requirements + source: + - file: trlc.lobster + needs_tracing_down: true + breakdown_requirements: + - - Code + +Code: !LevelDefinition + name: Code + source: + - file: python.lobster + needs_tracing_up: true + traces: + - Requirements +``` + +#### breakdown_requirements and needs_tracing_down + +Sometimes you might want alternatives. For example we could have two +possibly ways to verify a requirement: by proof or by test. If we just +do this: + +``` yaml +Requirements: !LevelDefinition + name: Requirements + source: + - file: trlc.lobster + needs_tracing_down: true + breakdown_requirements: + - - Code + - - Unit Test + - - Formal Proof + +Code: !LevelDefinition + name: Code + source: + - file: ada.lobster + needs_tracing_up: true + traces: + - Requirements + +Unit Test: !LevelDefinition + name: Unit Test + source: + - file: aunit.lobster + needs_tracing_up: true + traces: + - Requirements + +Formal Proof: !LevelDefinition + name: Formal Proof + source: + - file: gnatprove.lobster + needs_tracing_up: true + traces: + - Requirements +``` + +Then we would get lots of errors as the tooling would require a +requirement to be broken down into all three. The `breakdown_requirements` +configuration can help here: + + +``` yaml +Requirements: !LevelDefinition + name: Requirements + source: + - file: trlc.lobster + needs_tracing_down: true + breakdown_requirements: + - - Code + - - Unit Test + - Formal Proof +``` + +Now an item is considered to be completely traced if it has both a +link to code, and either a link to a test or a link to a proof. + +**Note:** +Don't forget that the `traces` configuration is always mandatory. +You cannot build links with a configuration that uses only `breakdown_requirements`. + +# Examples + +A simple example that just links SIMULINK models to requirements +stored in codebeamer: + +``` yaml +Requirements: !LevelDefinition + name: Requirements + source: + - file: cbtrace.lobster + needs_tracing_down: true + breakdown_requirements: + - - Models + +Models: !LevelDefinition + name: Models + source: + - file: mh_imp_trace.lobster + needs_tracing_up: true + traces: + - Requirements +``` + +A more complex example that breaks down system requirements in +codebeamer to TRLC software requirements. The C++ implementation is +traced against software requirements. Unit tests show software +requirements coverage and integration tests show system requirements +coverage. For non-functional system requirements we alternatively show +they are met with some hand-written analysis (for which we've created +our own custom LOBSTER trace tool). + +``` yaml +System Requirements: !LevelDefinition + name: System Requirements + source: + - file: cbtrace.lobster + needs_tracing_down: true + breakdown_requirements: + - - Software Requirements + - - Integration Tests + - - Analysis + +Software Requirements: !LevelDefinition + name: Software Requirements + source: + - file: trlc.lobster + needs_tracing_up: true + traces: + - System Requirements + needs_tracing_down: true + breakdown_requirements: + - - Code + - - Unit Tests + +Code: !LevelDefinition + name: Code + source: + - file: cpptrace.lobster + needs_tracing_up: true + traces: + - Software Requirements + +Unit Tests: !LevelDefinition + name: Unit Tests + source: + - file: gtest_unit.lobster + needs_tracing_up: true + traces: + - Software Requirements + +Integration Tests: !LevelDefinition + name: Integration Tests + source: + - file: gtest_int.lobster + needs_tracing_up: true + traces: + - System Requirements + +Analysis: !LevelDefinition + name: Analysis + source: + - file: analysis.lobster + needs_tracing_up: true + traces: + - System Requirements +``` + + +# Deprecated .conf Configuration Files + +The deprecated .conf lobster config file (by default `lobster.conf`) declares the tracing policy. The syntax is fairly simple and best explained by example. ## Levels -The core feature is an item level, and there are three kinds: +The core feature is an item level, and there are three kinds need to be assigned: * requirements (for things like trlc, codebeamer, systemweaver, doors, ...) * implementation (for things like code or models) @@ -128,7 +351,7 @@ our own custom LOBSTER trace tool). ``` requirements "System Requirements" { - source: "cbtrace.lobster" + source: "cbtrace.lobster"; requires: "Integration Tests" or "Analysis"; } diff --git a/documentation/manual-lobster_codebeamer.md b/documentation/manual-lobster_codebeamer.md index 6bc1fedc2..947c6d815 100644 --- a/documentation/manual-lobster_codebeamer.md +++ b/documentation/manual-lobster_codebeamer.md @@ -67,6 +67,17 @@ You can now configure retry behavior for failed HTTPS requests using the followi num_request_retry: 3 ``` +- `schema` + + *Type*: `str` + + *Description*: Per default lobster-codebeamer will generate a .lobster file with version 5 without schema `lobster-req-trace`. + To generate a version 4 with schema `lobster-req-trace` add Requirement as schema into your YAML configuration file. + *Example*: + ```yaml + schema: Requirement + ``` + Notes: - Retries will **only** be attempted if `retry_error_codes` parameter is defined in the config. - If `num_request_retry` not defined, the default value of 5 will be used. diff --git a/documentation/manual-lobster_cpp.md b/documentation/manual-lobster_cpp.md index 0bd0faacb..179173fe7 100644 --- a/documentation/manual-lobster_cpp.md +++ b/documentation/manual-lobster_cpp.md @@ -9,3 +9,10 @@ for example: Here the error `clang-diagnostic-error` will be ignored. You can also specify a list of errors to ignore. + +Per default lobster-cpp will generate a .lobster file with version 5 without schema `lobster-imp-trace`. +To generate a version 3 with schema `lobster-imp-trace` add the command line argument `kind`, +for example: +```bash +> lobster-cpp --kind="imp" ... +``` diff --git a/documentation/manual-lobster_cpptest.md b/documentation/manual-lobster_cpptest.md index aa07a8158..e64039f6d 100644 --- a/documentation/manual-lobster_cpptest.md +++ b/documentation/manual-lobster_cpptest.md @@ -78,18 +78,24 @@ The regex used for each test-tag is as follows: ## Preparing cpptest YAML config-file You have to provide a YAML configuration file that defines the settings to be applied by the tool. -The tool supports exactly four configuration attributes: -`output_file`, `codebeamer_url`, `kind`, and `files`. +The tool supports three configuration attributes: +`output_file`, `codebeamer_url` and `files`. This file must include the `codebeamer_url`. All other attributes are optional. ```cpptest-config.yaml output_file: "unit_tests.lobster" -kind: "req" codebeamer_url: "https://codebeamer.example.com/cb" ``` +Per default lobster-cpptest will generate a .lobster file with version 5 without schema `lobster-act-trace`. +To generate a version 3 with schema `lobster-act-trace` add the optional configuration attribute `kind`, + +```cpptest-config.yaml +kind: "req" + ``` + * Note: Orphan tests, will be always written into the output_file. Be aware these tests do not have any references. diff --git a/documentation/manual-lobster_gtest.md b/documentation/manual-lobster_gtest.md index 1d85ca658..31c7b3ad6 100644 --- a/documentation/manual-lobster_gtest.md +++ b/documentation/manual-lobster_gtest.md @@ -51,6 +51,13 @@ command line might look like: $ lobster_gtest . --out gtests.lobster ``` +Per default lobster-gtest will generate a .lobster file with version 5 without schema `lobster-imp-trace`. +To generate a version 3 with schema `lobster-imp-trace` add the command line argument `kind`, + +```sh +$ lobster_gtest --kind="imp" ... +``` + ## Example The LOBSTER testsuite contains a working example: diff --git a/documentation/manual-lobster_pkg.md b/documentation/manual-lobster_pkg.md index f3040f1c9..597bdeb4d 100644 --- a/documentation/manual-lobster_pkg.md +++ b/documentation/manual-lobster_pkg.md @@ -7,6 +7,13 @@ The generated `.lobster` file can be used with the LOBSTER traceability framewor For more details on `ecu.test` see https://www.tracetronic.com/products/ecu-test/. +Per default lobster-pkg will generate a .lobster file with version 5 without schema `lobster-act-trace`. +To generate a version 3 with schema `lobster-act-trace` add the command line argument `kind`, +for example: +```bash +> lobster-pkg --kind="act" ... +``` + ## Features - Parses `.pkg` and `.ta` files (or directories containing them) to extract traceability information. diff --git a/documentation/schemas.md b/documentation/schemas.md index ac25c0a12..dd1d3c1eb 100644 --- a/documentation/schemas.md +++ b/documentation/schemas.md @@ -16,7 +16,7 @@ Each LOBSTER JSON file shares the following common structure: * _data_ is the main content * _generator_ is the name of the program that created the artefact -* _schema_ is one of the following: +* _schema_ is one of the following (only within version 1-4): * lobster-req-trace for requirements traces * lobster-imp-trace for implementation traces * lobster-act-trace for activity traces @@ -41,6 +41,7 @@ Each LOBSTER JSON file shares the following common structure: Some schemas may add additional top-level items, but these four are always present. +With version 5 schema is deprecated. The data will contain only Item elements. ### Source References @@ -132,6 +133,9 @@ location or link, for whatever reason. All items (requirements, implementation, and activities) share a few basic properties. +With version 5 requirements, implementation, and activities are deprecated. The data will contain only Item elements. + + ### Version 1-2 Deprecated. @@ -184,6 +188,8 @@ lobster this item should trace *up* to. ## Requirements +With version 5 Requirements elements are deprecated. The data will contain only Item elements. + ### Version 1-2 Deprecated. @@ -223,6 +229,8 @@ As above, but adds one new field: ## Implementation +With version 5 Implementation elements are deprecated. The data will contain only Item elements. + ### Version 1-2 Deprecated. @@ -246,6 +254,8 @@ Implementation are items, with the following additional fields: ## Activity +With version 5 Activity elements are deprecated. The data will contain only Item elements. + ### Version 1-2 Deprecated. diff --git a/lobster/common/BUILD.bazel b/lobster/common/BUILD.bazel index 4655d7eef..64019361d 100644 --- a/lobster/common/BUILD.bazel +++ b/lobster/common/BUILD.bazel @@ -36,6 +36,9 @@ py_library( "tool.py", "version.py", ], + data = [ + "tracing_policy_schema.yamale", + ], visibility = ["//visibility:public"], deps = [ requirement("pyyaml") diff --git a/lobster/common/io.py b/lobster/common/io.py index 70f487cda..4feb2df97 100644 --- a/lobster/common/io.py +++ b/lobster/common/io.py @@ -23,19 +23,25 @@ from lobster.common.errors import Message_Handler from lobster.common.location import File_Reference -from lobster.common.items import Requirement, Implementation, Activity +from lobster.common.items import Requirement, Implementation, Activity, Item def lobster_write( fd: TextIO, - kind: Union[Type[Requirement], Type[Implementation], Type[Activity]], + kind: Union[ + Type[Requirement], + Type[Implementation], + Type[Activity], + Type[Item] + ], generator: str, items: Iterable, ): - if not all(isinstance(item, kind) for item in items): - raise ValueError( - f"All elements in 'items' must be of the type {kind.__name__}!", - ) + if kind in (Requirement, Implementation, Activity): + if not all(isinstance(item, kind) for item in items): + raise ValueError( + f"All elements in 'items' must be of the type {kind.__name__}!", + ) if kind is Requirement: schema = "lobster-req-trace" @@ -43,14 +49,23 @@ def lobster_write( elif kind is Implementation: schema = "lobster-imp-trace" version = 3 - else: + elif kind is Activity: schema = "lobster-act-trace" version = 3 + else: + schema = None + version = 5 data = {"data" : list(x.to_json() for x in items), "generator" : generator, - "schema" : schema, "version" : version} + + if version < 5 and schema: + data["schema"] = schema + print(f"Lobster file version {version} " + f"containing 'schema' = '{schema}' is deprecated, " + f"please migrate to version 5") + json.dump(data, fd, indent=2) fd.write("\n") @@ -75,10 +90,11 @@ def lobster_read( err.msg) # Validate basic structure + # with version 5, lobster files do not contain lobster-specific schema anymore, if not isinstance(data, dict): mh.error(loc, "parsed json is not an object") - for rkey in ("schema", "version", "generator", "data"): + for rkey in ("version", "generator", "data"): if rkey not in data: mh.error(loc, "required top-levelkey %s not present" % rkey) if rkey == "data": @@ -91,28 +107,52 @@ def lobster_read( if not isinstance(data[rkey], str): mh.error(loc, "%s is not a string" % rkey) - # Validate indicated schema - supported_schema = { - "lobster-req-trace" : set([3, 4]), - "lobster-imp-trace" : set([3]), - "lobster-act-trace" : set([3]), - } - if data["schema"] not in supported_schema: - mh.error(loc, "unknown schema kind %s" % data["schema"]) - if data["version"] not in supported_schema[data["schema"]]: + validate_schema = False + lobster_contains_schema = "schema" in data + lobster_contains_valid_schema = False + if data["version"] < 5: + validate_schema = True + + if validate_schema or lobster_contains_schema: + if "schema" not in data: + mh.error(loc, "required top-levelkey schema not present") + if not isinstance(data["schema"], str): + mh.error(loc, "schema is not a string") + + # Validate indicated schema + supported_schema = { + "lobster-req-trace" : set([3, 4]), + "lobster-imp-trace" : set([3]), + "lobster-act-trace" : set([3]), + } + if data["schema"] not in supported_schema: + mh.error(loc, "unknown schema kind %s" % data["schema"]) + if data["version"] not in supported_schema[data["schema"]]: + mh.error( + loc, + "version %u for schema %s is not supported" % + (data["version"], data["schema"]) + ) + + lobster_contains_valid_schema = True + + if lobster_contains_schema and data["version"] >= 5: mh.error(loc, - "version %u for schema %s is not supported" % - (data["version"], data["schema"])) + "schema is not supported in version %u" % + data["version"]) duplicate_items = [] # Convert to items, and integrate into symbol table for raw in data["data"]: - if data["schema"] == "lobster-req-trace": - item = Requirement.from_json(level, raw, data["version"]) - elif data["schema"] == "lobster-imp-trace": - item = Implementation.from_json(level, raw, data["version"]) + if lobster_contains_valid_schema: + if data["schema"] == "lobster-req-trace": + item = Requirement.from_json(level, raw, data["version"]) + elif data["schema"] == "lobster-imp-trace": + item = Implementation.from_json(level, raw, data["version"]) + else: + item = Activity.from_json(level, raw, data["version"]) else: - item = Activity.from_json(level, raw, data["version"]) + item = Item.from_json(level, raw, data["version"]) if source_info is not None: item.perform_source_checks(source_info) diff --git a/lobster/common/items.py b/lobster/common/items.py index a07c50458..f5fa63e59 100644 --- a/lobster/common/items.py +++ b/lobster/common/items.py @@ -25,6 +25,13 @@ from lobster.common.location import Location +class KindTypes(str, Enum): + REQ = "req" + ACT = "act" + IMP = "imp" + ITM = "itm" + + class Tracing_Tag: def __init__( self, @@ -90,7 +97,7 @@ class Tracing_Status(Enum): class Item(metaclass=ABCMeta): - def __init__(self, tag: Tracing_Tag, location: Location): + def __init__(self, tag: Tracing_Tag, location: Location, name: str = ""): assert isinstance(tag, Tracing_Tag) assert isinstance(location, Location) @@ -98,6 +105,8 @@ def __init__(self, tag: Tracing_Tag, location: Location): self.tag = tag self.location = location self.name = tag.tag + if name: + self.name = name self.ref_up = [] self.ref_down = [] @@ -203,6 +212,8 @@ def additional_data_from_json(self, level, data, schema_version): self.just_global = data.get("just_global", []) if "tracing_status" in data: self.tracing_status = Tracing_Status[data["tracing_status"]] + if "name" in data: + self.name = data["name"] def to_json(self): rv = { @@ -222,8 +233,23 @@ def to_json(self): rv["ref_down"] = [tag.to_json() for tag in self.ref_down] if self.tracing_status: rv["tracing_status"] = self.tracing_status.name + return rv + @classmethod + def from_json(cls, level, data, schema_version): + assert isinstance(level, str) + assert isinstance(data, dict) + assert schema_version >= 3 + + item = Item(tag = Tracing_Tag.from_json(data["tag"]), + location = Location.from_json(data["location"]), + name = data.get("name", "")) + item.set_level(level) + item.additional_data_from_json(level, data, schema_version) + + return item + class Requirement(Item): def __init__( diff --git a/lobster/common/level_definition.py b/lobster/common/level_definition.py index f1963eab5..97b81fb70 100644 --- a/lobster/common/level_definition.py +++ b/lobster/common/level_definition.py @@ -5,7 +5,7 @@ @dataclass class LevelDefinition: name: str - kind: str + kind: str = "" traces: List[str] = field(default_factory=list) source: List[Any] = field(default_factory=list) needs_tracing_up: bool = False @@ -43,7 +43,7 @@ def from_json(cls, data: dict) -> 'LevelDefinition': """Create a Level instance from a JSON-compatible dictionary.""" return cls( name=data["name"], - kind=data["kind"], + kind=data.get("kind", ""), traces=data.get("traces", []), source=data.get("source", []), needs_tracing_up=data.get("needs_tracing_up", False), diff --git a/lobster/common/multi_file_input_config.py b/lobster/common/multi_file_input_config.py index 0b82f904a..ea94794cb 100644 --- a/lobster/common/multi_file_input_config.py +++ b/lobster/common/multi_file_input_config.py @@ -2,7 +2,7 @@ from typing import Iterable, Optional, Type, Union from re import Pattern -from lobster.common.items import Activity, Implementation, Requirement +from lobster.common.items import Activity, Implementation, Requirement, Item @dataclass @@ -11,4 +11,4 @@ class Config: inputs_from_file: Optional[str] extensions: Iterable[str] exclude_patterns: Optional[Iterable[Pattern]] - schema: Union[Type[Requirement], Type[Implementation], Type[Activity]] + schema: Union[Type[Requirement], Type[Implementation], Type[Activity], Type[Item]] diff --git a/lobster/common/multi_file_input_tool.py b/lobster/common/multi_file_input_tool.py index 1209e5983..2c4bcaf16 100644 --- a/lobster/common/multi_file_input_tool.py +++ b/lobster/common/multi_file_input_tool.py @@ -20,7 +20,7 @@ from abc import ABCMeta from typing import Iterable, List, Optional, Type, Union from lobster.common.errors import Message_Handler -from lobster.common.items import Requirement, Implementation, Activity +from lobster.common.items import Requirement, Implementation, Activity, Item from lobster.common.io import lobster_write, ensure_output_directory from lobster.common.meta_data_tool_base import MetaDataToolBase from lobster.common.multi_file_input_config import Config @@ -127,10 +127,15 @@ def _add_config_argument(self): ) def _write_output( - self, - schema: Union[Type[Requirement], Type[Implementation], Type[Activity]], - out_file: str, - items: List[Union[Activity, Implementation, Requirement]], + self, + schema: Union[ + Type[Requirement], + Type[Implementation], + Type[Activity], + Type[Item] + ], + out_file: str, + items: List[Union[Activity, Implementation, Requirement]], ): ensure_output_directory(out_file) with open(out_file, "w", encoding="UTF-8") as fd: diff --git a/lobster/common/report.py b/lobster/common/report.py index cb8ca8501..0f2071fcb 100644 --- a/lobster/common/report.py +++ b/lobster/common/report.py @@ -19,14 +19,37 @@ import json from collections import OrderedDict from dataclasses import dataclass +from pathlib import Path + +import yaml +import yamale from lobster.common.level_definition import LevelDefinition -from lobster.common.items import Tracing_Status, Requirement, Implementation, Activity +from lobster.common.items import ( + Tracing_Status, Requirement, Implementation, Activity, Item +) from lobster.common.parser import load as load_config from lobster.common.errors import Message_Handler from lobster.common.io import lobster_read, ensure_output_directory from lobster.common.location import File_Reference +LEVEL_DEFINITION_TAG = '!LevelDefinition' +YAMALE_SCHEMA_FILENAME = 'tracing_policy_schema.yamale' + + +class YamlConfigLoader(yaml.SafeLoader): + pass + + +def level_definition_constructor(loader, node): + values = loader.construct_mapping(node, deep=True) + return LevelDefinition(**values) + + +def ordered_dict_constructor(loader, node): + loader.flatten_mapping(node) + return OrderedDict(loader.construct_pairs(node)) + @dataclass class Coverage: @@ -57,7 +80,7 @@ def parse_config(self, filename): """ # Load config - self.config = load_config(self.mh, filename) + self.load_config_from_file(filename) # Load requested files for level in self.config: @@ -74,6 +97,77 @@ def parse_config(self, filename): # Compute coverage for items self.compute_coverage_for_items() + def validate_config_from_yaml_file(self, filename): + loc = File_Reference(filename) + + try: + full_path_name = Path(filename).resolve() + yamale_data_filename = Path( + full_path_name.parent, + f"yamale_{full_path_name.name}" + ) + + # Read the file and remove '!LevelDefinition' + with open(filename, "r", encoding="UTF-8") as yaml_file: + yaml_content = yaml_file.read() + + # Remove the tag + yamale_content = yaml_content.replace(LEVEL_DEFINITION_TAG, "") + + # Write the cleaned content to a new file + with open(yamale_data_filename, "w", encoding="UTF-8") as yamale_file: + yamale_file.write(yamale_content) + + yamale_schema_filename = Path(Path(__file__).parent, YAMALE_SCHEMA_FILENAME) + schema = yamale.make_schema(yamale_schema_filename) + data = yamale.make_data(yamale_data_filename) + yamale.validate(schema, data) + except (ValueError, FileNotFoundError, yamale.YamaleError) as e: + self.mh.error(loc, f"Failed to validate yaml config file: {e}") + + def load_config_from_yaml_file(self, filename): + loc = File_Reference(filename) + + try: + YamlConfigLoader.add_constructor( + LEVEL_DEFINITION_TAG, + level_definition_constructor + ) + YamlConfigLoader.add_constructor( + yaml.resolver.BaseResolver.DEFAULT_MAPPING_TAG, + ordered_dict_constructor + ) + + with open(filename, 'r', encoding="UTF-8") as f: + self.config = yaml.load(f, Loader=YamlConfigLoader) + except (ValueError, FileNotFoundError, yamale.YamaleError) as e: + self.mh.error(loc, f"Failed to load yaml config file: {e}") + + def print_deprecated_warning(self, filename): + loc = File_Reference(filename) + self.mh.warning(loc, + "configuration file format '.conf' is deprecated," + " please migrate to '.yaml' format") + + def print_unsupported_file_format_error(self, filename): + loc = File_Reference(filename) + self.mh.error(loc, + "configuration file format is unsupported," + " please use '.yaml' format") + + def load_config_from_conf_file(self, filename): + self.config = load_config(self.mh, filename) + + def load_config_from_file(self, filename): + if str(filename).endswith('.yaml') or str(filename).endswith('.yml'): + self.validate_config_from_yaml_file(filename) + self.load_config_from_yaml_file(filename) + elif str(filename).endswith('.conf'): + self.load_config_from_conf_file(filename) + self.print_deprecated_warning(filename) + else: + self.print_unsupported_file_format_error(filename) + def resolve_references_for_items(self): for src_item in self.items.values(): while src_item.unresolved_references: @@ -122,21 +216,28 @@ def write_report(self, filename): for level_config in self.config.values(): level = { "name" : level_config.name, - "kind" : level_config.kind, "items" : [item.to_json() for item in self.items.values() if item.level == level_config.name], "coverage" : self.coverage[level_config.name].coverage } + if level_config.kind: + level["kind"] = level_config.kind levels.append(level) + policy = {} + for level, level_definition in self.config.items(): + level_definition_dict = level_definition.to_json() + if 'kind' in level_definition_dict and level_definition_dict['kind'] == '': + del level_definition_dict['kind'] + policy[level] = level_definition_dict + report = { "schema" : "lobster-report", "version" : 2, "generator" : "lobster_report", "levels" : levels, - "policy" : {key: value.to_json() - for key, value in self.config.items()}, + "policy" : policy, "matrix" : [], } @@ -193,20 +294,25 @@ def compute_items_and_coverage_for_items(self, data): self.coverage.update({level["name"]: coverage}) for item_data in level["items"]: - if level["kind"] == "requirements": + item_kind = level.get("kind", "") + if item_kind == "requirements": item = Requirement.from_json(level["name"], item_data, 3) - elif level["kind"] == "implementation": + elif item_kind == "implementation": item = Implementation.from_json(level["name"], item_data, 3) - else: - if level["kind"] != "activity": - raise ValueError(f"unknown level kind '{level['kind']}'") + elif item_kind == "activity": item = Activity.from_json(level["name"], item_data, 3) + else: + if item_kind != "": + raise ValueError(f"unknown level kind '{item_kind}'") + item = Item.from_json(level["name"], + item_data, + 3) self.items[item.tag.key()] = item self.coverage[item.level].items += 1 diff --git a/lobster/common/tool.py b/lobster/common/tool.py index c44112d42..b29205bbf 100644 --- a/lobster/common/tool.py +++ b/lobster/common/tool.py @@ -28,7 +28,7 @@ import yaml from lobster.common.errors import Message_Handler from lobster.common.location import File_Reference -from lobster.common.items import Requirement, Implementation, Activity +from lobster.common.items import Requirement, Implementation, Activity, Item from lobster.common.io import lobster_write, ensure_output_directory from lobster.common.meta_data_tool_base import MetaDataToolBase @@ -252,13 +252,14 @@ def process_common_options( def write_output( self, options: argparse.Namespace, - items: List[Union[Activity, Implementation, Requirement]], + items: List[Union[Activity, Implementation, Requirement, Item]], ): assert isinstance(options, argparse.Namespace) assert isinstance(items, list) assert all(isinstance(item, (Requirement, Implementation, - Activity)) + Activity, + Item)) for item in items) if options.out: diff --git a/lobster/common/tracing_policy_schema.yamale b/lobster/common/tracing_policy_schema.yamale new file mode 100644 index 000000000..eb7d610bb --- /dev/null +++ b/lobster/common/tracing_policy_schema.yamale @@ -0,0 +1,15 @@ +# tracing policy yaml schema +any(map(str(), include('level_definition'))) + +--- +level_definition: + name: str() + traces: list(str(), required=False) + source: list(any(), required=False) + needs_tracing_up: bool(required=False) + needs_tracing_down: bool(required=False) + breakdown_requirements: list(any(), required=False) + raw_trace_requirements: list(any(), required=False) + serialize_needs_tracing_up: bool(required=False) + serialize_needs_tracing_down: bool(required=False) + serialize_breakdown_requirements: bool(required=False) diff --git a/lobster/tools/codebeamer/codebeamer.py b/lobster/tools/codebeamer/codebeamer.py index e14baeddc..a1e5b59c7 100755 --- a/lobster/tools/codebeamer/codebeamer.py +++ b/lobster/tools/codebeamer/codebeamer.py @@ -51,7 +51,9 @@ import yaml from urllib3.util.retry import Retry -from lobster.common.items import Tracing_Tag, Requirement, Implementation, Activity +from lobster.common.items import ( + Tracing_Tag, Requirement, Implementation, Activity, Item +) from lobster.common.location import Codebeamer_Reference from lobster.common.errors import Message_Handler, LOBSTER_Error from lobster.common.io import lobster_read, lobster_write, ensure_output_directory @@ -303,6 +305,7 @@ def get_schema_config(cb_config: Config) -> dict: 'requirement': {"namespace": "req", "class": Requirement}, 'implementation': {"namespace": "imp", "class": Implementation}, 'activity': {"namespace": "act", "class": Activity}, + 'item': {"namespace": "itm", "class": Item}, } schema = cb_config.schema.lower() @@ -378,7 +381,7 @@ def _create_common_params(namespace: str, cb_item: dict, cb_root: str, Returns: dict: Common parameters including tag, location, and kind. """ - return { + common_params = { 'tag': Tracing_Tag( namespace=namespace, tag=str(cb_item["id"]), @@ -390,9 +393,11 @@ def _create_common_params(namespace: str, cb_item: dict, cb_root: str, item=cb_item["id"], version=cb_item["version"], name=item_name - ), - 'kind': kind + ) } + if namespace != "itm": + common_params['kind'] = kind + return common_params def _create_lobster_item(schema_class, common_params, item_name, status): @@ -422,13 +427,19 @@ def _create_lobster_item(schema_class, common_params, item_name, status): name= item_name, ) - else: + elif schema_class is Activity: return Activity( **common_params, framework="codebeamer", status=status ) + else: + return Item( + **common_params, + name= item_name, + ) + def import_tagged(cb_config: Config, items_to_import: Iterable[int]): rv = [] @@ -509,7 +520,7 @@ def parse_config_data(data: dict) -> Config: import_query=data.get(SupportedConfigKeys.IMPORT_QUERY.value), verify_ssl=data.get(SupportedConfigKeys.VERIFY_SSL.value, False), page_size=data.get(SupportedConfigKeys.PAGE_SIZE.value, 100), - schema=data.get(SupportedConfigKeys.SCHEMA.value, "Requirement"), + schema=data.get(SupportedConfigKeys.SCHEMA.value, "Item"), timeout=data.get(SupportedConfigKeys.TIMEOUT.value, 30), out=data.get(SupportedConfigKeys.OUT.value), num_request_retry=data.get(SupportedConfigKeys.NUM_REQUEST_RETRY.value, 5), diff --git a/lobster/tools/codebeamer/config.py b/lobster/tools/codebeamer/config.py index be582e6b7..fee62ef8c 100644 --- a/lobster/tools/codebeamer/config.py +++ b/lobster/tools/codebeamer/config.py @@ -19,10 +19,10 @@ class Config: import_query: Union[str, int] verify_ssl: bool page_size: int - schema: str timeout: int out: str cb_auth_conf: AuthenticationConfig + schema: Optional[str] = "Item" @property def base(self) -> str: diff --git a/lobster/tools/core/html_report/html_report.py b/lobster/tools/core/html_report/html_report.py index d6dc9704d..775942a7c 100755 --- a/lobster/tools/core/html_report/html_report.py +++ b/lobster/tools/core/html_report/html_report.py @@ -77,10 +77,12 @@ def xref_item(item, link=True, brief=False): elif isinstance(item, Implementation): rv = html.escape(item.language + " " + item.kind.capitalize()) - else: - assert isinstance(item, Activity) + elif isinstance(item, Activity): rv = html.escape(item.framework + " " + item.kind.capitalize()) + else: + assert isinstance(item, Item) + rv = html.escape("Item") if not brief: rv += " " @@ -98,13 +100,15 @@ def create_policy_diagram(doc, report, dot): graph = 'digraph "LOBSTER Tracing Policy" {\n' for level in report.config.values(): + style = 'shape=box, style=rounded' + if level.kind == "requirements": style = 'shape=box, style=rounded' elif level.kind == "implementation": style = 'shape=box' - else: - assert level.kind == "activity" + elif level.kind == "activity": style = 'shape=hexagon' + style += f', href="#sec-{name_hash(level.name)}"' graph += ' n_%s [label="%s", %s];\n' % \ diff --git a/lobster/tools/core/report/report.py b/lobster/tools/core/report/report.py index f3390fed5..78ab82f22 100755 --- a/lobster/tools/core/report/report.py +++ b/lobster/tools/core/report/report.py @@ -30,13 +30,13 @@ class ReportTool(MetaDataToolBase): def __init__(self): super().__init__( name="report", - description="Generate a LOBSTER report from a lobster.conf file", + description="Generate a LOBSTER report from a lobster.yaml file", official=True, ) self._argument_parser.add_argument( "--lobster-config", metavar="FILE", - default="lobster.conf", + default="lobster.yaml", ) self._argument_parser.add_argument( "--out", diff --git a/lobster/tools/cpp/BUILD.bazel b/lobster/tools/cpp/BUILD.bazel index da7368ffb..ec9ee0d68 100644 --- a/lobster/tools/cpp/BUILD.bazel +++ b/lobster/tools/cpp/BUILD.bazel @@ -7,7 +7,7 @@ py_library( name = "cpp", srcs = [ "cpp.py", - "implementation_builder.py", + "item_builder.py", ], visibility = [ "//visibility:public", diff --git a/lobster/tools/cpp/cpp.py b/lobster/tools/cpp/cpp.py index 6d3d470a2..9b32369a5 100755 --- a/lobster/tools/cpp/cpp.py +++ b/lobster/tools/cpp/cpp.py @@ -23,9 +23,9 @@ import re from typing import Optional, Sequence -from lobster.common.items import Tracing_Tag, Implementation +from lobster.common.items import Tracing_Tag, Implementation, Item, KindTypes from lobster.common.multi_file_input_config import Config -from lobster.tools.cpp.implementation_builder import ImplementationBuilder +from lobster.tools.cpp.item_builder import ItemBuilder from lobster.common.multi_file_input_tool import create_worklist, MultiFileInputTool @@ -88,6 +88,15 @@ def __init__(self): metavar="FINDINGS", help="List of all clang-tidy errors to ignore.", ) + self._argument_parser.add_argument( + "--kind", + required=False, + choices=[KindTypes.ITM.value, KindTypes.IMP.value], + default=KindTypes.ITM.value, + help=f"Kind of LOBSTER entries to create: " + f"'{KindTypes.ITM.value}' for Item, " + f"'{KindTypes.IMP.value}' for Implementation", + ) def _add_config_argument(self): # This tool does not use a config file @@ -99,8 +108,12 @@ def _run_impl(self, options: Namespace) -> int: inputs_from_file=None, extensions=self._extensions, exclude_patterns=None, - schema=Implementation, + schema=Item, ) + + if options.kind == KindTypes.IMP.value: + config.schema = Implementation + file_list = create_worklist(config, options.dir_or_files) clang_tidy_path = os.path.expanduser(options.clang_tidy) @@ -158,7 +171,7 @@ def _run_impl(self, options: Namespace) -> int: return 1 db = {} - implementation_builder = ImplementationBuilder() + item_builder = ItemBuilder() for line in rv.stdout.splitlines(): if not line.endswith("[lobster-tracing]"): @@ -166,23 +179,23 @@ def _run_impl(self, options: Namespace) -> int: match = re.match(RE_NOTAGS, line) if match: - impl = implementation_builder.from_match(match) + impl = item_builder.from_match(match) assert impl.tag.key() not in db db[impl.tag.key()] = impl continue match = re.match(RE_JUST, line) if match: - impl = implementation_builder.from_match_if_new(db, match) + impl = item_builder.from_match_if_new(db, match) impl.just_up.append( - match.group(implementation_builder.REASON_GROUP_NUM), + match.group(item_builder.REASON_GROUP_NUM), ) continue match = re.match(RE_TAGS, line) if match: - impl = implementation_builder.from_match_if_new(db, match) - all_tags = match.group(implementation_builder.REFERENCE_GROUP_NUM) + impl = item_builder.from_match_if_new(db, match) + all_tags = match.group(item_builder.REFERENCE_GROUP_NUM) for tag in re.split(r"[, ]+", all_tags.strip()): if tag: impl.add_tracing_target( diff --git a/lobster/tools/cpp/implementation_builder.py b/lobster/tools/cpp/item_builder.py similarity index 63% rename from lobster/tools/cpp/implementation_builder.py rename to lobster/tools/cpp/item_builder.py index c0004dc4b..214d6be85 100644 --- a/lobster/tools/cpp/implementation_builder.py +++ b/lobster/tools/cpp/item_builder.py @@ -1,11 +1,11 @@ from os.path import abspath from typing import Dict, Match from lobster.common.file_tag_generator import FileTagGenerator -from lobster.common.items import Implementation, Tracing_Tag +from lobster.common.items import Implementation, Item, Tracing_Tag, KindTypes from lobster.common.location import File_Reference -class ImplementationBuilder: +class ItemBuilder: """ A specialized file tag generator for C/C++ files. It generates Tracing_Tag and File_Reference objects based on the file name and line @@ -15,26 +15,28 @@ class ImplementationBuilder: MIN_NUM_GROUPS = 4 REASON_GROUP_NUM = MIN_NUM_GROUPS + 1 REFERENCE_GROUP_NUM = MIN_NUM_GROUPS + 1 + kind: str = KindTypes.ITM.value - def __init__(self) -> None: + def __init__(self, kind: str = KindTypes.ITM.value) -> None: + self.kind = kind self._generator = FileTagGenerator() def from_match_if_new( self, - db: Dict[str, Implementation], + db: Dict[str, Item], match: Match, - ) -> Implementation: + ) -> Item: """ - Builds and insert a new Implementation object into the database if it does not - already exist. - Otherwise, it returns the existing Implementation object. + Builds and insert a new Item or Implementation object into the database + if it does not already exist. + Otherwise, it returns the existing Item or Implementation object. """ impl = self.from_match(match) return db.setdefault(impl.tag.key(), impl) - def from_match(self, match: Match) -> Implementation: + def from_match(self, match: Match) -> Item: """ - Generate an Implementation object from a regex match object. + Generate an Item or Implementation object from a regex match object. """ filename, line_nr, kind, function_name, *_ = match.groups() try: @@ -43,14 +45,22 @@ def from_match(self, match: Match) -> Implementation: raise ValueError(f"Invalid line number '{line_nr}' " f"in regex group '{match.group(2)}'!") from exc - return Implementation( + item = Item( tag = self._get_tag(filename, function_name, line_nr), location = self._get_location(filename, line_nr), - language = "C/C++", - kind = kind, - name = function_name, ) + if self.kind == KindTypes.IMP.value: + item = Implementation( + tag = self._get_tag(filename, function_name, line_nr), + location = self._get_location(filename, line_nr), + language = "C/C++", + kind = kind, + name = function_name, + ) + + return item + def _get_tag(self, file: str, function_name: str, line_nr: int) -> Tracing_Tag: """ Generate a unique tag for the given file. diff --git a/lobster/tools/cpptest/cpptest.py b/lobster/tools/cpptest/cpptest.py index 377c3b6ba..7cc77bc93 100644 --- a/lobster/tools/cpptest/cpptest.py +++ b/lobster/tools/cpptest/cpptest.py @@ -23,11 +23,10 @@ from copy import copy from dataclasses import dataclass, field from typing import List, Optional, Sequence, Union -from enum import Enum import yaml from lobster.common.errors import LOBSTER_Error from lobster.common.exceptions import LOBSTER_Exception -from lobster.common.items import Tracing_Tag, Activity +from lobster.common.items import Tracing_Tag, Activity, Item, KindTypes from lobster.common.location import File_Reference from lobster.common.io import lobster_write, ensure_output_directory from lobster.common.file_tag_generator import FileTagGenerator @@ -52,12 +51,6 @@ TOOL_NAME = "lobster-cpptest" -class KindTypes(str, Enum): - REQ = "req" - ACT = "act" - IMP = "imp" - - @dataclass class Config: codebeamer_url: str @@ -107,7 +100,7 @@ def parse_config_file(file_name: str) -> Config: f'Missing attribute {CODEBEAMER_URL}') codebeamer_url = config_dict.get(CODEBEAMER_URL) - kind = config_dict.get(KIND, KindTypes.REQ.value) + kind = config_dict.get(KIND, KindTypes.ITM.value) files = config_dict.get(FILES, ["."]) output_file = config_dict.get(OUTPUT_FILE, "report.lobster") @@ -241,19 +234,26 @@ def create_lobster_items_output_dict_from_test_cases( tag = Tracing_Tag(NAMESPACE_CPP, function_uid) loc = File_Reference(file_name, line_nr) key = tag.key() + item_kind = config.kind - activity = \ - Activity( + item = \ + Item( tag=tag, - location=loc, - framework=FRAMEWORK_CPP_TEST, - kind=KIND_FUNCTION + location=loc ) + if item_kind != KindTypes.ITM.value: + item = \ + Activity( + tag=tag, + location=loc, + framework=FRAMEWORK_CPP_TEST, + kind=KIND_FUNCTION + ) + contains_no_tracing_target = True tracing_target_list = [] - tracing_target_kind = config.kind for test_case_marker_value in getattr( test_case, REQUIREMENTS @@ -262,14 +262,14 @@ def create_lobster_items_output_dict_from_test_cases( test_case_marker_value = ( test_case_marker_value.replace(CB_PREFIX, "")) tracing_target = Tracing_Tag( - tracing_target_kind, + item_kind, test_case_marker_value ) tracing_target_list.append(tracing_target) if len(tracing_target_list) >= 1: contains_no_tracing_target = False - lobster_item = copy(activity) + lobster_item = copy(item) for tracing_target in tracing_target_list: lobster_item.add_tracing_target(tracing_target) @@ -278,12 +278,14 @@ def create_lobster_items_output_dict_from_test_cases( if contains_no_tracing_target: lobster_items_output_dict.get(ORPHAN_TESTS)[key] = ( - activity) + item) return lobster_items_output_dict -def write_lobster_items_output_dict(lobster_items_output_dict: dict): +def write_lobster_items_output_dict( + lobster_items_output_dict: dict, + config: Config) -> None: """ Write the lobster items to the output. If the output file name is empty everything is written to stdout. @@ -302,12 +304,16 @@ def write_lobster_items_output_dict(lobster_items_output_dict: dict): lobster_items_dict: dict = copy(lobster_items) lobster_items_dict.update(orphan_test_items) item_count = len(lobster_items_dict) + kind = config.kind + lobster_kind = Item + if kind != KindTypes.ITM.value: + lobster_kind = Activity ensure_output_directory(output_file_name) with open(output_file_name, "w", encoding="UTF-8") as output_file: lobster_write( output_file, - Activity, + lobster_kind, lobster_generator, lobster_items_dict.values() ) @@ -345,7 +351,8 @@ def run_lobster_cpptest(config: Config): ) write_lobster_items_output_dict( - lobster_items_output_dict=lobster_items_output_dict + lobster_items_output_dict=lobster_items_output_dict, + config=config ) diff --git a/lobster/tools/gtest/gtest.py b/lobster/tools/gtest/gtest.py index 1ebc22bef..dc22ab1e9 100755 --- a/lobster/tools/gtest/gtest.py +++ b/lobster/tools/gtest/gtest.py @@ -23,7 +23,7 @@ from typing import Optional, Sequence import xml.etree.ElementTree as ET -from lobster.common.items import Tracing_Tag, Activity +from lobster.common.items import Tracing_Tag, Activity, Item, KindTypes from lobster.common.location import Void_Reference, File_Reference from lobster.common.io import lobster_write, ensure_output_directory from lobster.common.meta_data_tool_base import MetaDataToolBase @@ -42,6 +42,15 @@ def __init__(self): metavar="FILE|DIR", ) self._argument_parser.add_argument("--out", default=None) + self._argument_parser.add_argument( + "--kind", + required=False, + choices=[KindTypes.ITM.value, KindTypes.ACT.value], + default=KindTypes.ITM.value, + help=f"Kind of LOBSTER entries to create: " + f"'{KindTypes.ITM.value}' for Item, " + f"'{KindTypes.ACT.value}' for Activity, ", + ) def _run_impl(self, options: Namespace) -> int: c_files_rel = {} @@ -74,7 +83,12 @@ def _run_impl(self, options: Namespace) -> int: items = [] for filename in file_list: - tree = ET.parse(filename) + try: + tree = ET.parse(filename) + except ET.ParseError as parse_error: + print(f"Warning: Could not parse XML file '{filename}': {parse_error}", + file=sys.stderr) + continue root = tree.getroot() if root.tag != "testsuites": continue @@ -130,23 +144,31 @@ def _run_impl(self, options: Namespace) -> int: status = "not run" tag = Tracing_Tag("gtest", uid) - item = Activity(tag = tag, - location = test_source, - framework = "GoogleTest", - kind = "test", - status = status) + if options.kind == KindTypes.ACT.value: + item = Activity(tag = tag, + location = test_source, + framework = "GoogleTest", + kind = "test", + status = status) + else: + item = Item(tag = tag, + location = test_source) for ref in test_tags: item.add_tracing_target(Tracing_Tag("req", ref)) items.append(item) + lobster_kind = Item + if options.kind == KindTypes.ACT.value: + lobster_kind = Activity + if options.out: ensure_output_directory(options.out) with open(options.out, "w", encoding="UTF-8") as fd: - lobster_write(fd, Activity, "lobster_gtest", items) + lobster_write(fd, lobster_kind, "lobster_gtest", items) print(f"Written output for {len(items)} items to {options.out}") else: - lobster_write(sys.stdout, Activity, "lobster_gtest", items) + lobster_write(sys.stdout, lobster_kind, "lobster_gtest", items) print() return 0 diff --git a/lobster/tools/json/json.py b/lobster/tools/json/json.py index 75dd2b05a..ec7bf432c 100755 --- a/lobster/tools/json/json.py +++ b/lobster/tools/json/json.py @@ -23,7 +23,7 @@ from typing import Optional, Sequence, Tuple, List, Set from lobster.common.tool import LOBSTER_Per_File_Tool -from lobster.common.items import Tracing_Tag, Activity +from lobster.common.items import Tracing_Tag, Activity, Item, KindTypes from lobster.common.location import File_Reference @@ -79,7 +79,16 @@ def __init__(self): name = "json", description = "Extract tracing data from JSON files.", extensions = ["json"], - official = True) + official = True + ) + self._argument_parser.add_argument( + "--kind", + required=False, + choices=["itm", "act"], + default="itm", + help="Kind of LOBSTER entries to create: " + "'itm' for Item, 'act' for Activity", + ) # Supported config parameters for lobster-json TEST_LIST = "test_list" @@ -100,7 +109,7 @@ def get_config_keys_manual(cls): cls.TAG_ATTRIBUTE: "Member name indicator for test tracing tags.", cls.JUSTIFICATION_ATTRIBUTE: "Member name indicator for " "justifications.", - cls.SINGLE: "Avoid use of multiprocessing." + cls.SINGLE: "Avoid use of multiprocessing.", } ) return help_dict @@ -136,10 +145,12 @@ def process_tool_options( work_list: List[Tuple[File_Reference, str]], ): super().process_tool_options(options, work_list) - self.schema = Activity + self.schema = Item + if options.kind == KindTypes.ACT.value: + self.schema = Activity @classmethod - def process(cls, options, file_name) -> Tuple[bool, List[Activity]]: + def process(cls, options, file_name) -> Tuple[bool, List[Item]]: try: with open(file_name, "r", encoding="UTF-8") as fd: data = json.load(fd) @@ -205,13 +216,20 @@ def process(cls, options, file_name) -> Tuple[bool, List[Activity]]: " or list", item_just) - l_item = Activity( - tag = Tracing_Tag(namespace = "json", - tag = "%s:%s" % - (file_name, item_name)), - location = File_Reference(file_name), - framework = "JSON", - kind = "Test Vector") + if options.kind == KindTypes.ACT.value: + l_item = Activity( + tag = Tracing_Tag(namespace = "json", + tag = "%s:%s" % + (file_name, item_name)), + location = File_Reference(file_name), + framework = "JSON", + kind = "Test Vector") + else: + l_item = Item( + tag = Tracing_Tag(namespace = "json", + tag = "%s:%s" % + (file_name, item_name)), + location = File_Reference(file_name)) for tag in item_tags: l_item.add_tracing_target( Tracing_Tag(namespace = "req", diff --git a/lobster/tools/pkg/pkg.py b/lobster/tools/pkg/pkg.py index 7dd41c43a..7af63b838 100644 --- a/lobster/tools/pkg/pkg.py +++ b/lobster/tools/pkg/pkg.py @@ -28,7 +28,7 @@ from lobster.common.multi_file_input_config import Config from lobster.common.multi_file_input_tool import create_worklist, MultiFileInputTool from lobster.common.exceptions import LOBSTER_Exception -from lobster.common.items import Activity, Tracing_Tag +from lobster.common.items import Item, Activity, Tracing_Tag, KindTypes from lobster.common.location import File_Reference NS = { @@ -39,43 +39,59 @@ def create_raw_entry( - data: Dict[str, Activity], file_name: str, trace_list: list -) -> None: + data: Dict[str, Item], + file_name: str, + trace_list: list, + kind: str = KindTypes.ITM.value) -> None: - activity_list = json.loads(trace_list) + item_list = json.loads(trace_list) # Collect all traces marked as "first" traces = [] - for item in activity_list: - if item.get("activity") == "first": + for item in item_list: + if item.get("item") == "first": trace_parts = [s.strip() for s in re.split(r"[:,]", item.get("trace"))] traces.extend(trace_parts[1:]) # skip the "lobster-trace" prefix tag = Tracing_Tag("pkg", f"{file_name}") loc = File_Reference(file_name) - data[tag.key()] = Activity( - tag=tag, location=loc, framework="lobster-pkg", kind="test" - ) - for trace_value in traces: - data[tag.key()].add_tracing_target(Tracing_Tag("req", trace_value)) + if kind == KindTypes.ACT.value: + data[tag.key()] = Activity( + tag=tag, location=loc, framework="lobster-pkg", kind="test" + ) + for trace_value in traces: + data[tag.key()].add_tracing_target(Tracing_Tag("req", trace_value)) + else: + data[tag.key()] = Item( + tag=tag, location=loc + ) + for trace_value in traces: + data[tag.key()].add_tracing_target(Tracing_Tag("itm", trace_value)) # Handle other activities (if any) - for item in activity_list: - if item.get("activity") != "first": + for item in item_list: + if item.get("item") != "first": trace2 = [s.strip() for s in re.split(r"[:,]", item.get("trace"))] action = item.get("action") line = item.get("line") tag = Tracing_Tag("pkg", f"{file_name}::{action}::{line}") loc = File_Reference(file_name, int(item.get("line"))) - data[tag.key()] = Activity( - tag=tag, location=loc, framework="lobster-pkg", kind="test" - ) - for trace_value in trace2[1:]: - data[tag.key()].add_tracing_target(Tracing_Tag("req", trace_value)) - - -def create_default_activity(file_content, file_name: str, - data: Dict[str, Activity]) -> None: - # Only create a default Activity entry for packages with + if kind == KindTypes.ACT.value: + data[tag.key()] = Activity( + tag=tag, location=loc, framework="lobster-pkg", kind="test" + ) + for trace_value in trace2[1:]: + data[tag.key()].add_tracing_target(Tracing_Tag("req", trace_value)) + else: + data[tag.key()] = Item( + tag=tag, location=loc + ) + for trace_value in trace2[1:]: + data[tag.key()].add_tracing_target(Tracing_Tag("itm", trace_value)) + + +def create_default_item(file_content, file_name: str, + data: Dict[str, Item], kind: str = KindTypes.ITM.value) -> None: + # Only create a default Item entry for packages with # the TESTCASE tag # Check for TESTCASE tag in INFORMATION/TAGS tree = ET.fromstring(file_content) @@ -95,16 +111,22 @@ def create_default_activity(file_content, file_name: str, if is_testcase: tag = Tracing_Tag("pkg", f"{file_name}") loc = File_Reference(file_name) - data[tag.key()] = Activity( - tag=tag, - location=loc, - framework="lobster-pkg", - kind="test", - ) + if kind == KindTypes.ACT.value: + data[tag.key()] = Activity( + tag=tag, + location=loc, + framework="lobster-pkg", + kind="test", + ) + else: + data[tag.key()] = Item( + tag=tag, + location=loc, + ) def xml_parser(file_content, filename): - activity_list = [] + item_list = [] misplaced_lobster_lines = [] tree = ET.fromstring(file_content) @@ -118,7 +140,7 @@ def xml_parser(file_content, filename): is_testcase = True break if not is_testcase: - return activity_list + return item_list tag_teststep = f"{{{NS['ecu']}}}TESTSTEP" tag_value = f"{{{NS['ecu']}}}VALUE" @@ -128,7 +150,7 @@ def xml_parser(file_content, filename): ".//ecu:TESTSTEPS", NS ) if teststeps_parent is None: - return activity_list + return item_list # Find the first relevant TsBlock (first level under TESTSTEPS) first_level_tsblocks = [ @@ -137,7 +159,7 @@ def xml_parser(file_content, filename): if elem.tag == tag_teststep and elem.attrib.get("name") == TSBLOCK ] if not first_level_tsblocks: - return activity_list + return item_list # The first TsBlock determines the allowed parent level allowed_parent = first_level_tsblocks[0] @@ -177,9 +199,9 @@ def xml_parser(file_content, filename): for trace_search in obj_value: if "lobster-trace:" in (trace_search.text or ""): if is_allowed: - # Allowed: add to activity_list - activity_obj = {"trace": trace_search.text, "activity": "first"} - activity_list.append(activity_obj) + # Allowed: add to item_list + item_obj = {"trace": trace_search.text, "item": "first"} + item_list.append(item_obj) else: # Misplaced: not at allowed nesting search_string = trace_search.text @@ -195,7 +217,7 @@ def xml_parser(file_content, filename): f" at line(s): {misplaced_lobster_lines}" ) - return activity_list + return item_list def extract_lobster_traces_from_trace_analysis(tree, filename): @@ -237,7 +259,7 @@ def extract_lobster_traces_from_trace_analysis(tree, filename): valid_traces.append( { "trace": child.text.strip(), - "activity": "first", + "item": "first", "name": episode.findtext( "ecu:NAME", default="", namespaces=NS ), @@ -267,6 +289,14 @@ def __init__(self): extensions=["pkg", "ta"], official=True, ) + self._argument_parser.add_argument( + "--kind", + required=False, + choices=["itm", "act"], + default="itm", + help="Kind of LOBSTER entries to create: " + "'itm' for Item, 'act' for Activity", + ) def _add_config_argument(self): # This tool does not use a config file @@ -292,8 +322,12 @@ def lobster_pkg(self, options): inputs_from_file=None, extensions=self._extensions, exclude_patterns=None, - schema=Activity, + schema=Item, ) + + if options.kind == KindTypes.ACT.value: + config.schema = Activity + file_list = create_worklist(config, options.dir_or_files) if not file_list: raise ValueError("No input files found to process!") @@ -321,9 +355,19 @@ def lobster_pkg(self, options): print(msg) if getvalues: - create_raw_entry(data, file.name, json.dumps(getvalues)) + create_raw_entry( + data, + file.name, + json.dumps(getvalues), + kind=options.kind + ) else: - create_default_activity(file_content, filename, data) + create_default_item( + file_content, + filename, + data, + kind=options.kind + ) except ET.ParseError as err: print(f"Error parsing XML file '{filename}' : {err}") diff --git a/lobster/tools/python/python.py b/lobster/tools/python/python.py index 4ffe1945a..0031f05ca 100755 --- a/lobster/tools/python/python.py +++ b/lobster/tools/python/python.py @@ -28,7 +28,7 @@ from libcst.metadata import PositionProvider import libcst as cst -from lobster.common.items import Tracing_Tag, Implementation, Activity +from lobster.common.items import Tracing_Tag, Implementation, Activity, Item, KindTypes from lobster.common.location import File_Reference from lobster.common.io import lobster_write, ensure_output_directory from lobster.common.meta_data_tool_base import MetaDataToolBase @@ -134,7 +134,7 @@ def to_json(self): "children" : [x.to_json() for x in self.children]} def to_lobster(self, schema, items): - assert schema is Implementation or schema is Activity + assert schema is Implementation or schema is Activity or schema is Item assert isinstance(items, list) assert False @@ -173,7 +173,7 @@ def __init__(self, location, name): super().__init__(location, name, "Module") def to_lobster(self, schema, items): - assert schema is Implementation or schema is Activity + assert schema is Implementation or schema is Activity or schema is Item assert isinstance(items, list) for node in self.children: node.to_lobster(schema, items) @@ -184,7 +184,7 @@ def __init__(self, location, name): super().__init__(location, name, "Class") def to_lobster(self, schema, items): - assert schema is Implementation or schema is Activity + assert schema is Implementation or schema is Activity or schema is Item assert isinstance(items, list) # Classes are dealt with a bit differently. If you add a tag # or justification to a class, then children are ignored, and @@ -247,7 +247,7 @@ def set_parent(self, node): self.kind = "Method" def to_lobster(self, schema, items): - assert schema is Implementation or schema is Activity + assert schema is Implementation or schema is Activity or schema is Item assert isinstance(items, list) func_name.append(self.fqn()) @@ -258,7 +258,10 @@ def to_lobster(self, schema, items): val = re.split(pattern, tagname) name_value = val[0] - if schema is Implementation: + if schema is Item: + l_item = Item(tag = Tracing_Tag("itm", tagname), + location = self.location) + elif schema is Implementation: l_item = Implementation(tag = Tracing_Tag("python", tagname), location = self.location, @@ -423,10 +426,13 @@ def process_file(file_name, options): visitor = Lobster_Visitor(file_name, options) ast.visit(visitor) - if options["activity"]: - visitor.module.to_lobster(Activity, items) + if options["kind"] == KindTypes.ITM.value: + visitor.module.to_lobster(Item, items) else: - visitor.module.to_lobster(Implementation, items) + if options["activity"]: + visitor.module.to_lobster(Activity, items) + else: + visitor.module.to_lobster(Implementation, items) if options["exclude_untagged"]: items = [item for item in items if item.unresolved_references] @@ -472,6 +478,15 @@ def __init__(self): default=False, action="store_true", help="only trace functions with tags") + ap.add_argument( + "--kind", + required=False, + choices=[KindTypes.ITM.value, KindTypes.IMP.value], + default=KindTypes.ITM.value, + help=f"Kind of LOBSTER entries to create: " + f"'{KindTypes.ITM.value}' for Item, " + f"'{KindTypes.IMP.value}' for Implementation", + ) grp = ap.add_mutually_exclusive_group() grp.add_argument("--parse-decorator", nargs=2, @@ -503,6 +518,7 @@ def _run_impl(self, options: Namespace) -> int: "dec_arg_version" : None, "exclude_untagged" : options.only_tagged_functions, "namespace" : "req", + "kind" : options.kind, } if options.parse_decorator[0] is not None: @@ -528,10 +544,12 @@ def _run_impl(self, options: Namespace) -> int: ok &= new_ok items += new_items - if options.activity: - schema = Activity - else: - schema = Implementation + schema = Item + if options.kind != KindTypes.ITM.value: + if options.activity: + schema = Activity + else: + schema = Implementation if options.out: ensure_output_directory(options.out) diff --git a/lobster/tools/trlc/conversion_rule.py b/lobster/tools/trlc/conversion_rule.py index 7f6ad91a7..c23b8fcff 100644 --- a/lobster/tools/trlc/conversion_rule.py +++ b/lobster/tools/trlc/conversion_rule.py @@ -13,7 +13,7 @@ def __init__( self, package: str, record_type: str, - namespace: str, + namespace: Optional[str] = "itm", version_field: Optional[str] = None, description_fields: Optional[Union[str, Iterable[str]]] = None, justification_up_fields: Optional[Union[str, Iterable[str]]] = None, @@ -24,7 +24,8 @@ def __init__( ): self._record_type_name = record_type self._package_name = package - self._lobster_namespace = namespace + if namespace: + self._lobster_namespace = namespace self._version = version_field self._description_fields = self._as_string_list(description_fields) self._justification_up_fields = self._as_string_list(justification_up_fields) diff --git a/lobster/tools/trlc/converter.py b/lobster/tools/trlc/converter.py index f5a00fbcc..9da58128e 100644 --- a/lobster/tools/trlc/converter.py +++ b/lobster/tools/trlc/converter.py @@ -1,7 +1,7 @@ from typing import Iterable, List, Optional from trlc import ast -from lobster.common.items import Item, Requirement, Tracing_Tag +from lobster.common.items import Item, Requirement, Tracing_Tag, KindTypes from lobster.common.location import File_Reference from lobster.tools.trlc.conversion_rule import ConversionRule from lobster.tools.trlc.conversion_rule_lookup import ( @@ -85,7 +85,7 @@ def generate_lobster_object(self, n_obj: ast.Record_Object) -> Optional[Item]: if not rule: return None - if rule.lobster_namespace != "req": + if rule.lobster_namespace not in (KindTypes.REQ.value, KindTypes.ITM.value): raise NotImplementedError( f"Conversion for namespace '{rule.lobster_namespace}' not implemented." ) @@ -106,16 +106,22 @@ def generate_lobster_object(self, n_obj: ast.Record_Object) -> Optional[Item]: column=n_obj.location.col_no ) - item_text = self._get_description(item_wrapper, rule.description_fields) - rv = Requirement( + rv = Item( tag=item_tag, location=item_loc, - framework="TRLC", - kind=n_obj.n_typ.name, - name=n_obj.fully_qualified_name(), - text=item_text ) + if rule.lobster_namespace == KindTypes.REQ.value: + item_text = self._get_description(item_wrapper, rule.description_fields) + rv = Requirement( + tag=item_tag, + location=item_loc, + framework="TRLC", + kind=n_obj.n_typ.name, + name=n_obj.fully_qualified_name(), + text=item_text + ) + for tag_entry in rule.tags: for field_str_value in self._generate_text(item_wrapper, tag_entry.field): tag = Tracing_Tag.from_text(tag_entry.namespace, field_str_value) diff --git a/lobster/tools/trlc/schema.yamale b/lobster/tools/trlc/schema.yamale index cdd10f800..c98e828d5 100644 --- a/lobster/tools/trlc/schema.yamale +++ b/lobster/tools/trlc/schema.yamale @@ -17,8 +17,8 @@ conversion_rule: include('conversion_rule_properties') --- conversion_rule_properties: package: str() - record-type: str() - namespace: str() + record-type: str(required=False) + namespace: str(required=False) version-field: str(required=False) description-fields: any(str(), list(str()), required=False) justification-down-fields: any(str(), list(str()), required=False) diff --git a/lobster/tools/trlc/trlc_tool.py b/lobster/tools/trlc/trlc_tool.py index 6a951d432..90140306a 100644 --- a/lobster/tools/trlc/trlc_tool.py +++ b/lobster/tools/trlc/trlc_tool.py @@ -28,7 +28,7 @@ from trlc.trlc import Source_Manager from lobster.common.errors import PathError -from lobster.common.items import Requirement +from lobster.common.items import Requirement, Item, KindTypes from lobster.common.multi_file_input_tool import create_worklist, MultiFileInputTool from lobster.tools.trlc.converter import Converter @@ -130,8 +130,17 @@ def _execute(self, options: argparse.Namespace) -> None: if item: items.append(item) + lobster_kind = Item + only_contains_req_namespaces = True + for conversion_rule in config.conversion_rules: + if conversion_rule.lobster_namespace != KindTypes.REQ.value: + only_contains_req_namespaces = False + + if only_contains_req_namespaces: + lobster_kind = Requirement + # lobster-trace: trlc_req.Output_File - self._write_output(Requirement, options.out, items) + self._write_output(lobster_kind, options.out, items) def main(args: Optional[Sequence[str]] = None) -> int: diff --git a/packages/lobster-core/setup.py b/packages/lobster-core/setup.py index d89fe9e05..24fd3c30a 100644 --- a/packages/lobster-core/setup.py +++ b/packages/lobster-core/setup.py @@ -52,6 +52,7 @@ "lobster.tools.core.online_report", "lobster.tools.core.online_report_nogit", "lobster.tools.core.report"], + package_data={"lobster.common": ["*.yamale"]}, install_requires=[ "Markdown~=3.7", "PyYAML>=6.0", diff --git a/tests_integration/projects/basic/BUILD.bazel b/tests_integration/projects/basic/BUILD.bazel index d14d6d081..f9957bb88 100644 --- a/tests_integration/projects/basic/BUILD.bazel +++ b/tests_integration/projects/basic/BUILD.bazel @@ -25,7 +25,7 @@ lobster_raw( lobster_test( name = "traceability", - config = "lobster-bazel.conf", + config = "lobster-bazel.yaml", inputs = [ ":software-requirements", ":system-requirements", diff --git a/tests_integration/projects/basic/Makefile b/tests_integration/projects/basic/Makefile index 6bb9bdcdd..613110205 100644 --- a/tests_integration/projects/basic/Makefile +++ b/tests_integration/projects/basic/Makefile @@ -13,7 +13,7 @@ REFERENCE_OUTPUT_CI:='ci_report.reference_output.log' PYTHON = python3 UPDATE_GIT_HASHES_SCRIPT:='../../../tests_system/tests_utils/update_online_json_with_hashes.py' -html_report.html: cppcode.lobster gtests.lobster mcode.lobster system-requirements.lobster software-requirements.lobster lobster.conf pycode.lobster json.lobster +html_report.html: cppcode.lobster gtests.lobster mcode.lobster system-requirements.lobster software-requirements.lobster lobster.yaml pycode.lobster json.lobster @bash -c "lobster-report && echo '✅ lobster-report succeeded!' || { echo '❌ ERROR: lobster-report failed!'; exit 1; }" @bash -c "lobster-online-report && echo '✅ lobster-online-report succeeded!' || { echo '❌ ERROR: lobster-online-report failed!'; exit 1; }" @if diff online_report.lobster $(REFERENCE_OUTPUT); then echo '✅ Files are identical!'; else { echo '❌ ERROR: Files are different!'; exit 1; }; fi diff --git a/tests_integration/projects/basic/lobster-bazel.yaml b/tests_integration/projects/basic/lobster-bazel.yaml new file mode 100644 index 000000000..9328da042 --- /dev/null +++ b/tests_integration/projects/basic/lobster-bazel.yaml @@ -0,0 +1,31 @@ +System Requirements: !LevelDefinition + name: System Requirements + source: + - file: system-requirements.lobster + needs_tracing_down: true + breakdown_requirements: + - - Software Requirements + +Software Requirements: !LevelDefinition + name: Software Requirements + source: + - file: software-requirements.lobster + needs_tracing_up: true + traces: + - System Requirements + needs_tracing_down: true + breakdown_requirements: + - - Code + - Verification Test + +Code: !LevelDefinition + name: Code + needs_tracing_up: true + traces: + - Software Requirements + +Verification Test: !LevelDefinition + name: Verification Test + needs_tracing_up: true + traces: + - Software Requirements diff --git a/tests_integration/projects/basic/lobster.yaml b/tests_integration/projects/basic/lobster.yaml new file mode 100644 index 000000000..3cada835f --- /dev/null +++ b/tests_integration/projects/basic/lobster.yaml @@ -0,0 +1,39 @@ +System Requirements: !LevelDefinition + name: System Requirements + source: + - file: system-requirements.lobster + needs_tracing_down: true + breakdown_requirements: + - - Software Requirements + +Software Requirements: !LevelDefinition + name: Software Requirements + source: + - file: software-requirements.lobster + needs_tracing_up: true + traces: + - System Requirements + needs_tracing_down: true + breakdown_requirements: + - - Code + - - Verification Test + +Code: !LevelDefinition + name: Code + source: + - file: cppcode.lobster + - file: mcode.lobster + - file: pycode.lobster + needs_tracing_up: true + traces: + - Software Requirements + +Verification Test: !LevelDefinition + name: Verification Test + source: + - file: gtests.lobster + - file: mtests.lobster + - file: json.lobster + needs_tracing_up: true + traces: + - Software Requirements diff --git a/tests_integration/projects/basic/report.reference_output.lobster b/tests_integration/projects/basic/report.reference_output.lobster index 350f077a8..da3601f30 100644 --- a/tests_integration/projects/basic/report.reference_output.lobster +++ b/tests_integration/projects/basic/report.reference_output.lobster @@ -5,7 +5,6 @@ "levels": [ { "name": "System Requirements", - "kind": "requirements", "items": [ { "tag": "req 12345@42", @@ -28,18 +27,13 @@ "req example.req_xor", "req example.req_nand@30" ], - "tracing_status": "OK", - "framework": "codebeamer", - "kind": "functional requirement", - "text": "Provide a nice demonstration of LOBSTER through four examples", - "status": "Potato" + "tracing_status": "OK" } ], "coverage": 100.0 }, { "name": "Software Requirements", - "kind": "requirements", "items": [ { "tag": "req example.req_implication@10", @@ -63,11 +57,7 @@ "cpp foo.cpp:1:implication:3", "gtest ImplicationTest:BasicTest" ], - "tracing_status": "OK", - "framework": "TRLC", - "kind": "Tagged_Requirement", - "text": "text: provide a utility function for logical implication", - "status": null + "tracing_status": "OK" }, { "tag": "req example.req_xor", @@ -93,11 +83,7 @@ "json example.json:XOR Test 1", "json example.json:XOR Test 2" ], - "tracing_status": "MISSING", - "framework": "TRLC", - "kind": "Tagged_Requirement", - "text": "text: provide a utility function for logical exclusive or", - "status": null + "tracing_status": "MISSING" }, { "tag": "req example.req_nand@30", @@ -121,11 +107,7 @@ "matlab nand", "matlab nand_test::test_1" ], - "tracing_status": "OK", - "framework": "TRLC", - "kind": "Tagged_Requirement", - "text": "text: provide a utility function for logical negated and\n\nextra_text: potato", - "status": null + "tracing_status": "OK" }, { "tag": "req example.req_nor@40", @@ -147,14 +129,10 @@ "ref_up": [], "ref_down": [ "req example.req_important", - "python nor.Example.helper_function", - "python nor.Example.nor" + "itm nor.Example.helper_function", + "itm nor.Example.nor" ], - "tracing_status": "MISSING", - "framework": "TRLC", - "kind": "Requirement", - "text": "provide a utility function for logical negated or", - "status": null + "tracing_status": "MISSING" }, { "tag": "req example.req_implies", @@ -174,11 +152,7 @@ "also not needed" ], "just_global": [], - "tracing_status": "JUSTIFIED", - "framework": "TRLC", - "kind": "Requirement", - "text": "provide a utility function for logical implication", - "status": null + "tracing_status": "JUSTIFIED" }, { "tag": "req example.req_important", @@ -204,18 +178,13 @@ "req example.req_implication" ], "ref_down": [], - "tracing_status": "MISSING", - "framework": "TRLC", - "kind": "Linked_Requirement", - "text": "this is important", - "status": null + "tracing_status": "MISSING" } ], "coverage": 50.0 }, { "name": "Code", - "kind": "implementation", "items": [ { "tag": "cpp foo.cpp:1:implication:3", @@ -226,7 +195,7 @@ "file": "tests_integration/projects/basic/foo.cpp", "line": 3 }, - "name": "implication", + "name": "foo.cpp:1:implication:3", "messages": [], "just_up": [], "just_down": [], @@ -235,9 +204,7 @@ "req example.req_implication" ], "ref_down": [], - "tracing_status": "OK", - "language": "C/C++", - "kind": "function" + "tracing_status": "OK" }, { "tag": "cpp foo.cpp:1:exclusive_or:9", @@ -248,16 +215,14 @@ "file": "tests_integration/projects/basic/foo.cpp", "line": 9 }, - "name": "exclusive_or", + "name": "foo.cpp:1:exclusive_or:9", "messages": [ "missing up reference" ], "just_up": [], "just_down": [], "just_global": [], - "tracing_status": "MISSING", - "language": "C/C++", - "kind": "function" + "tracing_status": "MISSING" }, { "tag": "cpp foo.cpp:1:potato:14", @@ -268,7 +233,7 @@ "file": "tests_integration/projects/basic/foo.cpp", "line": 14 }, - "name": "potato", + "name": "foo.cpp:1:potato:14", "messages": [ "unknown tracing target req example.doesnt_exist", "missing up reference" @@ -276,9 +241,7 @@ "just_up": [], "just_down": [], "just_global": [], - "tracing_status": "MISSING", - "language": "C/C++", - "kind": "function" + "tracing_status": "MISSING" }, { "tag": "matlab nand", @@ -298,9 +261,7 @@ "req example.req_nand" ], "ref_down": [], - "tracing_status": "OK", - "language": "MATLAB", - "kind": "Function" + "tracing_status": "OK" }, { "tag": "matlab exclusive_or/MATLAB Function", @@ -318,9 +279,7 @@ "just_up": [], "just_down": [], "just_global": [], - "tracing_status": "MISSING", - "language": "MATLAB", - "kind": "Function" + "tracing_status": "MISSING" }, { "tag": "simulink exclusive_or", @@ -338,9 +297,7 @@ "just_up": [], "just_down": [], "just_global": [], - "tracing_status": "MISSING", - "language": "Simulink", - "kind": "Block" + "tracing_status": "MISSING" }, { "tag": "simulink exclusive_or/My_Exclusive_Or", @@ -360,12 +317,10 @@ "req example.req_xor" ], "ref_down": [], - "tracing_status": "OK", - "language": "Simulink", - "kind": "Block" + "tracing_status": "OK" }, { - "tag": "python nor.trlc_reference", + "tag": "itm nor.trlc_reference", "location": { "kind": "github", "gh_root": "https://github.com/bmw-software-engineering/lobster", @@ -380,12 +335,10 @@ ], "just_down": [], "just_global": [], - "tracing_status": "JUSTIFIED", - "language": "Python", - "kind": "Function" + "tracing_status": "JUSTIFIED" }, { - "tag": "python nor.Example.helper_function", + "tag": "itm nor.Example.helper_function", "location": { "kind": "github", "gh_root": "https://github.com/bmw-software-engineering/lobster", @@ -402,12 +355,10 @@ "req example.req_nor" ], "ref_down": [], - "tracing_status": "OK", - "language": "Python", - "kind": "Method" + "tracing_status": "OK" }, { - "tag": "python nor.Example.nor", + "tag": "itm nor.Example.nor", "location": { "kind": "github", "gh_root": "https://github.com/bmw-software-engineering/lobster", @@ -424,16 +375,13 @@ "req example.req_nor" ], "ref_down": [], - "tracing_status": "OK", - "language": "Python", - "kind": "Method" + "tracing_status": "OK" } ], "coverage": 60.0 }, { "name": "Verification Test", - "kind": "activity", "items": [ { "tag": "gtest ImplicationTest:BasicTest", @@ -453,10 +401,7 @@ "req example.req_implication" ], "ref_down": [], - "tracing_status": "OK", - "framework": "GoogleTest", - "kind": "test", - "status": "ok" + "tracing_status": "OK" }, { "tag": "matlab nand_test::test_1", @@ -476,10 +421,7 @@ "req example.req_nand" ], "ref_down": [], - "tracing_status": "OK", - "framework": "MATLAB", - "kind": "Test", - "status": null + "tracing_status": "OK" }, { "tag": "json example.json:XOR Test 1", @@ -499,10 +441,7 @@ "req example.req_xor" ], "ref_down": [], - "tracing_status": "OK", - "framework": "JSON", - "kind": "Test Vector", - "status": null + "tracing_status": "OK" }, { "tag": "json example.json:XOR Test 2", @@ -522,10 +461,7 @@ "req example.req_xor" ], "ref_down": [], - "tracing_status": "OK", - "framework": "JSON", - "kind": "Test Vector", - "status": null + "tracing_status": "OK" }, { "tag": "json example.json:Potato Test 1", @@ -543,10 +479,7 @@ ], "just_down": [], "just_global": [], - "tracing_status": "JUSTIFIED", - "framework": "JSON", - "kind": "Test Vector", - "status": null + "tracing_status": "JUSTIFIED" } ], "coverage": 100.0 @@ -555,7 +488,6 @@ "policy": { "System Requirements": { "name": "System Requirements", - "kind": "requirements", "traces": [], "source": [ { @@ -572,7 +504,6 @@ }, "Software Requirements": { "name": "Software Requirements", - "kind": "requirements", "traces": [ "System Requirements" ], @@ -594,7 +525,6 @@ }, "Code": { "name": "Code", - "kind": "implementation", "traces": [ "Software Requirements" ], @@ -615,7 +545,6 @@ }, "Verification Test": { "name": "Verification Test", - "kind": "activity", "traces": [ "Software Requirements" ], diff --git a/tests_integration/projects/coverage/Makefile b/tests_integration/projects/coverage/Makefile index 82d8034db..483581499 100644 --- a/tests_integration/projects/coverage/Makefile +++ b/tests_integration/projects/coverage/Makefile @@ -7,7 +7,7 @@ THIS_TEST:=$(shell realpath --relative-to $(LOBSTER_ROOT) $(PWD)) THIS_TEST_ESCAPED:=$(subst /,\\/,$(THIS_TEST)) REFERENCE_OUTPUT:=report.reference_output -html_report.html: softreq.lobster sysreq.lobster lobster.conf +html_report.html: softreq.lobster sysreq.lobster lobster.yaml @lobster-report @if diff report.lobster $(REFERENCE_OUTPUT); then \ echo "Files are identical"; \ diff --git a/tests_integration/projects/coverage/lobster.yaml b/tests_integration/projects/coverage/lobster.yaml new file mode 100644 index 000000000..636af17be --- /dev/null +++ b/tests_integration/projects/coverage/lobster.yaml @@ -0,0 +1,15 @@ +System Requirements: !LevelDefinition + name: System Requirements + source: + - file: sysreq.lobster + needs_tracing_down: true + breakdown_requirements: + - - Software Requirements + +Software Requirements: !LevelDefinition + name: Software Requirements + source: + - file: softreq.lobster + needs_tracing_up: true + traces: + - System Requirements diff --git a/tests_integration/projects/coverage/report.reference_output b/tests_integration/projects/coverage/report.reference_output index da9ced126..229326053 100644 --- a/tests_integration/projects/coverage/report.reference_output +++ b/tests_integration/projects/coverage/report.reference_output @@ -5,7 +5,6 @@ "levels": [ { "name": "System Requirements", - "kind": "requirements", "items": [ { "tag": "req sysreq_coverage_example.requirement_1", @@ -35,7 +34,6 @@ }, { "name": "Software Requirements", - "kind": "requirements", "items": [ { "tag": "req softreq_coverage_example.requirement_2", @@ -67,7 +65,6 @@ "policy": { "System Requirements": { "name": "System Requirements", - "kind": "requirements", "traces": [], "source": [ { @@ -84,7 +81,6 @@ }, "Software Requirements": { "name": "Software Requirements", - "kind": "requirements", "traces": [ "System Requirements" ], diff --git a/tests_integration/projects/coverage_half/Makefile b/tests_integration/projects/coverage_half/Makefile index 82d8034db..483581499 100644 --- a/tests_integration/projects/coverage_half/Makefile +++ b/tests_integration/projects/coverage_half/Makefile @@ -7,7 +7,7 @@ THIS_TEST:=$(shell realpath --relative-to $(LOBSTER_ROOT) $(PWD)) THIS_TEST_ESCAPED:=$(subst /,\\/,$(THIS_TEST)) REFERENCE_OUTPUT:=report.reference_output -html_report.html: softreq.lobster sysreq.lobster lobster.conf +html_report.html: softreq.lobster sysreq.lobster lobster.yaml @lobster-report @if diff report.lobster $(REFERENCE_OUTPUT); then \ echo "Files are identical"; \ diff --git a/tests_integration/projects/coverage_half/lobster.yaml b/tests_integration/projects/coverage_half/lobster.yaml new file mode 100644 index 000000000..636af17be --- /dev/null +++ b/tests_integration/projects/coverage_half/lobster.yaml @@ -0,0 +1,15 @@ +System Requirements: !LevelDefinition + name: System Requirements + source: + - file: sysreq.lobster + needs_tracing_down: true + breakdown_requirements: + - - Software Requirements + +Software Requirements: !LevelDefinition + name: Software Requirements + source: + - file: softreq.lobster + needs_tracing_up: true + traces: + - System Requirements diff --git a/tests_integration/projects/coverage_half/report.reference_output b/tests_integration/projects/coverage_half/report.reference_output index 058f98310..c9108a312 100644 --- a/tests_integration/projects/coverage_half/report.reference_output +++ b/tests_integration/projects/coverage_half/report.reference_output @@ -5,7 +5,6 @@ "levels": [ { "name": "System Requirements", - "kind": "requirements", "items": [ { "tag": "req coverage_half.requirement_1a", @@ -35,7 +34,6 @@ }, { "name": "Software Requirements", - "kind": "requirements", "items": [ { "tag": "req coverage_half.requirement_2a", @@ -88,7 +86,6 @@ "policy": { "System Requirements": { "name": "System Requirements", - "kind": "requirements", "traces": [], "source": [ { @@ -105,7 +102,6 @@ }, "Software Requirements": { "name": "Software Requirements", - "kind": "requirements", "traces": [ "System Requirements" ], diff --git a/tests_integration/projects/coverage_mix/Makefile b/tests_integration/projects/coverage_mix/Makefile index e4f26887c..eea48d659 100644 --- a/tests_integration/projects/coverage_mix/Makefile +++ b/tests_integration/projects/coverage_mix/Makefile @@ -7,7 +7,7 @@ THIS_TEST:=$(shell realpath --relative-to $(LOBSTER_ROOT) $(PWD)) THIS_TEST_ESCAPED:=$(subst /,\\/,$(THIS_TEST)) REFERENCE_OUTPUT:=report.reference_output -html_report.html: req_a.lobster req_b.lobster test_a.lobster lobster.conf +html_report.html: req_a.lobster req_b.lobster test_a.lobster lobster.yaml @lobster-report @if diff report.lobster $(REFERENCE_OUTPUT); then \ echo "Files are identical"; \ diff --git a/tests_integration/projects/coverage_mix/lobster.yaml b/tests_integration/projects/coverage_mix/lobster.yaml new file mode 100644 index 000000000..87eb484ee --- /dev/null +++ b/tests_integration/projects/coverage_mix/lobster.yaml @@ -0,0 +1,23 @@ +Requirements A: !LevelDefinition + name: Requirements A + source: + - file: req_a.lobster + needs_tracing_down: true + breakdown_requirements: + - - Test A + +Requirements B: !LevelDefinition + name: Requirements B + source: + - file: req_b.lobster + needs_tracing_up: true + traces: + - Requirements A + +Test A: !LevelDefinition + name: Test A + source: + - file: test_a.lobster + needs_tracing_up: true + traces: + - Requirements A diff --git a/tests_integration/projects/coverage_mix/report.reference_output b/tests_integration/projects/coverage_mix/report.reference_output index a5d07e386..3295996f1 100644 --- a/tests_integration/projects/coverage_mix/report.reference_output +++ b/tests_integration/projects/coverage_mix/report.reference_output @@ -5,7 +5,6 @@ "levels": [ { "name": "Requirements A", - "kind": "requirements", "items": [ { "tag": "req coverage_mix.banana", @@ -35,7 +34,6 @@ }, { "name": "Requirements B", - "kind": "requirements", "items": [ { "tag": "req coverage_mix.banana_skin", @@ -63,7 +61,6 @@ }, { "name": "Test A", - "kind": "requirements", "items": [ { "tag": "req coverage_mix.banana_color_test", @@ -97,7 +94,6 @@ "policy": { "Requirements A": { "name": "Requirements A", - "kind": "requirements", "traces": [], "source": [ { @@ -114,7 +110,6 @@ }, "Requirements B": { "name": "Requirements B", - "kind": "requirements", "traces": [ "Requirements A" ], @@ -129,7 +124,6 @@ }, "Test A": { "name": "Test A", - "kind": "requirements", "traces": [ "Requirements A" ], diff --git a/tests_integration/projects/coverage_zero/Makefile b/tests_integration/projects/coverage_zero/Makefile index 82d8034db..483581499 100644 --- a/tests_integration/projects/coverage_zero/Makefile +++ b/tests_integration/projects/coverage_zero/Makefile @@ -7,7 +7,7 @@ THIS_TEST:=$(shell realpath --relative-to $(LOBSTER_ROOT) $(PWD)) THIS_TEST_ESCAPED:=$(subst /,\\/,$(THIS_TEST)) REFERENCE_OUTPUT:=report.reference_output -html_report.html: softreq.lobster sysreq.lobster lobster.conf +html_report.html: softreq.lobster sysreq.lobster lobster.yaml @lobster-report @if diff report.lobster $(REFERENCE_OUTPUT); then \ echo "Files are identical"; \ diff --git a/tests_integration/projects/coverage_zero/lobster.yaml b/tests_integration/projects/coverage_zero/lobster.yaml new file mode 100644 index 000000000..636af17be --- /dev/null +++ b/tests_integration/projects/coverage_zero/lobster.yaml @@ -0,0 +1,15 @@ +System Requirements: !LevelDefinition + name: System Requirements + source: + - file: sysreq.lobster + needs_tracing_down: true + breakdown_requirements: + - - Software Requirements + +Software Requirements: !LevelDefinition + name: Software Requirements + source: + - file: softreq.lobster + needs_tracing_up: true + traces: + - System Requirements diff --git a/tests_integration/projects/coverage_zero/report.reference_output b/tests_integration/projects/coverage_zero/report.reference_output index 31c80bf8a..c45102c91 100644 --- a/tests_integration/projects/coverage_zero/report.reference_output +++ b/tests_integration/projects/coverage_zero/report.reference_output @@ -5,7 +5,6 @@ "levels": [ { "name": "System Requirements", - "kind": "requirements", "items": [ { "tag": "req coverage_zero.requirement_4a", @@ -33,7 +32,6 @@ }, { "name": "Software Requirements", - "kind": "requirements", "items": [ { "tag": "req coverage_zero.requirement_3a", @@ -84,7 +82,6 @@ "policy": { "System Requirements": { "name": "System Requirements", - "kind": "requirements", "traces": [], "source": [ { @@ -101,7 +98,6 @@ }, "Software Requirements": { "name": "Software Requirements", - "kind": "requirements", "traces": [ "System Requirements" ], diff --git a/tests_integration/projects/cpp_focus/Makefile b/tests_integration/projects/cpp_focus/Makefile index 63eb85995..a1cbfd639 100644 --- a/tests_integration/projects/cpp_focus/Makefile +++ b/tests_integration/projects/cpp_focus/Makefile @@ -13,7 +13,7 @@ REFERENCE_OUTPUT_CI:='ci_report.reference_output.log' PYTHON = python3 UPDATE_GIT_HASHES_SCRIPT:='../../../tests_system/tests_utils/update_online_json_with_hashes.py' -html_report.html: cppcode.lobster gtests.lobster software-requirements.lobster lobster.conf +html_report.html: cppcode.lobster gtests.lobster software-requirements.lobster lobster.yaml @bash -c "lobster-report && echo '$(THIS_TEST) ✅ lobster-report succeeded!' || { echo '$(THIS_TEST) ❌ ERROR: lobster-report failed!'; exit 1; }" @bash -c "lobster-online-report && echo '$(THIS_TEST) ✅ lobster-online-report succeeded!' || { echo '$(THIS_TEST) ❌ ERROR: lobster-online-report failed!'; exit 1; }" @if diff online_report.lobster $(REFERENCE_OUTPUT); then echo '✅ Files are identical!'; else { echo '❌ ERROR: Files are different!'; exit 1; }; fi diff --git a/tests_integration/projects/cpp_focus/lobster.yaml b/tests_integration/projects/cpp_focus/lobster.yaml new file mode 100644 index 000000000..1a1da4181 --- /dev/null +++ b/tests_integration/projects/cpp_focus/lobster.yaml @@ -0,0 +1,24 @@ +Software Requirements: !LevelDefinition + name: Software Requirements + source: + - file: software-requirements.lobster + needs_tracing_down: true + breakdown_requirements: + - - Code + - - Verification Test + +Code: !LevelDefinition + name: Code + source: + - file: cppcode.lobster + needs_tracing_up: true + traces: + - Software Requirements + +Verification Test: !LevelDefinition + name: Verification Test + source: + - file: gtests.lobster + needs_tracing_up: true + traces: + - Software Requirements diff --git a/tests_integration/projects/cpp_focus/report.reference_output.lobster b/tests_integration/projects/cpp_focus/report.reference_output.lobster index b530347b3..343214281 100644 --- a/tests_integration/projects/cpp_focus/report.reference_output.lobster +++ b/tests_integration/projects/cpp_focus/report.reference_output.lobster @@ -5,7 +5,6 @@ "levels": [ { "name": "Software Requirements", - "kind": "requirements", "items": [ { "tag": "req fruits.Buy_Banana1", @@ -27,11 +26,7 @@ "ref_down": [ "cpp fruit.cpp:1:buyBanana:90" ], - "tracing_status": "MISSING", - "framework": "TRLC", - "kind": "FruityRequirement", - "text": "Add one banana to the basket!", - "status": null + "tracing_status": "MISSING" }, { "tag": "req fruits.Buy_Banana2", @@ -53,11 +48,7 @@ "ref_down": [ "cpp fruit.cpp:1:buyBanana:90" ], - "tracing_status": "MISSING", - "framework": "TRLC", - "kind": "FruityRequirement", - "text": "Add one banana to the basket quickly!", - "status": null + "tracing_status": "MISSING" }, { "tag": "req fruits.Sell_Banana1", @@ -79,11 +70,7 @@ "ref_down": [ "cpp fruit.cpp:1:sellBanana:96" ], - "tracing_status": "MISSING", - "framework": "TRLC", - "kind": "FruityRequirement", - "text": "Sell one banana from the basket!", - "status": null + "tracing_status": "MISSING" }, { "tag": "req fruits.Sell_Banana2", @@ -105,11 +92,7 @@ "ref_down": [ "cpp fruit.cpp:1:sellBanana:96" ], - "tracing_status": "MISSING", - "framework": "TRLC", - "kind": "FruityRequirement", - "text": "Sell one banana from the basket quickly!", - "status": null + "tracing_status": "MISSING" }, { "tag": "req fruits.Clear_Basket", @@ -131,11 +114,7 @@ "gtest FruitTest:BasicProperties", "gtest CitrusTest:Sweetness" ], - "tracing_status": "OK", - "framework": "TRLC", - "kind": "FruityRequirement", - "text": "Clear the basket upon request.", - "status": null + "tracing_status": "OK" }, { "tag": "req fruits.Check_Basket", @@ -157,11 +136,7 @@ "ref_down": [ "cpp fruit.cpp:1:checkBasket:121" ], - "tracing_status": "MISSING", - "framework": "TRLC", - "kind": "FruityRequirement", - "text": "Only go shopping if the basket is empty.", - "status": null + "tracing_status": "MISSING" }, { "tag": "req fruits.Throw_Banana", @@ -183,11 +158,7 @@ "ref_down": [ "cpp fruit.cpp:1:throwBanana:132" ], - "tracing_status": "MISSING", - "framework": "TRLC", - "kind": "FruityRequirement", - "text": "Throw the banana away!", - "status": null + "tracing_status": "MISSING" }, { "tag": "req fruits.Sweet_Banana", @@ -209,11 +180,7 @@ "ref_down": [ "gtest BasketTest:ClearBasket" ], - "tracing_status": "MISSING", - "framework": "TRLC", - "kind": "FruityRequirement", - "text": "The banana shall contain at least 12 grams of natural sugar\nper 100 grams of fruit.", - "status": null + "tracing_status": "MISSING" }, { "tag": "req fruits.Fruit_Less_Than_Operator", @@ -234,11 +201,7 @@ "cpp fruit.cpp:1:orchard::Fruit::operator<:33", "gtest BasketTest:FindInBasketTemplate" ], - "tracing_status": "OK", - "framework": "TRLC", - "kind": "FruityRequirement", - "text": "The operator < shall compare the weight of two fruits.", - "status": null + "tracing_status": "OK" }, { "tag": "req fruits.Fruit_Copy_Constructor", @@ -260,11 +223,7 @@ "ref_down": [ "cpp fruit.cpp:1:orchard::Fruit::operator=:14" ], - "tracing_status": "MISSING", - "framework": "TRLC", - "kind": "FruityRequirement", - "text": "The operator = shall copy the name and weight of the fruit.", - "status": null + "tracing_status": "MISSING" }, { "tag": "req fruits.Magic", @@ -285,11 +244,7 @@ "cpp fruit.cpp:1:orchard::Fruit::operator<:33", "gtest BasketTest:AddAndShowContents" ], - "tracing_status": "OK", - "framework": "TRLC", - "kind": "FruityRequirement", - "text": "The one who eats the fruit shall be happy!", - "status": null + "tracing_status": "OK" }, { "tag": "req fruits.SameLine1", @@ -310,11 +265,7 @@ "cpp fruit.cpp:1:orchard::Fruit::operator=:14", "gtest CitrusTest:Sweetness" ], - "tracing_status": "OK", - "framework": "TRLC", - "kind": "FruityRequirement", - "text": "lobster-cpp shall support comma-separated lists of tags in one line.", - "status": null + "tracing_status": "OK" }, { "tag": "req fruits.SameLine2", @@ -336,11 +287,7 @@ "ref_down": [ "cpp fruit.cpp:1:orchard::Fruit::operator=:14" ], - "tracing_status": "MISSING", - "framework": "TRLC", - "kind": "FruityRequirement", - "text": "see SameLine1", - "status": null + "tracing_status": "MISSING" }, { "tag": "req fruits.SameLine3", @@ -362,11 +309,7 @@ "ref_down": [ "cpp fruit.cpp:1:orchard::Fruit::operator=:14" ], - "tracing_status": "MISSING", - "framework": "TRLC", - "kind": "FruityRequirement", - "text": "see SameLine1", - "status": null + "tracing_status": "MISSING" }, { "tag": "req fruits.SameLine4", @@ -388,18 +331,13 @@ "ref_down": [ "cpp fruit.cpp:1:orchard::Fruit::operator=:14" ], - "tracing_status": "MISSING", - "framework": "TRLC", - "kind": "FruityRequirement", - "text": "see SameLine1", - "status": null + "tracing_status": "MISSING" } ], "coverage": 26.666666666666668 }, { "name": "Code", - "kind": "implementation", "items": [ { "tag": "cpp fruit.cpp:1:orchard::Fruit::operator=:14", @@ -410,7 +348,7 @@ "file": "tests_integration/projects/cpp_focus/fruit.cpp", "line": 14 }, - "name": "orchard::Fruit::operator=", + "name": "fruit.cpp:1:orchard::Fruit::operator=:14", "messages": [], "just_up": [], "just_down": [], @@ -423,9 +361,7 @@ "req fruits.Fruit_Copy_Constructor" ], "ref_down": [], - "tracing_status": "OK", - "language": "C/C++", - "kind": "method" + "tracing_status": "OK" }, { "tag": "cpp fruit.cpp:1:orchard::Fruit::operator*:26", @@ -436,7 +372,7 @@ "file": "tests_integration/projects/cpp_focus/fruit.cpp", "line": 26 }, - "name": "orchard::Fruit::operator*", + "name": "fruit.cpp:1:orchard::Fruit::operator*:26", "messages": [ "unknown tracing target req cd-456", "unknown tracing target req ab-123", @@ -448,9 +384,7 @@ "just_up": [], "just_down": [], "just_global": [], - "tracing_status": "MISSING", - "language": "C/C++", - "kind": "method" + "tracing_status": "MISSING" }, { "tag": "cpp fruit.cpp:1:orchard::Fruit::operator<:33", @@ -461,7 +395,7 @@ "file": "tests_integration/projects/cpp_focus/fruit.cpp", "line": 33 }, - "name": "orchard::Fruit::operator<", + "name": "fruit.cpp:1:orchard::Fruit::operator<:33", "messages": [], "just_up": [], "just_down": [], @@ -471,9 +405,7 @@ "req fruits.Fruit_Less_Than_Operator" ], "ref_down": [], - "tracing_status": "OK", - "language": "C/C++", - "kind": "method" + "tracing_status": "OK" }, { "tag": "cpp fruit.cpp:1:orchard::Fruit::operator>:39", @@ -484,16 +416,14 @@ "file": "tests_integration/projects/cpp_focus/fruit.cpp", "line": 39 }, - "name": "orchard::Fruit::operator>", + "name": "fruit.cpp:1:orchard::Fruit::operator>:39", "messages": [ "missing up reference" ], "just_up": [], "just_down": [], "just_global": [], - "tracing_status": "MISSING", - "language": "C/C++", - "kind": "method" + "tracing_status": "MISSING" }, { "tag": "cpp fruit.cpp:1:orchard::Fruit::operator&:44", @@ -504,16 +434,14 @@ "file": "tests_integration/projects/cpp_focus/fruit.cpp", "line": 44 }, - "name": "orchard::Fruit::operator&", + "name": "fruit.cpp:1:orchard::Fruit::operator&:44", "messages": [ "missing up reference" ], "just_up": [], "just_down": [], "just_global": [], - "tracing_status": "MISSING", - "language": "C/C++", - "kind": "method" + "tracing_status": "MISSING" }, { "tag": "cpp fruit.cpp:1:orchard::Fruit::operator|:49", @@ -524,16 +452,14 @@ "file": "tests_integration/projects/cpp_focus/fruit.cpp", "line": 49 }, - "name": "orchard::Fruit::operator|", + "name": "fruit.cpp:1:orchard::Fruit::operator|:49", "messages": [ "missing up reference" ], "just_up": [], "just_down": [], "just_global": [], - "tracing_status": "MISSING", - "language": "C/C++", - "kind": "method" + "tracing_status": "MISSING" }, { "tag": "cpp fruit.cpp:1:orchard::Fruit::operator/:54", @@ -544,16 +470,14 @@ "file": "tests_integration/projects/cpp_focus/fruit.cpp", "line": 54 }, - "name": "orchard::Fruit::operator/", + "name": "fruit.cpp:1:orchard::Fruit::operator/:54", "messages": [ "missing up reference" ], "just_up": [], "just_down": [], "just_global": [], - "tracing_status": "MISSING", - "language": "C/C++", - "kind": "method" + "tracing_status": "MISSING" }, { "tag": "cpp fruit.cpp:1:orchard::Fruit::operator[]:59", @@ -564,16 +488,14 @@ "file": "tests_integration/projects/cpp_focus/fruit.cpp", "line": 59 }, - "name": "orchard::Fruit::operator[]", + "name": "fruit.cpp:1:orchard::Fruit::operator[]:59", "messages": [ "missing up reference" ], "just_up": [], "just_down": [], "just_global": [], - "tracing_status": "MISSING", - "language": "C/C++", - "kind": "method" + "tracing_status": "MISSING" }, { "tag": "cpp fruit.cpp:1:orchard::Fruit::operator~:64", @@ -584,16 +506,14 @@ "file": "tests_integration/projects/cpp_focus/fruit.cpp", "line": 64 }, - "name": "orchard::Fruit::operator~", + "name": "fruit.cpp:1:orchard::Fruit::operator~:64", "messages": [ "missing up reference" ], "just_up": [], "just_down": [], "just_global": [], - "tracing_status": "MISSING", - "language": "C/C++", - "kind": "method" + "tracing_status": "MISSING" }, { "tag": "cpp fruit.cpp:1:orchard::Fruit::complicatedFunc:79", @@ -604,16 +524,14 @@ "file": "tests_integration/projects/cpp_focus/fruit.cpp", "line": 79 }, - "name": "orchard::Fruit::complicatedFunc", + "name": "fruit.cpp:1:orchard::Fruit::complicatedFunc:79", "messages": [ "missing up reference" ], "just_up": [], "just_down": [], "just_global": [], - "tracing_status": "MISSING", - "language": "C/C++", - "kind": "method" + "tracing_status": "MISSING" }, { "tag": "cpp fruit.cpp:1:orchard::Fruit::refAndPtrFunc:83", @@ -624,16 +542,14 @@ "file": "tests_integration/projects/cpp_focus/fruit.cpp", "line": 83 }, - "name": "orchard::Fruit::refAndPtrFunc", + "name": "fruit.cpp:1:orchard::Fruit::refAndPtrFunc:83", "messages": [ "missing up reference" ], "just_up": [], "just_down": [], "just_global": [], - "tracing_status": "MISSING", - "language": "C/C++", - "kind": "method" + "tracing_status": "MISSING" }, { "tag": "cpp fruit.cpp:1:orchard::Fruit::crazySignature:87", @@ -644,16 +560,14 @@ "file": "tests_integration/projects/cpp_focus/fruit.cpp", "line": 87 }, - "name": "orchard::Fruit::crazySignature", + "name": "fruit.cpp:1:orchard::Fruit::crazySignature:87", "messages": [ "missing up reference" ], "just_up": [], "just_down": [], "just_global": [], - "tracing_status": "MISSING", - "language": "C/C++", - "kind": "method" + "tracing_status": "MISSING" }, { "tag": "cpp fruit.cpp:1:buyBanana:90", @@ -664,7 +578,7 @@ "file": "tests_integration/projects/cpp_focus/fruit.cpp", "line": 90 }, - "name": "buyBanana", + "name": "fruit.cpp:1:buyBanana:90", "messages": [], "just_up": [], "just_down": [], @@ -674,9 +588,7 @@ "req fruits.Buy_Banana1" ], "ref_down": [], - "tracing_status": "OK", - "language": "C/C++", - "kind": "function" + "tracing_status": "OK" }, { "tag": "cpp fruit.cpp:1:sellBanana:96", @@ -687,7 +599,7 @@ "file": "tests_integration/projects/cpp_focus/fruit.cpp", "line": 96 }, - "name": "sellBanana", + "name": "fruit.cpp:1:sellBanana:96", "messages": [], "just_up": [], "just_down": [], @@ -697,9 +609,7 @@ "req fruits.Sell_Banana1" ], "ref_down": [], - "tracing_status": "OK", - "language": "C/C++", - "kind": "function" + "tracing_status": "OK" }, { "tag": "cpp fruit.cpp:1:clearBasket:113", @@ -710,7 +620,7 @@ "file": "tests_integration/projects/cpp_focus/fruit.cpp", "line": 113 }, - "name": "clearBasket", + "name": "fruit.cpp:1:clearBasket:113", "messages": [], "just_up": [], "just_down": [], @@ -719,9 +629,7 @@ "req fruits.Clear_Basket" ], "ref_down": [], - "tracing_status": "OK", - "language": "C/C++", - "kind": "function" + "tracing_status": "OK" }, { "tag": "cpp fruit.cpp:1:checkBasket:121", @@ -732,7 +640,7 @@ "file": "tests_integration/projects/cpp_focus/fruit.cpp", "line": 121 }, - "name": "checkBasket", + "name": "fruit.cpp:1:checkBasket:121", "messages": [], "just_up": [], "just_down": [], @@ -741,9 +649,7 @@ "req fruits.Check_Basket" ], "ref_down": [], - "tracing_status": "OK", - "language": "C/C++", - "kind": "function" + "tracing_status": "OK" }, { "tag": "cpp fruit.cpp:1:throwBanana:132", @@ -754,7 +660,7 @@ "file": "tests_integration/projects/cpp_focus/fruit.cpp", "line": 132 }, - "name": "throwBanana", + "name": "fruit.cpp:1:throwBanana:132", "messages": [], "just_up": [], "just_down": [], @@ -763,9 +669,7 @@ "req fruits.Throw_Banana" ], "ref_down": [], - "tracing_status": "OK", - "language": "C/C++", - "kind": "function" + "tracing_status": "OK" }, { "tag": "cpp fruit.cpp:1:main:148", @@ -776,23 +680,20 @@ "file": "tests_integration/projects/cpp_focus/fruit.cpp", "line": 148 }, - "name": "main", + "name": "fruit.cpp:1:main:148", "messages": [ "missing up reference" ], "just_up": [], "just_down": [], "just_global": [], - "tracing_status": "MISSING", - "language": "C/C++", - "kind": "main function" + "tracing_status": "MISSING" } ], "coverage": 38.888888888888886 }, { "name": "Verification Test", - "kind": "activity", "items": [ { "tag": "gtest FruitTest:BasicProperties", @@ -812,10 +713,7 @@ "req fruits.Clear_Basket" ], "ref_down": [], - "tracing_status": "OK", - "framework": "GoogleTest", - "kind": "test", - "status": "ok" + "tracing_status": "OK" }, { "tag": "gtest CitrusTest:Sweetness", @@ -836,10 +734,7 @@ "req fruits.Clear_Basket" ], "ref_down": [], - "tracing_status": "OK", - "framework": "GoogleTest", - "kind": "test", - "status": "ok" + "tracing_status": "OK" }, { "tag": "gtest BasketTest:AddAndShowContents", @@ -859,10 +754,7 @@ "req fruits.Magic" ], "ref_down": [], - "tracing_status": "OK", - "framework": "GoogleTest", - "kind": "test", - "status": "ok" + "tracing_status": "OK" }, { "tag": "gtest BasketTest:ClearBasket", @@ -882,10 +774,7 @@ "req fruits.Sweet_Banana" ], "ref_down": [], - "tracing_status": "OK", - "framework": "GoogleTest", - "kind": "test", - "status": "fail" + "tracing_status": "OK" }, { "tag": "gtest BasketTest:FindInBasketTemplate", @@ -905,10 +794,7 @@ "req fruits.Fruit_Less_Than_Operator" ], "ref_down": [], - "tracing_status": "OK", - "framework": "GoogleTest", - "kind": "test", - "status": "ok" + "tracing_status": "OK" } ], "coverage": 100.0 @@ -917,7 +803,6 @@ "policy": { "Software Requirements": { "name": "Software Requirements", - "kind": "requirements", "traces": [], "source": [ { @@ -937,7 +822,6 @@ }, "Code": { "name": "Code", - "kind": "implementation", "traces": [ "Software Requirements" ], @@ -952,7 +836,6 @@ }, "Verification Test": { "name": "Verification Test", - "kind": "activity", "traces": [ "Software Requirements" ], diff --git a/tests_system/asserter.py b/tests_system/asserter.py index 18afc1abd..f006b4fa2 100644 --- a/tests_system/asserter.py +++ b/tests_system/asserter.py @@ -137,7 +137,7 @@ def is_valid_json(json_string): def sort_json(json_data): if isinstance(json_data, dict): - return sorted((keys, sort_json(values)) for keys, values in json_data.items()) + return {k: sort_json(json_data[k]) for k in sorted(json_data)} if isinstance(json_data, list): - return sorted(sort_json(items) for items in json_data) + return [sort_json(item) for item in json_data] return json_data diff --git a/tests_system/lobster_codebeamer/data/0_items_no_schema.lobster b/tests_system/lobster_codebeamer/data/0_items_no_schema.lobster new file mode 100644 index 000000000..dbb4da3d7 --- /dev/null +++ b/tests_system/lobster_codebeamer/data/0_items_no_schema.lobster @@ -0,0 +1,5 @@ +{ + "data": [], + "generator": "lobster_codebeamer", + "version": 5 +} diff --git a/tests_system/lobster_codebeamer/data/10_items_no_schema.lobster b/tests_system/lobster_codebeamer/data/10_items_no_schema.lobster new file mode 100644 index 000000000..51a4243a1 --- /dev/null +++ b/tests_system/lobster_codebeamer/data/10_items_no_schema.lobster @@ -0,0 +1,166 @@ +{ + "data": [ + { + "tag": "itm 1@100", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 10000, + "item": 1, + "version": 100, + "name": "Requirement 1: Dynamic name" + }, + "name": "Requirement 1: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 2@200", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 20000, + "item": 2, + "version": 200, + "name": "Requirement 2: Dynamic name" + }, + "name": "Requirement 2: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 3@300", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 30000, + "item": 3, + "version": 300, + "name": "Requirement 3: Dynamic name" + }, + "name": "Requirement 3: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 4@400", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 40000, + "item": 4, + "version": 400, + "name": "Requirement 4: Dynamic name" + }, + "name": "Requirement 4: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 5@500", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 50000, + "item": 5, + "version": 500, + "name": "Requirement 5: Dynamic name" + }, + "name": "Requirement 5: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 6@600", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 60000, + "item": 6, + "version": 600, + "name": "Requirement 6: Dynamic name" + }, + "name": "Requirement 6: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 7@700", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 70000, + "item": 7, + "version": 700, + "name": "Requirement 7: Dynamic name" + }, + "name": "Requirement 7: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 8@800", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 80000, + "item": 8, + "version": 800, + "name": "Requirement 8: Dynamic name" + }, + "name": "Requirement 8: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 9@900", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 90000, + "item": 9, + "version": 900, + "name": "Requirement 9: Dynamic name" + }, + "name": "Requirement 9: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 10@1000", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 100000, + "item": 10, + "version": 1000, + "name": "Requirement 10: Dynamic name" + }, + "name": "Requirement 10: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster_codebeamer", + "version": 5 +} diff --git a/tests_system/lobster_codebeamer/data/11_items_no_schema.lobster b/tests_system/lobster_codebeamer/data/11_items_no_schema.lobster new file mode 100644 index 000000000..c45d4114d --- /dev/null +++ b/tests_system/lobster_codebeamer/data/11_items_no_schema.lobster @@ -0,0 +1,182 @@ +{ + "data": [ + { + "tag": "itm 1@100", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 10000, + "item": 1, + "version": 100, + "name": "Requirement 1: Dynamic name" + }, + "name": "Requirement 1: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 2@200", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 20000, + "item": 2, + "version": 200, + "name": "Requirement 2: Dynamic name" + }, + "name": "Requirement 2: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 3@300", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 30000, + "item": 3, + "version": 300, + "name": "Requirement 3: Dynamic name" + }, + "name": "Requirement 3: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 4@400", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 40000, + "item": 4, + "version": 400, + "name": "Requirement 4: Dynamic name" + }, + "name": "Requirement 4: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 5@500", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 50000, + "item": 5, + "version": 500, + "name": "Requirement 5: Dynamic name" + }, + "name": "Requirement 5: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 6@600", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 60000, + "item": 6, + "version": 600, + "name": "Requirement 6: Dynamic name" + }, + "name": "Requirement 6: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 7@700", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 70000, + "item": 7, + "version": 700, + "name": "Requirement 7: Dynamic name" + }, + "name": "Requirement 7: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 8@800", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 80000, + "item": 8, + "version": 800, + "name": "Requirement 8: Dynamic name" + }, + "name": "Requirement 8: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 9@900", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 90000, + "item": 9, + "version": 900, + "name": "Requirement 9: Dynamic name" + }, + "name": "Requirement 9: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 10@1000", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 100000, + "item": 10, + "version": 1000, + "name": "Requirement 10: Dynamic name" + }, + "name": "Requirement 10: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 11@1100", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 110000, + "item": 11, + "version": 1100, + "name": "Requirement 11: Dynamic name" + }, + "name": "Requirement 11: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster_codebeamer", + "version": 5 +} diff --git a/tests_system/lobster_codebeamer/data/1_items_no_schema.lobster b/tests_system/lobster_codebeamer/data/1_items_no_schema.lobster new file mode 100644 index 000000000..b6ae45ba7 --- /dev/null +++ b/tests_system/lobster_codebeamer/data/1_items_no_schema.lobster @@ -0,0 +1,22 @@ +{ + "data": [ + { + "tag": "itm 1@100", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 10000, + "item": 1, + "version": 100, + "name": "Requirement 1: Dynamic name" + }, + "name": "Requirement 1: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster_codebeamer", + "version": 5 +} diff --git a/tests_system/lobster_codebeamer/data/4_items_no_schema.lobster b/tests_system/lobster_codebeamer/data/4_items_no_schema.lobster new file mode 100644 index 000000000..a127fbd38 --- /dev/null +++ b/tests_system/lobster_codebeamer/data/4_items_no_schema.lobster @@ -0,0 +1,70 @@ +{ + "data": [ + { + "tag": "itm 1@100", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 10000, + "item": 1, + "version": 100, + "name": "Requirement 1: Dynamic name" + }, + "name": "Requirement 1: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 2@200", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 20000, + "item": 2, + "version": 200, + "name": "Requirement 2: Dynamic name" + }, + "name": "Requirement 2: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 3@300", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 30000, + "item": 3, + "version": 300, + "name": "Requirement 3: Dynamic name" + }, + "name": "Requirement 3: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 4@400", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 40000, + "item": 4, + "version": 400, + "name": "Requirement 4: Dynamic name" + }, + "name": "Requirement 4: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster_codebeamer", + "version": 5 +} diff --git a/tests_system/lobster_codebeamer/data/5_items_no_schema.lobster b/tests_system/lobster_codebeamer/data/5_items_no_schema.lobster new file mode 100644 index 000000000..98eaec0cf --- /dev/null +++ b/tests_system/lobster_codebeamer/data/5_items_no_schema.lobster @@ -0,0 +1,86 @@ +{ + "data": [ + { + "tag": "itm 1@100", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 10000, + "item": 1, + "version": 100, + "name": "Requirement 1: Dynamic name" + }, + "name": "Requirement 1: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 2@200", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 20000, + "item": 2, + "version": 200, + "name": "Requirement 2: Dynamic name" + }, + "name": "Requirement 2: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 3@300", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 30000, + "item": 3, + "version": 300, + "name": "Requirement 3: Dynamic name" + }, + "name": "Requirement 3: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 4@400", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 40000, + "item": 4, + "version": 400, + "name": "Requirement 4: Dynamic name" + }, + "name": "Requirement 4: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 5@500", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 50000, + "item": 5, + "version": 500, + "name": "Requirement 5: Dynamic name" + }, + "name": "Requirement 5: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster_codebeamer", + "version": 5 +} diff --git a/tests_system/lobster_codebeamer/data/6_items_no_schema.lobster b/tests_system/lobster_codebeamer/data/6_items_no_schema.lobster new file mode 100644 index 000000000..fb29fc3ce --- /dev/null +++ b/tests_system/lobster_codebeamer/data/6_items_no_schema.lobster @@ -0,0 +1,102 @@ +{ + "data": [ + { + "tag": "itm 1@100", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 10000, + "item": 1, + "version": 100, + "name": "Requirement 1: Dynamic name" + }, + "name": "Requirement 1: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 2@200", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 20000, + "item": 2, + "version": 200, + "name": "Requirement 2: Dynamic name" + }, + "name": "Requirement 2: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 3@300", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 30000, + "item": 3, + "version": 300, + "name": "Requirement 3: Dynamic name" + }, + "name": "Requirement 3: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 4@400", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 40000, + "item": 4, + "version": 400, + "name": "Requirement 4: Dynamic name" + }, + "name": "Requirement 4: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 5@500", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 50000, + "item": 5, + "version": 500, + "name": "Requirement 5: Dynamic name" + }, + "name": "Requirement 5: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 6@600", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 60000, + "item": 6, + "version": 600, + "name": "Requirement 6: Dynamic name" + }, + "name": "Requirement 6: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster_codebeamer", + "version": 5 +} diff --git a/tests_system/lobster_codebeamer/data/74_items_no_schema.lobster b/tests_system/lobster_codebeamer/data/74_items_no_schema.lobster new file mode 100644 index 000000000..0bde1e22d --- /dev/null +++ b/tests_system/lobster_codebeamer/data/74_items_no_schema.lobster @@ -0,0 +1,1190 @@ +{ + "data": [ + { + "tag": "itm 1@100", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 10000, + "item": 1, + "version": 100, + "name": "Requirement 1: Dynamic name" + }, + "name": "Requirement 1: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 2@200", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 20000, + "item": 2, + "version": 200, + "name": "Requirement 2: Dynamic name" + }, + "name": "Requirement 2: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 3@300", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 30000, + "item": 3, + "version": 300, + "name": "Requirement 3: Dynamic name" + }, + "name": "Requirement 3: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 4@400", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 40000, + "item": 4, + "version": 400, + "name": "Requirement 4: Dynamic name" + }, + "name": "Requirement 4: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 5@500", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 50000, + "item": 5, + "version": 500, + "name": "Requirement 5: Dynamic name" + }, + "name": "Requirement 5: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 6@600", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 60000, + "item": 6, + "version": 600, + "name": "Requirement 6: Dynamic name" + }, + "name": "Requirement 6: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 7@700", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 70000, + "item": 7, + "version": 700, + "name": "Requirement 7: Dynamic name" + }, + "name": "Requirement 7: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 8@800", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 80000, + "item": 8, + "version": 800, + "name": "Requirement 8: Dynamic name" + }, + "name": "Requirement 8: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 9@900", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 90000, + "item": 9, + "version": 900, + "name": "Requirement 9: Dynamic name" + }, + "name": "Requirement 9: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 10@1000", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 100000, + "item": 10, + "version": 1000, + "name": "Requirement 10: Dynamic name" + }, + "name": "Requirement 10: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 11@1100", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 110000, + "item": 11, + "version": 1100, + "name": "Requirement 11: Dynamic name" + }, + "name": "Requirement 11: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 12@1200", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 120000, + "item": 12, + "version": 1200, + "name": "Requirement 12: Dynamic name" + }, + "name": "Requirement 12: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 13@1300", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 130000, + "item": 13, + "version": 1300, + "name": "Requirement 13: Dynamic name" + }, + "name": "Requirement 13: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 14@1400", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 140000, + "item": 14, + "version": 1400, + "name": "Requirement 14: Dynamic name" + }, + "name": "Requirement 14: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 15@1500", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 150000, + "item": 15, + "version": 1500, + "name": "Requirement 15: Dynamic name" + }, + "name": "Requirement 15: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 16@1600", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 160000, + "item": 16, + "version": 1600, + "name": "Requirement 16: Dynamic name" + }, + "name": "Requirement 16: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 17@1700", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 170000, + "item": 17, + "version": 1700, + "name": "Requirement 17: Dynamic name" + }, + "name": "Requirement 17: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 18@1800", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 180000, + "item": 18, + "version": 1800, + "name": "Requirement 18: Dynamic name" + }, + "name": "Requirement 18: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 19@1900", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 190000, + "item": 19, + "version": 1900, + "name": "Requirement 19: Dynamic name" + }, + "name": "Requirement 19: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 20@2000", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 200000, + "item": 20, + "version": 2000, + "name": "Requirement 20: Dynamic name" + }, + "name": "Requirement 20: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 21@2100", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 210000, + "item": 21, + "version": 2100, + "name": "Requirement 21: Dynamic name" + }, + "name": "Requirement 21: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 22@2200", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 220000, + "item": 22, + "version": 2200, + "name": "Requirement 22: Dynamic name" + }, + "name": "Requirement 22: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 23@2300", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 230000, + "item": 23, + "version": 2300, + "name": "Requirement 23: Dynamic name" + }, + "name": "Requirement 23: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 24@2400", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 240000, + "item": 24, + "version": 2400, + "name": "Requirement 24: Dynamic name" + }, + "name": "Requirement 24: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 25@2500", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 250000, + "item": 25, + "version": 2500, + "name": "Requirement 25: Dynamic name" + }, + "name": "Requirement 25: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 26@2600", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 260000, + "item": 26, + "version": 2600, + "name": "Requirement 26: Dynamic name" + }, + "name": "Requirement 26: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 27@2700", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 270000, + "item": 27, + "version": 2700, + "name": "Requirement 27: Dynamic name" + }, + "name": "Requirement 27: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 28@2800", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 280000, + "item": 28, + "version": 2800, + "name": "Requirement 28: Dynamic name" + }, + "name": "Requirement 28: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 29@2900", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 290000, + "item": 29, + "version": 2900, + "name": "Requirement 29: Dynamic name" + }, + "name": "Requirement 29: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 30@3000", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 300000, + "item": 30, + "version": 3000, + "name": "Requirement 30: Dynamic name" + }, + "name": "Requirement 30: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 31@3100", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 310000, + "item": 31, + "version": 3100, + "name": "Requirement 31: Dynamic name" + }, + "name": "Requirement 31: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 32@3200", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 320000, + "item": 32, + "version": 3200, + "name": "Requirement 32: Dynamic name" + }, + "name": "Requirement 32: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 33@3300", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 330000, + "item": 33, + "version": 3300, + "name": "Requirement 33: Dynamic name" + }, + "name": "Requirement 33: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 34@3400", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 340000, + "item": 34, + "version": 3400, + "name": "Requirement 34: Dynamic name" + }, + "name": "Requirement 34: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 35@3500", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 350000, + "item": 35, + "version": 3500, + "name": "Requirement 35: Dynamic name" + }, + "name": "Requirement 35: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 36@3600", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 360000, + "item": 36, + "version": 3600, + "name": "Requirement 36: Dynamic name" + }, + "name": "Requirement 36: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 37@3700", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 370000, + "item": 37, + "version": 3700, + "name": "Requirement 37: Dynamic name" + }, + "name": "Requirement 37: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 38@3800", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 380000, + "item": 38, + "version": 3800, + "name": "Requirement 38: Dynamic name" + }, + "name": "Requirement 38: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 39@3900", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 390000, + "item": 39, + "version": 3900, + "name": "Requirement 39: Dynamic name" + }, + "name": "Requirement 39: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 40@4000", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 400000, + "item": 40, + "version": 4000, + "name": "Requirement 40: Dynamic name" + }, + "name": "Requirement 40: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 41@4100", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 410000, + "item": 41, + "version": 4100, + "name": "Requirement 41: Dynamic name" + }, + "name": "Requirement 41: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 42@4200", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 420000, + "item": 42, + "version": 4200, + "name": "Requirement 42: Dynamic name" + }, + "name": "Requirement 42: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 43@4300", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 430000, + "item": 43, + "version": 4300, + "name": "Requirement 43: Dynamic name" + }, + "name": "Requirement 43: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 44@4400", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 440000, + "item": 44, + "version": 4400, + "name": "Requirement 44: Dynamic name" + }, + "name": "Requirement 44: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 45@4500", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 450000, + "item": 45, + "version": 4500, + "name": "Requirement 45: Dynamic name" + }, + "name": "Requirement 45: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 46@4600", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 460000, + "item": 46, + "version": 4600, + "name": "Requirement 46: Dynamic name" + }, + "name": "Requirement 46: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 47@4700", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 470000, + "item": 47, + "version": 4700, + "name": "Requirement 47: Dynamic name" + }, + "name": "Requirement 47: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 48@4800", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 480000, + "item": 48, + "version": 4800, + "name": "Requirement 48: Dynamic name" + }, + "name": "Requirement 48: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 49@4900", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 490000, + "item": 49, + "version": 4900, + "name": "Requirement 49: Dynamic name" + }, + "name": "Requirement 49: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 50@5000", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 500000, + "item": 50, + "version": 5000, + "name": "Requirement 50: Dynamic name" + }, + "name": "Requirement 50: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 51@5100", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 510000, + "item": 51, + "version": 5100, + "name": "Requirement 51: Dynamic name" + }, + "name": "Requirement 51: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 52@5200", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 520000, + "item": 52, + "version": 5200, + "name": "Requirement 52: Dynamic name" + }, + "name": "Requirement 52: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 53@5300", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 530000, + "item": 53, + "version": 5300, + "name": "Requirement 53: Dynamic name" + }, + "name": "Requirement 53: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 54@5400", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 540000, + "item": 54, + "version": 5400, + "name": "Requirement 54: Dynamic name" + }, + "name": "Requirement 54: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 55@5500", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 550000, + "item": 55, + "version": 5500, + "name": "Requirement 55: Dynamic name" + }, + "name": "Requirement 55: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 56@5600", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 560000, + "item": 56, + "version": 5600, + "name": "Requirement 56: Dynamic name" + }, + "name": "Requirement 56: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 57@5700", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 570000, + "item": 57, + "version": 5700, + "name": "Requirement 57: Dynamic name" + }, + "name": "Requirement 57: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 58@5800", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 580000, + "item": 58, + "version": 5800, + "name": "Requirement 58: Dynamic name" + }, + "name": "Requirement 58: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 59@5900", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 590000, + "item": 59, + "version": 5900, + "name": "Requirement 59: Dynamic name" + }, + "name": "Requirement 59: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 60@6000", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 600000, + "item": 60, + "version": 6000, + "name": "Requirement 60: Dynamic name" + }, + "name": "Requirement 60: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 61@6100", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 610000, + "item": 61, + "version": 6100, + "name": "Requirement 61: Dynamic name" + }, + "name": "Requirement 61: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 62@6200", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 620000, + "item": 62, + "version": 6200, + "name": "Requirement 62: Dynamic name" + }, + "name": "Requirement 62: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 63@6300", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 630000, + "item": 63, + "version": 6300, + "name": "Requirement 63: Dynamic name" + }, + "name": "Requirement 63: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 64@6400", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 640000, + "item": 64, + "version": 6400, + "name": "Requirement 64: Dynamic name" + }, + "name": "Requirement 64: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 65@6500", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 650000, + "item": 65, + "version": 6500, + "name": "Requirement 65: Dynamic name" + }, + "name": "Requirement 65: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 66@6600", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 660000, + "item": 66, + "version": 6600, + "name": "Requirement 66: Dynamic name" + }, + "name": "Requirement 66: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 67@6700", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 670000, + "item": 67, + "version": 6700, + "name": "Requirement 67: Dynamic name" + }, + "name": "Requirement 67: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 68@6800", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 680000, + "item": 68, + "version": 6800, + "name": "Requirement 68: Dynamic name" + }, + "name": "Requirement 68: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 69@6900", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 690000, + "item": 69, + "version": 6900, + "name": "Requirement 69: Dynamic name" + }, + "name": "Requirement 69: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 70@7000", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 700000, + "item": 70, + "version": 7000, + "name": "Requirement 70: Dynamic name" + }, + "name": "Requirement 70: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 71@7100", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 710000, + "item": 71, + "version": 7100, + "name": "Requirement 71: Dynamic name" + }, + "name": "Requirement 71: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 72@7200", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 720000, + "item": 72, + "version": 7200, + "name": "Requirement 72: Dynamic name" + }, + "name": "Requirement 72: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 73@7300", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 730000, + "item": 73, + "version": 7300, + "name": "Requirement 73: Dynamic name" + }, + "name": "Requirement 73: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 74@7400", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 740000, + "item": 74, + "version": 7400, + "name": "Requirement 74: Dynamic name" + }, + "name": "Requirement 74: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster_codebeamer", + "version": 5 +} diff --git a/tests_system/lobster_codebeamer/data/75_items_no_schema.lobster b/tests_system/lobster_codebeamer/data/75_items_no_schema.lobster new file mode 100644 index 000000000..359b3f204 --- /dev/null +++ b/tests_system/lobster_codebeamer/data/75_items_no_schema.lobster @@ -0,0 +1,1206 @@ +{ + "data": [ + { + "tag": "itm 1@100", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 10000, + "item": 1, + "version": 100, + "name": "Requirement 1: Dynamic name" + }, + "name": "Requirement 1: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 2@200", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 20000, + "item": 2, + "version": 200, + "name": "Requirement 2: Dynamic name" + }, + "name": "Requirement 2: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 3@300", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 30000, + "item": 3, + "version": 300, + "name": "Requirement 3: Dynamic name" + }, + "name": "Requirement 3: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 4@400", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 40000, + "item": 4, + "version": 400, + "name": "Requirement 4: Dynamic name" + }, + "name": "Requirement 4: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 5@500", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 50000, + "item": 5, + "version": 500, + "name": "Requirement 5: Dynamic name" + }, + "name": "Requirement 5: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 6@600", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 60000, + "item": 6, + "version": 600, + "name": "Requirement 6: Dynamic name" + }, + "name": "Requirement 6: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 7@700", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 70000, + "item": 7, + "version": 700, + "name": "Requirement 7: Dynamic name" + }, + "name": "Requirement 7: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 8@800", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 80000, + "item": 8, + "version": 800, + "name": "Requirement 8: Dynamic name" + }, + "name": "Requirement 8: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 9@900", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 90000, + "item": 9, + "version": 900, + "name": "Requirement 9: Dynamic name" + }, + "name": "Requirement 9: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 10@1000", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 100000, + "item": 10, + "version": 1000, + "name": "Requirement 10: Dynamic name" + }, + "name": "Requirement 10: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 11@1100", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 110000, + "item": 11, + "version": 1100, + "name": "Requirement 11: Dynamic name" + }, + "name": "Requirement 11: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 12@1200", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 120000, + "item": 12, + "version": 1200, + "name": "Requirement 12: Dynamic name" + }, + "name": "Requirement 12: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 13@1300", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 130000, + "item": 13, + "version": 1300, + "name": "Requirement 13: Dynamic name" + }, + "name": "Requirement 13: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 14@1400", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 140000, + "item": 14, + "version": 1400, + "name": "Requirement 14: Dynamic name" + }, + "name": "Requirement 14: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 15@1500", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 150000, + "item": 15, + "version": 1500, + "name": "Requirement 15: Dynamic name" + }, + "name": "Requirement 15: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 16@1600", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 160000, + "item": 16, + "version": 1600, + "name": "Requirement 16: Dynamic name" + }, + "name": "Requirement 16: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 17@1700", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 170000, + "item": 17, + "version": 1700, + "name": "Requirement 17: Dynamic name" + }, + "name": "Requirement 17: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 18@1800", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 180000, + "item": 18, + "version": 1800, + "name": "Requirement 18: Dynamic name" + }, + "name": "Requirement 18: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 19@1900", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 190000, + "item": 19, + "version": 1900, + "name": "Requirement 19: Dynamic name" + }, + "name": "Requirement 19: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 20@2000", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 200000, + "item": 20, + "version": 2000, + "name": "Requirement 20: Dynamic name" + }, + "name": "Requirement 20: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 21@2100", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 210000, + "item": 21, + "version": 2100, + "name": "Requirement 21: Dynamic name" + }, + "name": "Requirement 21: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 22@2200", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 220000, + "item": 22, + "version": 2200, + "name": "Requirement 22: Dynamic name" + }, + "name": "Requirement 22: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 23@2300", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 230000, + "item": 23, + "version": 2300, + "name": "Requirement 23: Dynamic name" + }, + "name": "Requirement 23: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 24@2400", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 240000, + "item": 24, + "version": 2400, + "name": "Requirement 24: Dynamic name" + }, + "name": "Requirement 24: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 25@2500", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 250000, + "item": 25, + "version": 2500, + "name": "Requirement 25: Dynamic name" + }, + "name": "Requirement 25: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 26@2600", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 260000, + "item": 26, + "version": 2600, + "name": "Requirement 26: Dynamic name" + }, + "name": "Requirement 26: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 27@2700", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 270000, + "item": 27, + "version": 2700, + "name": "Requirement 27: Dynamic name" + }, + "name": "Requirement 27: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 28@2800", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 280000, + "item": 28, + "version": 2800, + "name": "Requirement 28: Dynamic name" + }, + "name": "Requirement 28: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 29@2900", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 290000, + "item": 29, + "version": 2900, + "name": "Requirement 29: Dynamic name" + }, + "name": "Requirement 29: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 30@3000", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 300000, + "item": 30, + "version": 3000, + "name": "Requirement 30: Dynamic name" + }, + "name": "Requirement 30: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 31@3100", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 310000, + "item": 31, + "version": 3100, + "name": "Requirement 31: Dynamic name" + }, + "name": "Requirement 31: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 32@3200", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 320000, + "item": 32, + "version": 3200, + "name": "Requirement 32: Dynamic name" + }, + "name": "Requirement 32: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 33@3300", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 330000, + "item": 33, + "version": 3300, + "name": "Requirement 33: Dynamic name" + }, + "name": "Requirement 33: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 34@3400", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 340000, + "item": 34, + "version": 3400, + "name": "Requirement 34: Dynamic name" + }, + "name": "Requirement 34: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 35@3500", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 350000, + "item": 35, + "version": 3500, + "name": "Requirement 35: Dynamic name" + }, + "name": "Requirement 35: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 36@3600", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 360000, + "item": 36, + "version": 3600, + "name": "Requirement 36: Dynamic name" + }, + "name": "Requirement 36: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 37@3700", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 370000, + "item": 37, + "version": 3700, + "name": "Requirement 37: Dynamic name" + }, + "name": "Requirement 37: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 38@3800", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 380000, + "item": 38, + "version": 3800, + "name": "Requirement 38: Dynamic name" + }, + "name": "Requirement 38: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 39@3900", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 390000, + "item": 39, + "version": 3900, + "name": "Requirement 39: Dynamic name" + }, + "name": "Requirement 39: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 40@4000", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 400000, + "item": 40, + "version": 4000, + "name": "Requirement 40: Dynamic name" + }, + "name": "Requirement 40: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 41@4100", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 410000, + "item": 41, + "version": 4100, + "name": "Requirement 41: Dynamic name" + }, + "name": "Requirement 41: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 42@4200", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 420000, + "item": 42, + "version": 4200, + "name": "Requirement 42: Dynamic name" + }, + "name": "Requirement 42: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 43@4300", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 430000, + "item": 43, + "version": 4300, + "name": "Requirement 43: Dynamic name" + }, + "name": "Requirement 43: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 44@4400", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 440000, + "item": 44, + "version": 4400, + "name": "Requirement 44: Dynamic name" + }, + "name": "Requirement 44: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 45@4500", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 450000, + "item": 45, + "version": 4500, + "name": "Requirement 45: Dynamic name" + }, + "name": "Requirement 45: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 46@4600", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 460000, + "item": 46, + "version": 4600, + "name": "Requirement 46: Dynamic name" + }, + "name": "Requirement 46: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 47@4700", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 470000, + "item": 47, + "version": 4700, + "name": "Requirement 47: Dynamic name" + }, + "name": "Requirement 47: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 48@4800", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 480000, + "item": 48, + "version": 4800, + "name": "Requirement 48: Dynamic name" + }, + "name": "Requirement 48: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 49@4900", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 490000, + "item": 49, + "version": 4900, + "name": "Requirement 49: Dynamic name" + }, + "name": "Requirement 49: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 50@5000", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 500000, + "item": 50, + "version": 5000, + "name": "Requirement 50: Dynamic name" + }, + "name": "Requirement 50: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 51@5100", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 510000, + "item": 51, + "version": 5100, + "name": "Requirement 51: Dynamic name" + }, + "name": "Requirement 51: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 52@5200", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 520000, + "item": 52, + "version": 5200, + "name": "Requirement 52: Dynamic name" + }, + "name": "Requirement 52: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 53@5300", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 530000, + "item": 53, + "version": 5300, + "name": "Requirement 53: Dynamic name" + }, + "name": "Requirement 53: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 54@5400", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 540000, + "item": 54, + "version": 5400, + "name": "Requirement 54: Dynamic name" + }, + "name": "Requirement 54: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 55@5500", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 550000, + "item": 55, + "version": 5500, + "name": "Requirement 55: Dynamic name" + }, + "name": "Requirement 55: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 56@5600", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 560000, + "item": 56, + "version": 5600, + "name": "Requirement 56: Dynamic name" + }, + "name": "Requirement 56: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 57@5700", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 570000, + "item": 57, + "version": 5700, + "name": "Requirement 57: Dynamic name" + }, + "name": "Requirement 57: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 58@5800", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 580000, + "item": 58, + "version": 5800, + "name": "Requirement 58: Dynamic name" + }, + "name": "Requirement 58: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 59@5900", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 590000, + "item": 59, + "version": 5900, + "name": "Requirement 59: Dynamic name" + }, + "name": "Requirement 59: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 60@6000", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 600000, + "item": 60, + "version": 6000, + "name": "Requirement 60: Dynamic name" + }, + "name": "Requirement 60: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 61@6100", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 610000, + "item": 61, + "version": 6100, + "name": "Requirement 61: Dynamic name" + }, + "name": "Requirement 61: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 62@6200", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 620000, + "item": 62, + "version": 6200, + "name": "Requirement 62: Dynamic name" + }, + "name": "Requirement 62: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 63@6300", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 630000, + "item": 63, + "version": 6300, + "name": "Requirement 63: Dynamic name" + }, + "name": "Requirement 63: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 64@6400", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 640000, + "item": 64, + "version": 6400, + "name": "Requirement 64: Dynamic name" + }, + "name": "Requirement 64: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 65@6500", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 650000, + "item": 65, + "version": 6500, + "name": "Requirement 65: Dynamic name" + }, + "name": "Requirement 65: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 66@6600", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 660000, + "item": 66, + "version": 6600, + "name": "Requirement 66: Dynamic name" + }, + "name": "Requirement 66: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 67@6700", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 670000, + "item": 67, + "version": 6700, + "name": "Requirement 67: Dynamic name" + }, + "name": "Requirement 67: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 68@6800", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 680000, + "item": 68, + "version": 6800, + "name": "Requirement 68: Dynamic name" + }, + "name": "Requirement 68: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 69@6900", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 690000, + "item": 69, + "version": 6900, + "name": "Requirement 69: Dynamic name" + }, + "name": "Requirement 69: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 70@7000", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 700000, + "item": 70, + "version": 7000, + "name": "Requirement 70: Dynamic name" + }, + "name": "Requirement 70: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 71@7100", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 710000, + "item": 71, + "version": 7100, + "name": "Requirement 71: Dynamic name" + }, + "name": "Requirement 71: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 72@7200", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 720000, + "item": 72, + "version": 7200, + "name": "Requirement 72: Dynamic name" + }, + "name": "Requirement 72: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 73@7300", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 730000, + "item": 73, + "version": 7300, + "name": "Requirement 73: Dynamic name" + }, + "name": "Requirement 73: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 74@7400", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 740000, + "item": 74, + "version": 7400, + "name": "Requirement 74: Dynamic name" + }, + "name": "Requirement 74: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 75@7500", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 750000, + "item": 75, + "version": 7500, + "name": "Requirement 75: Dynamic name" + }, + "name": "Requirement 75: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster_codebeamer", + "version": 5 +} diff --git a/tests_system/lobster_codebeamer/data/76_items_no_schema.lobster b/tests_system/lobster_codebeamer/data/76_items_no_schema.lobster new file mode 100644 index 000000000..fd84ac8a1 --- /dev/null +++ b/tests_system/lobster_codebeamer/data/76_items_no_schema.lobster @@ -0,0 +1,1222 @@ +{ + "data": [ + { + "tag": "itm 1@100", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 10000, + "item": 1, + "version": 100, + "name": "Requirement 1: Dynamic name" + }, + "name": "Requirement 1: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 2@200", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 20000, + "item": 2, + "version": 200, + "name": "Requirement 2: Dynamic name" + }, + "name": "Requirement 2: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 3@300", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 30000, + "item": 3, + "version": 300, + "name": "Requirement 3: Dynamic name" + }, + "name": "Requirement 3: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 4@400", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 40000, + "item": 4, + "version": 400, + "name": "Requirement 4: Dynamic name" + }, + "name": "Requirement 4: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 5@500", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 50000, + "item": 5, + "version": 500, + "name": "Requirement 5: Dynamic name" + }, + "name": "Requirement 5: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 6@600", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 60000, + "item": 6, + "version": 600, + "name": "Requirement 6: Dynamic name" + }, + "name": "Requirement 6: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 7@700", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 70000, + "item": 7, + "version": 700, + "name": "Requirement 7: Dynamic name" + }, + "name": "Requirement 7: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 8@800", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 80000, + "item": 8, + "version": 800, + "name": "Requirement 8: Dynamic name" + }, + "name": "Requirement 8: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 9@900", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 90000, + "item": 9, + "version": 900, + "name": "Requirement 9: Dynamic name" + }, + "name": "Requirement 9: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 10@1000", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 100000, + "item": 10, + "version": 1000, + "name": "Requirement 10: Dynamic name" + }, + "name": "Requirement 10: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 11@1100", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 110000, + "item": 11, + "version": 1100, + "name": "Requirement 11: Dynamic name" + }, + "name": "Requirement 11: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 12@1200", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 120000, + "item": 12, + "version": 1200, + "name": "Requirement 12: Dynamic name" + }, + "name": "Requirement 12: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 13@1300", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 130000, + "item": 13, + "version": 1300, + "name": "Requirement 13: Dynamic name" + }, + "name": "Requirement 13: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 14@1400", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 140000, + "item": 14, + "version": 1400, + "name": "Requirement 14: Dynamic name" + }, + "name": "Requirement 14: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 15@1500", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 150000, + "item": 15, + "version": 1500, + "name": "Requirement 15: Dynamic name" + }, + "name": "Requirement 15: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 16@1600", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 160000, + "item": 16, + "version": 1600, + "name": "Requirement 16: Dynamic name" + }, + "name": "Requirement 16: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 17@1700", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 170000, + "item": 17, + "version": 1700, + "name": "Requirement 17: Dynamic name" + }, + "name": "Requirement 17: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 18@1800", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 180000, + "item": 18, + "version": 1800, + "name": "Requirement 18: Dynamic name" + }, + "name": "Requirement 18: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 19@1900", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 190000, + "item": 19, + "version": 1900, + "name": "Requirement 19: Dynamic name" + }, + "name": "Requirement 19: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 20@2000", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 200000, + "item": 20, + "version": 2000, + "name": "Requirement 20: Dynamic name" + }, + "name": "Requirement 20: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 21@2100", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 210000, + "item": 21, + "version": 2100, + "name": "Requirement 21: Dynamic name" + }, + "name": "Requirement 21: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 22@2200", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 220000, + "item": 22, + "version": 2200, + "name": "Requirement 22: Dynamic name" + }, + "name": "Requirement 22: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 23@2300", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 230000, + "item": 23, + "version": 2300, + "name": "Requirement 23: Dynamic name" + }, + "name": "Requirement 23: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 24@2400", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 240000, + "item": 24, + "version": 2400, + "name": "Requirement 24: Dynamic name" + }, + "name": "Requirement 24: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 25@2500", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 250000, + "item": 25, + "version": 2500, + "name": "Requirement 25: Dynamic name" + }, + "name": "Requirement 25: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 26@2600", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 260000, + "item": 26, + "version": 2600, + "name": "Requirement 26: Dynamic name" + }, + "name": "Requirement 26: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 27@2700", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 270000, + "item": 27, + "version": 2700, + "name": "Requirement 27: Dynamic name" + }, + "name": "Requirement 27: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 28@2800", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 280000, + "item": 28, + "version": 2800, + "name": "Requirement 28: Dynamic name" + }, + "name": "Requirement 28: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 29@2900", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 290000, + "item": 29, + "version": 2900, + "name": "Requirement 29: Dynamic name" + }, + "name": "Requirement 29: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 30@3000", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 300000, + "item": 30, + "version": 3000, + "name": "Requirement 30: Dynamic name" + }, + "name": "Requirement 30: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 31@3100", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 310000, + "item": 31, + "version": 3100, + "name": "Requirement 31: Dynamic name" + }, + "name": "Requirement 31: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 32@3200", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 320000, + "item": 32, + "version": 3200, + "name": "Requirement 32: Dynamic name" + }, + "name": "Requirement 32: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 33@3300", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 330000, + "item": 33, + "version": 3300, + "name": "Requirement 33: Dynamic name" + }, + "name": "Requirement 33: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 34@3400", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 340000, + "item": 34, + "version": 3400, + "name": "Requirement 34: Dynamic name" + }, + "name": "Requirement 34: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 35@3500", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 350000, + "item": 35, + "version": 3500, + "name": "Requirement 35: Dynamic name" + }, + "name": "Requirement 35: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 36@3600", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 360000, + "item": 36, + "version": 3600, + "name": "Requirement 36: Dynamic name" + }, + "name": "Requirement 36: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 37@3700", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 370000, + "item": 37, + "version": 3700, + "name": "Requirement 37: Dynamic name" + }, + "name": "Requirement 37: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 38@3800", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 380000, + "item": 38, + "version": 3800, + "name": "Requirement 38: Dynamic name" + }, + "name": "Requirement 38: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 39@3900", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 390000, + "item": 39, + "version": 3900, + "name": "Requirement 39: Dynamic name" + }, + "name": "Requirement 39: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 40@4000", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 400000, + "item": 40, + "version": 4000, + "name": "Requirement 40: Dynamic name" + }, + "name": "Requirement 40: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 41@4100", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 410000, + "item": 41, + "version": 4100, + "name": "Requirement 41: Dynamic name" + }, + "name": "Requirement 41: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 42@4200", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 420000, + "item": 42, + "version": 4200, + "name": "Requirement 42: Dynamic name" + }, + "name": "Requirement 42: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 43@4300", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 430000, + "item": 43, + "version": 4300, + "name": "Requirement 43: Dynamic name" + }, + "name": "Requirement 43: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 44@4400", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 440000, + "item": 44, + "version": 4400, + "name": "Requirement 44: Dynamic name" + }, + "name": "Requirement 44: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 45@4500", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 450000, + "item": 45, + "version": 4500, + "name": "Requirement 45: Dynamic name" + }, + "name": "Requirement 45: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 46@4600", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 460000, + "item": 46, + "version": 4600, + "name": "Requirement 46: Dynamic name" + }, + "name": "Requirement 46: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 47@4700", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 470000, + "item": 47, + "version": 4700, + "name": "Requirement 47: Dynamic name" + }, + "name": "Requirement 47: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 48@4800", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 480000, + "item": 48, + "version": 4800, + "name": "Requirement 48: Dynamic name" + }, + "name": "Requirement 48: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 49@4900", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 490000, + "item": 49, + "version": 4900, + "name": "Requirement 49: Dynamic name" + }, + "name": "Requirement 49: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 50@5000", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 500000, + "item": 50, + "version": 5000, + "name": "Requirement 50: Dynamic name" + }, + "name": "Requirement 50: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 51@5100", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 510000, + "item": 51, + "version": 5100, + "name": "Requirement 51: Dynamic name" + }, + "name": "Requirement 51: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 52@5200", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 520000, + "item": 52, + "version": 5200, + "name": "Requirement 52: Dynamic name" + }, + "name": "Requirement 52: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 53@5300", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 530000, + "item": 53, + "version": 5300, + "name": "Requirement 53: Dynamic name" + }, + "name": "Requirement 53: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 54@5400", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 540000, + "item": 54, + "version": 5400, + "name": "Requirement 54: Dynamic name" + }, + "name": "Requirement 54: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 55@5500", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 550000, + "item": 55, + "version": 5500, + "name": "Requirement 55: Dynamic name" + }, + "name": "Requirement 55: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 56@5600", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 560000, + "item": 56, + "version": 5600, + "name": "Requirement 56: Dynamic name" + }, + "name": "Requirement 56: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 57@5700", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 570000, + "item": 57, + "version": 5700, + "name": "Requirement 57: Dynamic name" + }, + "name": "Requirement 57: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 58@5800", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 580000, + "item": 58, + "version": 5800, + "name": "Requirement 58: Dynamic name" + }, + "name": "Requirement 58: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 59@5900", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 590000, + "item": 59, + "version": 5900, + "name": "Requirement 59: Dynamic name" + }, + "name": "Requirement 59: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 60@6000", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 600000, + "item": 60, + "version": 6000, + "name": "Requirement 60: Dynamic name" + }, + "name": "Requirement 60: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 61@6100", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 610000, + "item": 61, + "version": 6100, + "name": "Requirement 61: Dynamic name" + }, + "name": "Requirement 61: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 62@6200", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 620000, + "item": 62, + "version": 6200, + "name": "Requirement 62: Dynamic name" + }, + "name": "Requirement 62: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 63@6300", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 630000, + "item": 63, + "version": 6300, + "name": "Requirement 63: Dynamic name" + }, + "name": "Requirement 63: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 64@6400", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 640000, + "item": 64, + "version": 6400, + "name": "Requirement 64: Dynamic name" + }, + "name": "Requirement 64: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 65@6500", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 650000, + "item": 65, + "version": 6500, + "name": "Requirement 65: Dynamic name" + }, + "name": "Requirement 65: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 66@6600", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 660000, + "item": 66, + "version": 6600, + "name": "Requirement 66: Dynamic name" + }, + "name": "Requirement 66: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 67@6700", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 670000, + "item": 67, + "version": 6700, + "name": "Requirement 67: Dynamic name" + }, + "name": "Requirement 67: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 68@6800", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 680000, + "item": 68, + "version": 6800, + "name": "Requirement 68: Dynamic name" + }, + "name": "Requirement 68: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 69@6900", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 690000, + "item": 69, + "version": 6900, + "name": "Requirement 69: Dynamic name" + }, + "name": "Requirement 69: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 70@7000", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 700000, + "item": 70, + "version": 7000, + "name": "Requirement 70: Dynamic name" + }, + "name": "Requirement 70: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 71@7100", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 710000, + "item": 71, + "version": 7100, + "name": "Requirement 71: Dynamic name" + }, + "name": "Requirement 71: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 72@7200", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 720000, + "item": 72, + "version": 7200, + "name": "Requirement 72: Dynamic name" + }, + "name": "Requirement 72: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 73@7300", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 730000, + "item": 73, + "version": 7300, + "name": "Requirement 73: Dynamic name" + }, + "name": "Requirement 73: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 74@7400", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 740000, + "item": 74, + "version": 7400, + "name": "Requirement 74: Dynamic name" + }, + "name": "Requirement 74: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 75@7500", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 750000, + "item": 75, + "version": 7500, + "name": "Requirement 75: Dynamic name" + }, + "name": "Requirement 75: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 76@7600", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 760000, + "item": 76, + "version": 7600, + "name": "Requirement 76: Dynamic name" + }, + "name": "Requirement 76: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster_codebeamer", + "version": 5 +} diff --git a/tests_system/lobster_codebeamer/data/9_items_no_schema.lobster b/tests_system/lobster_codebeamer/data/9_items_no_schema.lobster new file mode 100644 index 000000000..6a6aa717b --- /dev/null +++ b/tests_system/lobster_codebeamer/data/9_items_no_schema.lobster @@ -0,0 +1,150 @@ +{ + "data": [ + { + "tag": "itm 1@100", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 10000, + "item": 1, + "version": 100, + "name": "Requirement 1: Dynamic name" + }, + "name": "Requirement 1: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 2@200", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 20000, + "item": 2, + "version": 200, + "name": "Requirement 2: Dynamic name" + }, + "name": "Requirement 2: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 3@300", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 30000, + "item": 3, + "version": 300, + "name": "Requirement 3: Dynamic name" + }, + "name": "Requirement 3: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 4@400", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 40000, + "item": 4, + "version": 400, + "name": "Requirement 4: Dynamic name" + }, + "name": "Requirement 4: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 5@500", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 50000, + "item": 5, + "version": 500, + "name": "Requirement 5: Dynamic name" + }, + "name": "Requirement 5: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 6@600", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 60000, + "item": 6, + "version": 600, + "name": "Requirement 6: Dynamic name" + }, + "name": "Requirement 6: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 7@700", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 70000, + "item": 7, + "version": 700, + "name": "Requirement 7: Dynamic name" + }, + "name": "Requirement 7: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 8@800", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 80000, + "item": 8, + "version": 800, + "name": "Requirement 8: Dynamic name" + }, + "name": "Requirement 8: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm 9@900", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 90000, + "item": 9, + "version": 900, + "name": "Requirement 9: Dynamic name" + }, + "name": "Requirement 9: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster_codebeamer", + "version": 5 +} diff --git a/tests_system/lobster_codebeamer/data/codebeamer_no_schema.lobster b/tests_system/lobster_codebeamer/data/codebeamer_no_schema.lobster new file mode 100644 index 000000000..26fec9ecf --- /dev/null +++ b/tests_system/lobster_codebeamer/data/codebeamer_no_schema.lobster @@ -0,0 +1,22 @@ +{ + "data": [ + { + "tag": "itm 5@1", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 5, + "item": 5, + "version": 1, + "name": "Requirement 5: Dynamic name" + }, + "name": "Requirement 5: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster_codebeamer", + "version": 5 +} diff --git a/tests_system/lobster_codebeamer/data/refs_tracing_tag_no_schema.lobster b/tests_system/lobster_codebeamer/data/refs_tracing_tag_no_schema.lobster new file mode 100644 index 000000000..5cf2f9168 --- /dev/null +++ b/tests_system/lobster_codebeamer/data/refs_tracing_tag_no_schema.lobster @@ -0,0 +1,26 @@ +{ + "data": [ + { + "tag": "itm 42@1", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 5, + "item": 42, + "version": 1, + "name": "Alpha" + }, + "name": "Alpha", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req 1001", + "req 1002" + ] + } + ], + "generator": "lobster_codebeamer", + "version": 5 +} diff --git a/tests_system/lobster_codebeamer/lobster_codebeamer_asserter.py b/tests_system/lobster_codebeamer/lobster_codebeamer_asserter.py index 01b6bc919..930918bcc 100644 --- a/tests_system/lobster_codebeamer/lobster_codebeamer_asserter.py +++ b/tests_system/lobster_codebeamer/lobster_codebeamer_asserter.py @@ -10,6 +10,8 @@ def assertStdOutNumAndFile( page_size: int, out_file: str = "codebeamer.lobster", import_query: Optional[int] = None, + schema: Optional[str] = None, + version: Optional[int] = None, ): if num_items == 0: if import_query is None: @@ -24,7 +26,6 @@ def assertStdOutNumAndFile( f"You can try to access 'https://localhost:8999/api/v3/reports" f"/{import_query}/items?page=1&pageSize={page_size}' manually to " f"check.\n" - f"Written 0 requirements to {out_file}\n" ) else: message = ( @@ -35,13 +36,23 @@ def assertStdOutNumAndFile( f"You can try to access 'https://localhost:8999/api/v3/items" f"/query?page=1&pageSize={page_size}&queryString={import_query}' " f"manually to check.\n" - f"Written 0 requirements to {out_file}\n" ) + if schema and version: + message += ( + f"Lobster file version {version} containing 'schema' = '{schema}' " + f"is deprecated, please migrate to version 5\n" + ) + message += f"Written 0 requirements to {out_file}\n" else: total_pages = math.ceil(num_items / page_size) fetch_messages = ''.join( f"Fetching page {i} of query...\n" for i in range(1, total_pages + 1) ) + if schema and version: + fetch_messages += ( + f"Lobster file version {version} containing 'schema' = '{schema}' " + f"is deprecated, please migrate to version 5\n" + ) message = ( fetch_messages + f"Written {num_items} requirements " diff --git a/tests_system/lobster_codebeamer/lobster_codebeamer_test_runner.py b/tests_system/lobster_codebeamer/lobster_codebeamer_test_runner.py index 703fc8e02..3a4baa140 100644 --- a/tests_system/lobster_codebeamer/lobster_codebeamer_test_runner.py +++ b/tests_system/lobster_codebeamer/lobster_codebeamer_test_runner.py @@ -17,6 +17,7 @@ class ConfigFileData: page_size: Optional[int] = None num_request_retry: Optional[int] = None retry_error_codes: Optional[List[int]] = None + schema: Optional[str] = None def set_default_root_token_out(self): self.root = f"https://localhost:{PORT}" @@ -38,6 +39,7 @@ def append_if_not_none(key, value): append_if_not_none("page_size", self.page_size) append_if_not_none("num_request_retry", self.num_request_retry) append_if_not_none("retry_error_codes", self.retry_error_codes) + append_if_not_none("schema", self.schema) with open(filename, mode='w', encoding="UTF-8") as file: yaml.dump(data, file) diff --git a/tests_system/lobster_codebeamer/test_extract_requirements.py b/tests_system/lobster_codebeamer/test_extract_requirements.py index d4efd6569..e6bb987bb 100644 --- a/tests_system/lobster_codebeamer/test_extract_requirements.py +++ b/tests_system/lobster_codebeamer/test_extract_requirements.py @@ -24,11 +24,15 @@ def setUp(self): def extract_requirements(self, cfg: ConfigFileData, expected_url: str, - is_query_id: bool): + is_query_id: bool, + schema: str = None, + version: int = None): for total_items in [0, 1, 4, 5, 6, 9, 10, 11, 74, 75, 76]: with self.subTest(total_items=total_items): self.codebeamer_flask.reset() out_file = f"{total_items}_items.lobster" + if schema is None: + out_file = f"{total_items}_items_no_schema.lobster" self._test_runner.config_file_data.out = out_file self._test_runner.declare_output_file( @@ -74,6 +78,8 @@ def extract_requirements(self, out_file=self._test_runner.config_file_data.out, page_size=cfg.page_size, import_query=cfg.import_query, + schema=schema, + version=version, ) asserter.assertExitCode(0) asserter.assertOutputFiles() @@ -84,6 +90,27 @@ def test_extract_requirements_query_id_scenarios(self): # lobster-trace: UseCases.Wrong_Codebeamer_IDs_in_Output # lobster-trace: UseCases.Incorrect_Number_of_Codebeamer_Items_in_Output + cfg = self._test_runner.config_file_data + cfg.set_default_root_token_out() + cfg.import_query = 54321 + cfg.schema = "Requirement" + cfg.page_size = 5 + + self.extract_requirements( + cfg, + expected_url=("{cfg.root}/api/v3/reports/" + "{cfg.import_query}/items?page={i}&pageSize={cfg.page_size}"), + is_query_id=True, + schema="lobster-req-trace", + version=4, + ) + + def test_extract_requirements_query_id_scenarios_no_schema(self): + """Validate Codebeamer report generation with mock data using subtests.""" + # lobster-trace: UseCases.Codebeamer_Summary_in_Output + # lobster-trace: UseCases.Wrong_Codebeamer_IDs_in_Output + # lobster-trace: UseCases.Incorrect_Number_of_Codebeamer_Items_in_Output + cfg = self._test_runner.config_file_data cfg.set_default_root_token_out() cfg.import_query = 54321 @@ -102,6 +129,27 @@ def test_extract_requirements_query_string_scenarios(self): # lobster-trace: UseCases.Wrong_Codebeamer_IDs_in_Output # lobster-trace: UseCases.Incorrect_Number_of_Codebeamer_Items_in_Output + cfg = self._test_runner.config_file_data + cfg.set_default_root_token_out() + cfg.import_query = "projectId%3D10" + cfg.schema = "Requirement" + cfg.page_size = 5 + + self.extract_requirements( + cfg, + expected_url=("{cfg.root}/api/v3/items/query?page={i}" + "&pageSize={cfg.page_size}&queryString={cfg.import_query}"), + is_query_id=False, + schema="lobster-req-trace", + version=4, + ) + + def test_extract_requirements_query_string_scenarios_no_schema(self): + """Validate Codebeamer report generation with mock data using subtests.""" + # lobster-trace: UseCases.Codebeamer_Summary_in_Output + # lobster-trace: UseCases.Wrong_Codebeamer_IDs_in_Output + # lobster-trace: UseCases.Incorrect_Number_of_Codebeamer_Items_in_Output + cfg = self._test_runner.config_file_data cfg.set_default_root_token_out() cfg.import_query = "projectId%3D10" diff --git a/tests_system/lobster_codebeamer/test_lobster_codebeamer.py b/tests_system/lobster_codebeamer/test_lobster_codebeamer.py index ec893646a..df8bc57a3 100644 --- a/tests_system/lobster_codebeamer/test_lobster_codebeamer.py +++ b/tests_system/lobster_codebeamer/test_lobster_codebeamer.py @@ -86,6 +86,7 @@ def test_retry_then_success(self): cfg.retry_error_codes = [429] cfg.num_request_retry = 2 cfg.import_query = 123123123123123123 + cfg.schema = "Requirement" self._test_runner.declare_output_file( self._data_directory / self._test_runner.config_file_data.out) @@ -98,6 +99,58 @@ def test_retry_then_success(self): asserter.assertExitCode(0) asserter.assertOutputFiles() + def test_retry_then_success_no_schema(self): + """Ensure the tool retries and uses successful response + if received within retry limit.""" + # lobster-trace: codebeamer_req.Retry_On_Specific_HTTPS_Status_Codes + response_data = { + 'page': 1, + 'pageSize': 1, + 'total': 1, + 'items': [ + { + 'item': { + 'id': 5, + 'name': 'Requirement 5: Dynamic name', + 'description': 'Dynamic description for requirement 5.', + 'status': { + 'id': 5, + 'name': 'Status 5', + 'type': 'ChoiceOptionReference' + }, + 'tracker': { + 'id': 5, + 'name': 'Tracker_Name_5', + 'type': 'TrackerReference' + }, + 'version': 1 + } + } + ] + } + self.codebeamer_flask.responses = [ + Response(status=429), + Response(status=429), + Response(json.dumps(response_data), status=200), + ] + cfg = self._test_runner.config_file_data + cfg.set_default_root_token_out() + cfg.retry_error_codes = [429] + cfg.num_request_retry = 2 + cfg.import_query = 123123123123123123 + cfg.out = "codebeamer_no_schema.lobster" + self._test_runner.declare_output_file( + self._data_directory / self._test_runner.config_file_data.out) + + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + self.assertIn( + "Written 1 requirements to codebeamer_no_schema.lobster\n", + completed_process.stdout, + ) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + def test_no_retry_if_not_configured(self): """Ensure the tool does NOT retry if RETRY_ERROR_CODES is not defined.""" # lobster-trace: codebeamer_req.Missing_Error_Code diff --git a/tests_system/lobster_codebeamer/test_valid_flow.py b/tests_system/lobster_codebeamer/test_valid_flow.py index d54ed85fc..3afb75460 100644 --- a/tests_system/lobster_codebeamer/test_valid_flow.py +++ b/tests_system/lobster_codebeamer/test_valid_flow.py @@ -26,6 +26,7 @@ def test_valid_query_id(self): cfg = self._test_runner.config_file_data cfg.set_default_root_token_out() cfg.import_query = 10203 + cfg.schema = "Requirement" self._test_runner.declare_output_file( self._data_directory / self._test_runner.config_file_data.out) @@ -64,6 +65,57 @@ def test_valid_query_id(self): asserter.assertStdOutNumAndFile( num_items=len(response_data['items']), page_size=1, + schema="lobster-req-trace", + version=4, + ) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_valid_query_id_no_schema(self): + # lobster-trace: codebeamer_req.Query_Id_Parameter + cfg = self._test_runner.config_file_data + cfg.set_default_root_token_out() + cfg.import_query = 10203 + cfg.out = "codebeamer_no_schema.lobster" + self._test_runner.declare_output_file( + self._data_directory / self._test_runner.config_file_data.out) + + response_data = { + 'page': 1, + 'pageSize': 1, + 'total': 1, + 'items': [ + { + 'item': { + 'id': 5, + 'name': 'Requirement 5: Dynamic name', + 'description': 'Dynamic description for requirement 5.', + 'status': { + 'id': 5, + 'name': 'Status 5', + 'type': 'ChoiceOptionReference' + }, + 'tracker': { + 'id': 5, + 'name': 'Tracker_Name_5', + 'type': 'TrackerReference' + }, + 'version': 1 + } + } + ] + } + + self.codebeamer_flask.responses = [ + Response(json.dumps(response_data), status=200), + ] + + completed_process = self._test_runner.run_tool_test() + asserter = LobsterCodebeamerAsserter(self, completed_process, self._test_runner) + asserter.assertStdOutNumAndFile( + num_items=len(response_data['items']), + page_size=1, + out_file=cfg.out, ) asserter.assertExitCode(0) asserter.assertOutputFiles() @@ -73,6 +125,7 @@ def test_references_tracing_tag_added(self): cfg = self._test_runner.config_file_data cfg.set_default_root_token_out() cfg.import_query = 424242 + cfg.schema = "Requirement" cfg.out = "refs_tracing_tag.lobster" self._test_runner.declare_output_file( self._data_directory / self._test_runner.config_file_data.out) @@ -113,6 +166,63 @@ def test_references_tracing_tag_added(self): Response(json.dumps(response_data), status=200), ] + completed_process = self._test_runner.run_tool_test() + asserter = LobsterCodebeamerAsserter(self, completed_process, self._test_runner) + asserter.assertStdOutNumAndFile( + num_items=len(response_data['items']), + page_size=1, + out_file=cfg.out, + schema="lobster-req-trace", + version=4, + ) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_references_tracing_tag_added_no_schema(self): + # lobster-trace: codebeamer_req.References_Field_Support + cfg = self._test_runner.config_file_data + cfg.set_default_root_token_out() + cfg.import_query = 424242 + cfg.out = "refs_tracing_tag_no_schema.lobster" + self._test_runner.declare_output_file( + self._data_directory / self._test_runner.config_file_data.out) + self._test_runner.config_file_data.refs = ["Wife", "Husband"] + + response_data = { + 'page': 1, + 'pageSize': 1, + 'total': 1, + 'items': [ + { + 'item': { + 'id': 42, + 'name': 'Alpha', + 'status': { + 'id': 1, + 'name': 'Married', + 'type': 'ChoiceOptionReference' + }, + 'tracker': { + 'id': 5, + 'name': 'Beta', + 'type': 'TrackerReference' + }, + 'version': 1, + 'Wife': [ + {"id": 1001, "name": "Delta"} + ], + 'Husband': [ + {"id": 1002, "name": "Charly"} + ], + } + } + ] + } + + self.codebeamer_flask.responses = [ + Response(json.dumps(response_data), status=200), + ] + completed_process = self._test_runner.run_tool_test() asserter = LobsterCodebeamerAsserter(self, completed_process, self._test_runner) asserter.assertStdOutNumAndFile( diff --git a/tests_system/lobster_cpptest/data/1_reference_config_no_kind.yaml b/tests_system/lobster_cpptest/data/1_reference_config_no_kind.yaml new file mode 100644 index 000000000..e273032aa --- /dev/null +++ b/tests_system/lobster_cpptest/data/1_reference_config_no_kind.yaml @@ -0,0 +1,4 @@ +output_file: "1_reference_no_schema.lobster" +files: + - '1_reference.cpp' +codebeamer_url: "https://codebeamer.com" diff --git a/tests_system/lobster_cpptest/data/1_reference_no_schema.lobster b/tests_system/lobster_cpptest/data/1_reference_no_schema.lobster new file mode 100644 index 000000000..0782ca785 --- /dev/null +++ b/tests_system/lobster_cpptest/data/1_reference_no_schema.lobster @@ -0,0 +1,108 @@ +{ + "data": [ + { + "tag": "cpp 1_reference.cpp:1:SingleReference:33", + "location": { + "kind": "file", + "file": "1_reference.cpp", + "line": 33, + "column": null + }, + "name": "1_reference.cpp:1:SingleReference:33", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816" + ] + }, + { + "tag": "cpp 1_reference.cpp:1:TestTest:3", + "location": { + "kind": "file", + "file": "1_reference.cpp", + "line": 3, + "column": null + }, + "name": "1_reference.cpp:1:TestTest:3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp 1_reference.cpp:1:TestMultiLine:5", + "location": { + "kind": "file", + "file": "1_reference.cpp", + "line": 5, + "column": null + }, + "name": "1_reference.cpp:1:TestMultiLine:5", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp 1_reference.cpp:1:EmptyImplementation:10", + "location": { + "kind": "file", + "file": "1_reference.cpp", + "line": 10, + "column": null + }, + "name": "1_reference.cpp:1:EmptyImplementation:10", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp 1_reference.cpp:1:ImplementationMultipleLines:12", + "location": { + "kind": "file", + "file": "1_reference.cpp", + "line": 12, + "column": null + }, + "name": "1_reference.cpp:1:ImplementationMultipleLines:12", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp 1_reference.cpp:1:MultipleLinesWithComments:16", + "location": { + "kind": "file", + "file": "1_reference.cpp", + "line": 16, + "column": null + }, + "name": "1_reference.cpp:1:MultipleLinesWithComments:16", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp 1_reference.cpp:1:IAMCommented:28", + "location": { + "kind": "file", + "file": "1_reference.cpp", + "line": 28, + "column": null + }, + "name": "1_reference.cpp:1:IAMCommented:28", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster-cpptest", + "version": 5 +} diff --git a/tests_system/lobster_cpptest/data/cpptest-config_no_kind.yaml b/tests_system/lobster_cpptest/data/cpptest-config_no_kind.yaml new file mode 100644 index 000000000..13ea79525 --- /dev/null +++ b/tests_system/lobster_cpptest/data/cpptest-config_no_kind.yaml @@ -0,0 +1,2 @@ +output_file: "component_tests_no_schema.lobster" +codebeamer_url: "https://codebeamer.com" diff --git a/tests_system/lobster_cpptest/data/directory_files_config_no_kind.yaml b/tests_system/lobster_cpptest/data/directory_files_config_no_kind.yaml new file mode 100644 index 000000000..e0732b063 --- /dev/null +++ b/tests_system/lobster_cpptest/data/directory_files_config_no_kind.yaml @@ -0,0 +1,6 @@ +output_file: "directory_files_no_schema.lobster" +files: + - cpp_test_files + - 1_reference.cpp + - no_references.cpp +codebeamer_url: "https://codebeamer.com" diff --git a/tests_system/lobster_cpptest/data/directory_files_no_schema.lobster b/tests_system/lobster_cpptest/data/directory_files_no_schema.lobster new file mode 100644 index 000000000..5251f7414 --- /dev/null +++ b/tests_system/lobster_cpptest/data/directory_files_no_schema.lobster @@ -0,0 +1,634 @@ +{ + "data": [ + { + "tag": "cpp 1_reference.cpp:1:SingleReference:33", + "location": { + "kind": "file", + "file": "1_reference.cpp", + "line": 33, + "column": null + }, + "name": "1_reference.cpp:1:SingleReference:33", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816" + ] + }, + { + "tag": "cpp car_test_cases.cpp:1:LaneKeepAssist:64", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 64, + "column": null + }, + "name": "car_test_cases.cpp:1:LaneKeepAssist:64", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815" + ] + }, + { + "tag": "cpp car_test_cases.cpp:1:BlindSpotMonitoring:67", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 67, + "column": null + }, + "name": "car_test_cases.cpp:1:BlindSpotMonitoring:67", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816" + ] + }, + { + "tag": "cpp car_test_cases.cpp:1:ParkingSensors:70", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 70, + "column": null + }, + "name": "car_test_cases.cpp:1:ParkingSensors:70", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816" + ] + }, + { + "tag": "cpp car_test_cases.cpp:1:TrafficSignRecognition:75", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 75, + "column": null + }, + "name": "car_test_cases.cpp:1:TrafficSignRecognition:75", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816", + "itm 0817", + "itm 0818", + "itm 0819", + "itm 0820" + ] + }, + { + "tag": "cpp car_test_cases.cpp:1:MultiZoneClimateControl:107", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 107, + "column": null + }, + "name": "car_test_cases.cpp:1:MultiZoneClimateControl:107", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0816" + ] + }, + { + "tag": "cpp 1_reference.cpp:1:TestTest:3", + "location": { + "kind": "file", + "file": "1_reference.cpp", + "line": 3, + "column": null + }, + "name": "1_reference.cpp:1:TestTest:3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp 1_reference.cpp:1:TestMultiLine:5", + "location": { + "kind": "file", + "file": "1_reference.cpp", + "line": 5, + "column": null + }, + "name": "1_reference.cpp:1:TestMultiLine:5", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp 1_reference.cpp:1:EmptyImplementation:10", + "location": { + "kind": "file", + "file": "1_reference.cpp", + "line": 10, + "column": null + }, + "name": "1_reference.cpp:1:EmptyImplementation:10", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp 1_reference.cpp:1:ImplementationMultipleLines:12", + "location": { + "kind": "file", + "file": "1_reference.cpp", + "line": 12, + "column": null + }, + "name": "1_reference.cpp:1:ImplementationMultipleLines:12", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp 1_reference.cpp:1:MultipleLinesWithComments:16", + "location": { + "kind": "file", + "file": "1_reference.cpp", + "line": 16, + "column": null + }, + "name": "1_reference.cpp:1:MultipleLinesWithComments:16", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp 1_reference.cpp:1:IAMCommented:28", + "location": { + "kind": "file", + "file": "1_reference.cpp", + "line": 28, + "column": null + }, + "name": "1_reference.cpp:1:IAMCommented:28", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp no_references.cpp:1:TestTest:3", + "location": { + "kind": "file", + "file": "no_references.cpp", + "line": 3, + "column": null + }, + "name": "no_references.cpp:1:TestTest:3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp no_references.cpp:1:TestMultiLine:5", + "location": { + "kind": "file", + "file": "no_references.cpp", + "line": 5, + "column": null + }, + "name": "no_references.cpp:1:TestMultiLine:5", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp no_references.cpp:1:EmptyImplementation:10", + "location": { + "kind": "file", + "file": "no_references.cpp", + "line": 10, + "column": null + }, + "name": "no_references.cpp:1:EmptyImplementation:10", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp no_references.cpp:1:ImplementationMultipleLines:12", + "location": { + "kind": "file", + "file": "no_references.cpp", + "line": 12, + "column": null + }, + "name": "no_references.cpp:1:ImplementationMultipleLines:12", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp no_references.cpp:1:MultipleLinesWithComments:16", + "location": { + "kind": "file", + "file": "no_references.cpp", + "line": 16, + "column": null + }, + "name": "no_references.cpp:1:MultipleLinesWithComments:16", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp no_references.cpp:1:IAMCommented:27", + "location": { + "kind": "file", + "file": "no_references.cpp", + "line": 27, + "column": null + }, + "name": "no_references.cpp:1:IAMCommented:27", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:LeatherSeats:3", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 3, + "column": null + }, + "name": "car_test_cases.cpp:1:LeatherSeats:3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:Sunroof:4", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 4, + "column": null + }, + "name": "car_test_cases.cpp:1:Sunroof:4", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:HeatedSteeringWheel:5", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 5, + "column": null + }, + "name": "car_test_cases.cpp:1:HeatedSteeringWheel:5", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:AdaptiveCruiseControl:6", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 6, + "column": null + }, + "name": "car_test_cases.cpp:1:AdaptiveCruiseControl:6", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:SurroundSoundSystem:7", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 7, + "column": null + }, + "name": "car_test_cases.cpp:1:SurroundSoundSystem:7", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:PanoramicRoof:8", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 8, + "column": null + }, + "name": "car_test_cases.cpp:1:PanoramicRoof:8", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:MassageSeats:9", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 9, + "column": null + }, + "name": "car_test_cases.cpp:1:MassageSeats:9", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:AmbientLighting:10", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 10, + "column": null + }, + "name": "car_test_cases.cpp:1:AmbientLighting:10", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:WirelessCharging:14", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 14, + "column": null + }, + "name": "car_test_cases.cpp:1:WirelessCharging:14", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:KeylessEntry:19", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 19, + "column": null + }, + "name": "car_test_cases.cpp:1:KeylessEntry:19", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:AutomaticParking:21", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 21, + "column": null + }, + "name": "car_test_cases.cpp:1:AutomaticParking:21", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:HeadsUpDisplay:25", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 25, + "column": null + }, + "name": "car_test_cases.cpp:1:HeadsUpDisplay:25", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:VentilatedSeats:34", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 34, + "column": null + }, + "name": "car_test_cases.cpp:1:VentilatedSeats:34", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:DigitalCockpit:37", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 37, + "column": null + }, + "name": "car_test_cases.cpp:1:DigitalCockpit:37", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:GestureControl:41", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 41, + "column": null + }, + "name": "car_test_cases.cpp:1:GestureControl:41", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:NightVision:45", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 45, + "column": null + }, + "name": "car_test_cases.cpp:1:NightVision:45", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:PremiumSoundSystem:50", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 50, + "column": null + }, + "name": "car_test_cases.cpp:1:PremiumSoundSystem:50", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:AutomaticClimateControl:55", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 55, + "column": null + }, + "name": "car_test_cases.cpp:1:AutomaticClimateControl:55", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:RearSeatEntertainment:58", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 58, + "column": null + }, + "name": "car_test_cases.cpp:1:RearSeatEntertainment:58", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:AutomaticEmergencyBraking:83", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 83, + "column": null + }, + "name": "car_test_cases.cpp:1:AutomaticEmergencyBraking:83", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:DriverAttentionMonitoring:88", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 88, + "column": null + }, + "name": "car_test_cases.cpp:1:DriverAttentionMonitoring:88", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:RemoteStart:94", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 94, + "column": null + }, + "name": "car_test_cases.cpp:1:RemoteStart:94", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:PowerTailgate:100", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 100, + "column": null + }, + "name": "car_test_cases.cpp:1:PowerTailgate:100", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:SoftCloseDoors:113", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 113, + "column": null + }, + "name": "car_test_cases.cpp:1:SoftCloseDoors:113", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:AcousticGlass:118", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 118, + "column": null + }, + "name": "car_test_cases.cpp:1:AcousticGlass:118", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster-cpptest", + "version": 5 +} diff --git a/tests_system/lobster_cpptest/data/invalid_extension_config_no_kind.yaml b/tests_system/lobster_cpptest/data/invalid_extension_config_no_kind.yaml new file mode 100644 index 000000000..641f332d0 --- /dev/null +++ b/tests_system/lobster_cpptest/data/invalid_extension_config_no_kind.yaml @@ -0,0 +1,4 @@ +output_file: "invalid_extension_no_schema.lobster" +files: + - 'invalid_extension.xyz' +codebeamer_url: "https://codebeamer.com" diff --git a/tests_system/lobster_cpptest/data/invalid_extension_no_schema.lobster b/tests_system/lobster_cpptest/data/invalid_extension_no_schema.lobster new file mode 100644 index 000000000..a59037369 --- /dev/null +++ b/tests_system/lobster_cpptest/data/invalid_extension_no_schema.lobster @@ -0,0 +1,592 @@ +{ + "data": [ + { + "tag": "cpp invalid_extension.xyz:1:RequirementModified:64", + "location": { + "kind": "file", + "file": "invalid_extension.xyz", + "line": 64, + "column": null + }, + "name": "invalid_extension.xyz:1:RequirementModified:64", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815" + ] + }, + { + "tag": "cpp invalid_extension.xyz:1:RequirementAsOneLineCommentsModified:67", + "location": { + "kind": "file", + "file": "invalid_extension.xyz", + "line": 67, + "column": null + }, + "name": "invalid_extension.xyz:1:RequirementAsOneLineCommentsModified:67", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816" + ] + }, + { + "tag": "cpp invalid_extension.xyz:1:RequirementAsCommentsModified:70", + "location": { + "kind": "file", + "file": "invalid_extension.xyz", + "line": 70, + "column": null + }, + "name": "invalid_extension.xyz:1:RequirementAsCommentsModified:70", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816" + ] + }, + { + "tag": "cpp invalid_extension.xyz:1:RequirementsAsMultipleCommentsModified:75", + "location": { + "kind": "file", + "file": "invalid_extension.xyz", + "line": 75, + "column": null + }, + "name": "invalid_extension.xyz:1:RequirementsAsMultipleCommentsModified:75", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816", + "itm 0817", + "itm 0818", + "itm 0819", + "itm 0820" + ] + }, + { + "tag": "cpp invalid_extension.xyz:1:MixedRequirementsModified:107", + "location": { + "kind": "file", + "file": "invalid_extension.xyz", + "line": 107, + "column": null + }, + "name": "invalid_extension.xyz:1:MixedRequirementsModified:107", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0816" + ] + }, + { + "tag": "cpp invalid_extension.xyz:1:ImplementationMultipleLinesModified:187", + "location": { + "kind": "file", + "file": "invalid_extension.xyz", + "line": 187, + "column": null + }, + "name": "invalid_extension.xyz:1:ImplementationMultipleLinesModified:187", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816" + ] + }, + { + "tag": "cpp invalid_extension.xyz:1:TestPInstanceModified:3", + "location": { + "kind": "file", + "file": "invalid_extension.xyz", + "line": 3, + "column": null + }, + "name": "invalid_extension.xyz:1:TestPInstanceModified:3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp invalid_extension.xyz:1:TestTestModified:4", + "location": { + "kind": "file", + "file": "invalid_extension.xyz", + "line": 4, + "column": null + }, + "name": "invalid_extension.xyz:1:TestTestModified:4", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp invalid_extension.xyz:1:TestTestModifiedF:5", + "location": { + "kind": "file", + "file": "invalid_extension.xyz", + "line": 5, + "column": null + }, + "name": "invalid_extension.xyz:1:TestTestModifiedF:5", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp invalid_extension.xyz:1:TestTestModifiedP:6", + "location": { + "kind": "file", + "file": "invalid_extension.xyz", + "line": 6, + "column": null + }, + "name": "invalid_extension.xyz:1:TestTestModifiedP:6", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp invalid_extension.xyz:1:TestTypedTestModified:7", + "location": { + "kind": "file", + "file": "invalid_extension.xyz", + "line": 7, + "column": null + }, + "name": "invalid_extension.xyz:1:TestTypedTestModified:7", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp invalid_extension.xyz:1:TestTypedTestModifiedP:8", + "location": { + "kind": "file", + "file": "invalid_extension.xyz", + "line": 8, + "column": null + }, + "name": "invalid_extension.xyz:1:TestTypedTestModifiedP:8", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp invalid_extension.xyz:1:TestTypedTestModifiedSuite:9", + "location": { + "kind": "file", + "file": "invalid_extension.xyz", + "line": 9, + "column": null + }, + "name": "invalid_extension.xyz:1:TestTypedTestModifiedSuite:9", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp invalid_extension.xyz:1:TestFInstanceModified:10", + "location": { + "kind": "file", + "file": "invalid_extension.xyz", + "line": 10, + "column": null + }, + "name": "invalid_extension.xyz:1:TestFInstanceModified:10", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp invalid_extension.xyz:1:TestMultiLineModified:14", + "location": { + "kind": "file", + "file": "invalid_extension.xyz", + "line": 14, + "column": null + }, + "name": "invalid_extension.xyz:1:TestMultiLineModified:14", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp invalid_extension.xyz:1:EmptyImplementation:19", + "location": { + "kind": "file", + "file": "invalid_extension.xyz", + "line": 19, + "column": null + }, + "name": "invalid_extension.xyz:1:EmptyImplementation:19", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp invalid_extension.xyz:1:ImplementationMultipleLines:21", + "location": { + "kind": "file", + "file": "invalid_extension.xyz", + "line": 21, + "column": null + }, + "name": "invalid_extension.xyz:1:ImplementationMultipleLines:21", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp invalid_extension.xyz:1:MultipleLinesWithCommentsModified:25", + "location": { + "kind": "file", + "file": "invalid_extension.xyz", + "line": 25, + "column": null + }, + "name": "invalid_extension.xyz:1:MultipleLinesWithCommentsModified:25", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp invalid_extension.xyz:1:TestTagInOnlineModified:34", + "location": { + "kind": "file", + "file": "invalid_extension.xyz", + "line": 34, + "column": null + }, + "name": "invalid_extension.xyz:1:TestTagInOnlineModified:34", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp invalid_extension.xyz:1:TestTagPrecededByCommentModified:37", + "location": { + "kind": "file", + "file": "invalid_extension.xyz", + "line": 37, + "column": null + }, + "name": "invalid_extension.xyz:1:TestTagPrecededByCommentModified:37", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp invalid_extension.xyz:1:TestTagFollowedByCommentModified:41", + "location": { + "kind": "file", + "file": "invalid_extension.xyz", + "line": 41, + "column": null + }, + "name": "invalid_extension.xyz:1:TestTagFollowedByCommentModified:41", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp invalid_extension.xyz:1:TestTagWithCommentsAroundModified:45", + "location": { + "kind": "file", + "file": "invalid_extension.xyz", + "line": 45, + "column": null + }, + "name": "invalid_extension.xyz:1:TestTagWithCommentsAroundModified:45", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp invalid_extension.xyz:1:TestTagAsTextModified:50", + "location": { + "kind": "file", + "file": "invalid_extension.xyz", + "line": 50, + "column": null + }, + "name": "invalid_extension.xyz:1:TestTagAsTextModified:50", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp invalid_extension.xyz:1:BriefTagInOnlineModified:55", + "location": { + "kind": "file", + "file": "invalid_extension.xyz", + "line": 55, + "column": null + }, + "name": "invalid_extension.xyz:1:BriefTagInOnlineModified:55", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp invalid_extension.xyz:1:BriefTagMultipleLinesModified:58", + "location": { + "kind": "file", + "file": "invalid_extension.xyz", + "line": 58, + "column": null + }, + "name": "invalid_extension.xyz:1:BriefTagMultipleLinesModified:58", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp invalid_extension.xyz:1:URLRequirementModified:83", + "location": { + "kind": "file", + "file": "invalid_extension.xyz", + "line": 83, + "column": null + }, + "name": "invalid_extension.xyz:1:URLRequirementModified:83", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp invalid_extension.xyz:1:URLRequirementsCommaSeparatedModified:88", + "location": { + "kind": "file", + "file": "invalid_extension.xyz", + "line": 88, + "column": null + }, + "name": "invalid_extension.xyz:1:URLRequirementsCommaSeparatedModified:88", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp invalid_extension.xyz:1:URLRequirementsAsCommentsSpaceSeparatedModified:94", + "location": { + "kind": "file", + "file": "invalid_extension.xyz", + "line": 94, + "column": null + }, + "name": "invalid_extension.xyz:1:URLRequirementsAsCommentsSpaceSeparatedModified:94", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp invalid_extension.xyz:1:MultipleURLRequirementsModified:100", + "location": { + "kind": "file", + "file": "invalid_extension.xyz", + "line": 100, + "column": null + }, + "name": "invalid_extension.xyz:1:MultipleURLRequirementsModified:100", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp invalid_extension.xyz:1:InvalidRequirementModified:113", + "location": { + "kind": "file", + "file": "invalid_extension.xyz", + "line": 113, + "column": null + }, + "name": "invalid_extension.xyz:1:InvalidRequirementModified:113", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp invalid_extension.xyz:1:MissingRequirementReferenceModified:118", + "location": { + "kind": "file", + "file": "invalid_extension.xyz", + "line": 118, + "column": null + }, + "name": "invalid_extension.xyz:1:MissingRequirementReferenceModified:118", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp invalid_extension.xyz:1:RequiredByWithAtModified:125", + "location": { + "kind": "file", + "file": "invalid_extension.xyz", + "line": 125, + "column": null + }, + "name": "invalid_extension.xyz:1:RequiredByWithAtModified:125", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp invalid_extension.xyz:1:MultipleRequiredByCommaSeparatedModified:130", + "location": { + "kind": "file", + "file": "invalid_extension.xyz", + "line": 130, + "column": null + }, + "name": "invalid_extension.xyz:1:MultipleRequiredByCommaSeparatedModified:130", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp invalid_extension.xyz:1:MultipleRequiredByAsCommentsModified:135", + "location": { + "kind": "file", + "file": "invalid_extension.xyz", + "line": 135, + "column": null + }, + "name": "invalid_extension.xyz:1:MultipleRequiredByAsCommentsModified:135", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp invalid_extension.xyz:1:RequiredByWithNewLinesModified:145", + "location": { + "kind": "file", + "file": "invalid_extension.xyz", + "line": 145, + "column": null + }, + "name": "invalid_extension.xyz:1:RequiredByWithNewLinesModified:145", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp invalid_extension.xyz:1:TestMethodModified:160", + "location": { + "kind": "file", + "file": "invalid_extension.xyz", + "line": 160, + "column": null + }, + "name": "invalid_extension.xyz:1:TestMethodModified:160", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp invalid_extension.xyz:1:TestMethodAsCommentsSpaceSeparatedModified:163", + "location": { + "kind": "file", + "file": "invalid_extension.xyz", + "line": 163, + "column": null + }, + "name": "invalid_extension.xyz:1:TestMethodAsCommentsSpaceSeparatedModified:163", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp invalid_extension.xyz:1:TestMethodAsCommentsCommaSeparatedModified:168", + "location": { + "kind": "file", + "file": "invalid_extension.xyz", + "line": 168, + "column": null + }, + "name": "invalid_extension.xyz:1:TestMethodAsCommentsCommaSeparatedModified:168", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp invalid_extension.xyz:1:InvalidTestMethodModified:175", + "location": { + "kind": "file", + "file": "invalid_extension.xyz", + "line": 175, + "column": null + }, + "name": "invalid_extension.xyz:1:InvalidTestMethodModified:175", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp invalid_extension.xyz:1:MissingTestMethodModified:180", + "location": { + "kind": "file", + "file": "invalid_extension.xyz", + "line": 180, + "column": null + }, + "name": "invalid_extension.xyz:1:MissingTestMethodModified:180", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster-cpptest", + "version": 5 +} diff --git a/tests_system/lobster_cpptest/data/many_references_config_no_kind.yaml b/tests_system/lobster_cpptest/data/many_references_config_no_kind.yaml new file mode 100644 index 000000000..ed415674d --- /dev/null +++ b/tests_system/lobster_cpptest/data/many_references_config_no_kind.yaml @@ -0,0 +1,4 @@ +output_file: "many_references_no_schema.lobster" +files: + - 'many_references.cpp' +codebeamer_url: "https://codebeamer.com" diff --git a/tests_system/lobster_cpptest/data/many_references_no_schema.lobster b/tests_system/lobster_cpptest/data/many_references_no_schema.lobster new file mode 100644 index 000000000..ec02ab4ce --- /dev/null +++ b/tests_system/lobster_cpptest/data/many_references_no_schema.lobster @@ -0,0 +1,201 @@ +{ + "data": [ + { + "tag": "cpp many_references.cpp:1:SingleReference:33", + "location": { + "kind": "file", + "file": "many_references.cpp", + "line": 33, + "column": null + }, + "name": "many_references.cpp:1:SingleReference:33", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816" + ] + }, + { + "tag": "cpp many_references.cpp:1:URLRequirement:37", + "location": { + "kind": "file", + "file": "many_references.cpp", + "line": 37, + "column": null + }, + "name": "many_references.cpp:1:URLRequirement:37", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0219" + ] + }, + { + "tag": "cpp many_references.cpp:1:URLRequirementsAsCommentsSpaceSeparated:49", + "location": { + "kind": "file", + "file": "many_references.cpp", + "line": 49, + "column": null + }, + "name": "many_references.cpp:1:URLRequirementsAsCommentsSpaceSeparated:49", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0304" + ] + }, + { + "tag": "cpp many_references.cpp:1:MixedRequirements:62", + "location": { + "kind": "file", + "file": "many_references.cpp", + "line": 62, + "column": null + }, + "name": "many_references.cpp:1:MixedRequirements:62", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0816" + ] + }, + { + "tag": "cpp many_references.cpp:1:TestTest:3", + "location": { + "kind": "file", + "file": "many_references.cpp", + "line": 3, + "column": null + }, + "name": "many_references.cpp:1:TestTest:3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp many_references.cpp:1:TestMultiLine:5", + "location": { + "kind": "file", + "file": "many_references.cpp", + "line": 5, + "column": null + }, + "name": "many_references.cpp:1:TestMultiLine:5", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp many_references.cpp:1:EmptyImplementation:10", + "location": { + "kind": "file", + "file": "many_references.cpp", + "line": 10, + "column": null + }, + "name": "many_references.cpp:1:EmptyImplementation:10", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp many_references.cpp:1:ImplementationMultipleLines:12", + "location": { + "kind": "file", + "file": "many_references.cpp", + "line": 12, + "column": null + }, + "name": "many_references.cpp:1:ImplementationMultipleLines:12", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp many_references.cpp:1:MultipleLinesWithComments:16", + "location": { + "kind": "file", + "file": "many_references.cpp", + "line": 16, + "column": null + }, + "name": "many_references.cpp:1:MultipleLinesWithComments:16", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp many_references.cpp:1:IAMCommented:28", + "location": { + "kind": "file", + "file": "many_references.cpp", + "line": 28, + "column": null + }, + "name": "many_references.cpp:1:IAMCommented:28", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp many_references.cpp:1:URLRequirementsCommaSeparated:43", + "location": { + "kind": "file", + "file": "many_references.cpp", + "line": 43, + "column": null + }, + "name": "many_references.cpp:1:URLRequirementsCommaSeparated:43", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp many_references.cpp:1:MultipleURLRequirements:55", + "location": { + "kind": "file", + "file": "many_references.cpp", + "line": 55, + "column": null + }, + "name": "many_references.cpp:1:MultipleURLRequirements:55", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp many_references.cpp:1:InvalidRequirement:68", + "location": { + "kind": "file", + "file": "many_references.cpp", + "line": 68, + "column": null + }, + "name": "many_references.cpp:1:InvalidRequirement:68", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster-cpptest", + "version": 5 +} diff --git a/tests_system/lobster_cpptest/data/multiple_files_config_no_kind.yaml b/tests_system/lobster_cpptest/data/multiple_files_config_no_kind.yaml new file mode 100644 index 000000000..a0fdcccc3 --- /dev/null +++ b/tests_system/lobster_cpptest/data/multiple_files_config_no_kind.yaml @@ -0,0 +1,6 @@ +output_file: "multiple_files_no_schema.lobster" +files: + - 'multi1.cpp' + - 'multi2.cpp' + +codebeamer_url: "https://codebeamer.com" diff --git a/tests_system/lobster_cpptest/data/multiple_files_no_schema.lobster b/tests_system/lobster_cpptest/data/multiple_files_no_schema.lobster new file mode 100644 index 000000000..439bdf818 --- /dev/null +++ b/tests_system/lobster_cpptest/data/multiple_files_no_schema.lobster @@ -0,0 +1,358 @@ +{ + "data": [ + { + "tag": "cpp multi2.cpp:1:RequirementB:3", + "location": { + "kind": "file", + "file": "multi2.cpp", + "line": 3, + "column": null + }, + "name": "multi2.cpp:1:RequirementB:3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815" + ] + }, + { + "tag": "cpp multi2.cpp:1:RequirementAsOneLineCommentsB:6", + "location": { + "kind": "file", + "file": "multi2.cpp", + "line": 6, + "column": null + }, + "name": "multi2.cpp:1:RequirementAsOneLineCommentsB:6", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816" + ] + }, + { + "tag": "cpp multi2.cpp:1:RequirementAsCommentsB:9", + "location": { + "kind": "file", + "file": "multi2.cpp", + "line": 9, + "column": null + }, + "name": "multi2.cpp:1:RequirementAsCommentsB:9", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816" + ] + }, + { + "tag": "cpp multi2.cpp:1:RequirementsAsMultipleCommentsB:14", + "location": { + "kind": "file", + "file": "multi2.cpp", + "line": 14, + "column": null + }, + "name": "multi2.cpp:1:RequirementsAsMultipleCommentsB:14", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816", + "itm 0817", + "itm 0818", + "itm 0819", + "itm 0820" + ] + }, + { + "tag": "cpp multi2.cpp:1:MixedRequirementsB:46", + "location": { + "kind": "file", + "file": "multi2.cpp", + "line": 46, + "column": null + }, + "name": "multi2.cpp:1:MixedRequirementsB:46", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0816" + ] + }, + { + "tag": "cpp multi1.cpp:1:RequirementA:3", + "location": { + "kind": "file", + "file": "multi1.cpp", + "line": 3, + "column": null + }, + "name": "multi1.cpp:1:RequirementA:3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815" + ] + }, + { + "tag": "cpp multi1.cpp:1:RequirementAsOneLineCommentsA:6", + "location": { + "kind": "file", + "file": "multi1.cpp", + "line": 6, + "column": null + }, + "name": "multi1.cpp:1:RequirementAsOneLineCommentsA:6", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816" + ] + }, + { + "tag": "cpp multi1.cpp:1:RequirementAsCommentsA:9", + "location": { + "kind": "file", + "file": "multi1.cpp", + "line": 9, + "column": null + }, + "name": "multi1.cpp:1:RequirementAsCommentsA:9", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816" + ] + }, + { + "tag": "cpp multi1.cpp:1:RequirementsAsMultipleCommentsA:14", + "location": { + "kind": "file", + "file": "multi1.cpp", + "line": 14, + "column": null + }, + "name": "multi1.cpp:1:RequirementsAsMultipleCommentsA:14", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816", + "itm 0817", + "itm 0818", + "itm 0819", + "itm 0820" + ] + }, + { + "tag": "cpp multi1.cpp:1:MixedRequirementsA:46", + "location": { + "kind": "file", + "file": "multi1.cpp", + "line": 46, + "column": null + }, + "name": "multi1.cpp:1:MixedRequirementsA:46", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0816" + ] + }, + { + "tag": "cpp multi2.cpp:1:URLRequirementB:22", + "location": { + "kind": "file", + "file": "multi2.cpp", + "line": 22, + "column": null + }, + "name": "multi2.cpp:1:URLRequirementB:22", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp multi2.cpp:1:URLRequirementsCommaSeparatedB:27", + "location": { + "kind": "file", + "file": "multi2.cpp", + "line": 27, + "column": null + }, + "name": "multi2.cpp:1:URLRequirementsCommaSeparatedB:27", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp multi2.cpp:1:URLRequirementsAsCommentsSpaceSeparatedB:33", + "location": { + "kind": "file", + "file": "multi2.cpp", + "line": 33, + "column": null + }, + "name": "multi2.cpp:1:URLRequirementsAsCommentsSpaceSeparatedB:33", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp multi2.cpp:1:MultipleURLRequirementsB:39", + "location": { + "kind": "file", + "file": "multi2.cpp", + "line": 39, + "column": null + }, + "name": "multi2.cpp:1:MultipleURLRequirementsB:39", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp multi2.cpp:1:InvalidRequirementB:52", + "location": { + "kind": "file", + "file": "multi2.cpp", + "line": 52, + "column": null + }, + "name": "multi2.cpp:1:InvalidRequirementB:52", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp multi2.cpp:1:MissingRequirementReferenceB:57", + "location": { + "kind": "file", + "file": "multi2.cpp", + "line": 57, + "column": null + }, + "name": "multi2.cpp:1:MissingRequirementReferenceB:57", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp multi1.cpp:1:URLRequirementA:22", + "location": { + "kind": "file", + "file": "multi1.cpp", + "line": 22, + "column": null + }, + "name": "multi1.cpp:1:URLRequirementA:22", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp multi1.cpp:1:URLRequirementsCommaSeparatedA:27", + "location": { + "kind": "file", + "file": "multi1.cpp", + "line": 27, + "column": null + }, + "name": "multi1.cpp:1:URLRequirementsCommaSeparatedA:27", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp multi1.cpp:1:URLRequirementsAsCommentsSpaceSeparatedA:33", + "location": { + "kind": "file", + "file": "multi1.cpp", + "line": 33, + "column": null + }, + "name": "multi1.cpp:1:URLRequirementsAsCommentsSpaceSeparatedA:33", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp multi1.cpp:1:MultipleURLRequirementsA:39", + "location": { + "kind": "file", + "file": "multi1.cpp", + "line": 39, + "column": null + }, + "name": "multi1.cpp:1:MultipleURLRequirementsA:39", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp multi1.cpp:1:InvalidRequirementA:52", + "location": { + "kind": "file", + "file": "multi1.cpp", + "line": 52, + "column": null + }, + "name": "multi1.cpp:1:InvalidRequirementA:52", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp multi1.cpp:1:MissingRequirementReferenceA:57", + "location": { + "kind": "file", + "file": "multi1.cpp", + "line": 57, + "column": null + }, + "name": "multi1.cpp:1:MissingRequirementReferenceA:57", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster-cpptest", + "version": 5 +} diff --git a/tests_system/lobster_cpptest/data/nested_directories_no_kind.yaml b/tests_system/lobster_cpptest/data/nested_directories_no_kind.yaml new file mode 100644 index 000000000..7504de4aa --- /dev/null +++ b/tests_system/lobster_cpptest/data/nested_directories_no_kind.yaml @@ -0,0 +1,2 @@ +output_file: "nested_directories_no_schema.lobster" +codebeamer_url: "https://codebeamer.com" diff --git a/tests_system/lobster_cpptest/data/nested_directories_no_schema.lobster b/tests_system/lobster_cpptest/data/nested_directories_no_schema.lobster new file mode 100644 index 000000000..a9865d31a --- /dev/null +++ b/tests_system/lobster_cpptest/data/nested_directories_no_schema.lobster @@ -0,0 +1,1496 @@ +{ + "data": [ + { + "tag": "cpp 1_reference.cpp:1:SingleReference:33", + "location": { + "kind": "file", + "file": "1_reference.cpp", + "line": 33, + "column": null + }, + "name": "1_reference.cpp:1:SingleReference:33", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816" + ] + }, + { + "tag": "cpp many_references.cpp:1:SingleReference:33", + "location": { + "kind": "file", + "file": "many_references.cpp", + "line": 33, + "column": null + }, + "name": "many_references.cpp:1:SingleReference:33", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816" + ] + }, + { + "tag": "cpp many_references.cpp:1:URLRequirement:37", + "location": { + "kind": "file", + "file": "many_references.cpp", + "line": 37, + "column": null + }, + "name": "many_references.cpp:1:URLRequirement:37", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0219" + ] + }, + { + "tag": "cpp many_references.cpp:1:URLRequirementsAsCommentsSpaceSeparated:49", + "location": { + "kind": "file", + "file": "many_references.cpp", + "line": 49, + "column": null + }, + "name": "many_references.cpp:1:URLRequirementsAsCommentsSpaceSeparated:49", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0304" + ] + }, + { + "tag": "cpp many_references.cpp:1:MixedRequirements:62", + "location": { + "kind": "file", + "file": "many_references.cpp", + "line": 62, + "column": null + }, + "name": "many_references.cpp:1:MixedRequirements:62", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0816" + ] + }, + { + "tag": "cpp car_test_cases.cpp:1:LaneKeepAssist:64", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 64, + "column": null + }, + "name": "car_test_cases.cpp:1:LaneKeepAssist:64", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815" + ] + }, + { + "tag": "cpp car_test_cases.cpp:1:BlindSpotMonitoring:67", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 67, + "column": null + }, + "name": "car_test_cases.cpp:1:BlindSpotMonitoring:67", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816" + ] + }, + { + "tag": "cpp car_test_cases.cpp:1:ParkingSensors:70", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 70, + "column": null + }, + "name": "car_test_cases.cpp:1:ParkingSensors:70", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816" + ] + }, + { + "tag": "cpp car_test_cases.cpp:1:TrafficSignRecognition:75", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 75, + "column": null + }, + "name": "car_test_cases.cpp:1:TrafficSignRecognition:75", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816", + "itm 0817", + "itm 0818", + "itm 0819", + "itm 0820" + ] + }, + { + "tag": "cpp car_test_cases.cpp:1:MultiZoneClimateControl:107", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 107, + "column": null + }, + "name": "car_test_cases.cpp:1:MultiZoneClimateControl:107", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0816" + ] + }, + { + "tag": "cpp test_case.cpp:1:Requirement:64", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 64, + "column": null + }, + "name": "test_case.cpp:1:Requirement:64", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815" + ] + }, + { + "tag": "cpp test_case.cpp:1:RequirementAsOneLineComments:67", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 67, + "column": null + }, + "name": "test_case.cpp:1:RequirementAsOneLineComments:67", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816" + ] + }, + { + "tag": "cpp test_case.cpp:1:RequirementAsComments:70", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 70, + "column": null + }, + "name": "test_case.cpp:1:RequirementAsComments:70", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816" + ] + }, + { + "tag": "cpp test_case.cpp:1:RequirementsAsMultipleComments:75", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 75, + "column": null + }, + "name": "test_case.cpp:1:RequirementsAsMultipleComments:75", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816", + "itm 0817", + "itm 0818", + "itm 0819", + "itm 0820" + ] + }, + { + "tag": "cpp test_case.cpp:1:MixedRequirements:107", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 107, + "column": null + }, + "name": "test_case.cpp:1:MixedRequirements:107", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0816" + ] + }, + { + "tag": "cpp test_case.cpp:1:MoreVersionsThanRequirements:193", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 193, + "column": null + }, + "name": "test_case.cpp:1:MoreVersionsThanRequirements:193", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815" + ] + }, + { + "tag": "cpp test_case.cpp:1:MoreRequirementsThanVersions:197", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 197, + "column": null + }, + "name": "test_case.cpp:1:MoreRequirementsThanVersions:197", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816" + ] + }, + { + "tag": "cpp test_case.cpp:1:VersionSpaceSeparated:201", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 201, + "column": null + }, + "name": "test_case.cpp:1:VersionSpaceSeparated:201", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req 123", + "req 456" + ] + }, + { + "tag": "cpp test_case.cpp:1:ImplementationMultipleLines:207", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 207, + "column": null + }, + "name": "test_case.cpp:1:ImplementationMultipleLines:207", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816" + ] + }, + { + "tag": "cpp 1_reference.cpp:1:TestTest:3", + "location": { + "kind": "file", + "file": "1_reference.cpp", + "line": 3, + "column": null + }, + "name": "1_reference.cpp:1:TestTest:3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp 1_reference.cpp:1:TestMultiLine:5", + "location": { + "kind": "file", + "file": "1_reference.cpp", + "line": 5, + "column": null + }, + "name": "1_reference.cpp:1:TestMultiLine:5", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp 1_reference.cpp:1:EmptyImplementation:10", + "location": { + "kind": "file", + "file": "1_reference.cpp", + "line": 10, + "column": null + }, + "name": "1_reference.cpp:1:EmptyImplementation:10", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp 1_reference.cpp:1:ImplementationMultipleLines:12", + "location": { + "kind": "file", + "file": "1_reference.cpp", + "line": 12, + "column": null + }, + "name": "1_reference.cpp:1:ImplementationMultipleLines:12", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp 1_reference.cpp:1:MultipleLinesWithComments:16", + "location": { + "kind": "file", + "file": "1_reference.cpp", + "line": 16, + "column": null + }, + "name": "1_reference.cpp:1:MultipleLinesWithComments:16", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp 1_reference.cpp:1:IAMCommented:28", + "location": { + "kind": "file", + "file": "1_reference.cpp", + "line": 28, + "column": null + }, + "name": "1_reference.cpp:1:IAMCommented:28", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp many_references.cpp:1:TestTest:3", + "location": { + "kind": "file", + "file": "many_references.cpp", + "line": 3, + "column": null + }, + "name": "many_references.cpp:1:TestTest:3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp many_references.cpp:1:TestMultiLine:5", + "location": { + "kind": "file", + "file": "many_references.cpp", + "line": 5, + "column": null + }, + "name": "many_references.cpp:1:TestMultiLine:5", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp many_references.cpp:1:EmptyImplementation:10", + "location": { + "kind": "file", + "file": "many_references.cpp", + "line": 10, + "column": null + }, + "name": "many_references.cpp:1:EmptyImplementation:10", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp many_references.cpp:1:ImplementationMultipleLines:12", + "location": { + "kind": "file", + "file": "many_references.cpp", + "line": 12, + "column": null + }, + "name": "many_references.cpp:1:ImplementationMultipleLines:12", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp many_references.cpp:1:MultipleLinesWithComments:16", + "location": { + "kind": "file", + "file": "many_references.cpp", + "line": 16, + "column": null + }, + "name": "many_references.cpp:1:MultipleLinesWithComments:16", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp many_references.cpp:1:IAMCommented:28", + "location": { + "kind": "file", + "file": "many_references.cpp", + "line": 28, + "column": null + }, + "name": "many_references.cpp:1:IAMCommented:28", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp many_references.cpp:1:URLRequirementsCommaSeparated:43", + "location": { + "kind": "file", + "file": "many_references.cpp", + "line": 43, + "column": null + }, + "name": "many_references.cpp:1:URLRequirementsCommaSeparated:43", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp many_references.cpp:1:MultipleURLRequirements:55", + "location": { + "kind": "file", + "file": "many_references.cpp", + "line": 55, + "column": null + }, + "name": "many_references.cpp:1:MultipleURLRequirements:55", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp many_references.cpp:1:InvalidRequirement:68", + "location": { + "kind": "file", + "file": "many_references.cpp", + "line": 68, + "column": null + }, + "name": "many_references.cpp:1:InvalidRequirement:68", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:LeatherSeats:3", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 3, + "column": null + }, + "name": "car_test_cases.cpp:1:LeatherSeats:3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:Sunroof:4", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 4, + "column": null + }, + "name": "car_test_cases.cpp:1:Sunroof:4", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:HeatedSteeringWheel:5", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 5, + "column": null + }, + "name": "car_test_cases.cpp:1:HeatedSteeringWheel:5", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:AdaptiveCruiseControl:6", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 6, + "column": null + }, + "name": "car_test_cases.cpp:1:AdaptiveCruiseControl:6", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:SurroundSoundSystem:7", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 7, + "column": null + }, + "name": "car_test_cases.cpp:1:SurroundSoundSystem:7", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:PanoramicRoof:8", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 8, + "column": null + }, + "name": "car_test_cases.cpp:1:PanoramicRoof:8", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:MassageSeats:9", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 9, + "column": null + }, + "name": "car_test_cases.cpp:1:MassageSeats:9", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:AmbientLighting:10", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 10, + "column": null + }, + "name": "car_test_cases.cpp:1:AmbientLighting:10", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:WirelessCharging:14", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 14, + "column": null + }, + "name": "car_test_cases.cpp:1:WirelessCharging:14", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:KeylessEntry:19", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 19, + "column": null + }, + "name": "car_test_cases.cpp:1:KeylessEntry:19", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:AutomaticParking:21", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 21, + "column": null + }, + "name": "car_test_cases.cpp:1:AutomaticParking:21", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:HeadsUpDisplay:25", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 25, + "column": null + }, + "name": "car_test_cases.cpp:1:HeadsUpDisplay:25", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:VentilatedSeats:34", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 34, + "column": null + }, + "name": "car_test_cases.cpp:1:VentilatedSeats:34", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:DigitalCockpit:37", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 37, + "column": null + }, + "name": "car_test_cases.cpp:1:DigitalCockpit:37", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:GestureControl:41", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 41, + "column": null + }, + "name": "car_test_cases.cpp:1:GestureControl:41", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:NightVision:45", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 45, + "column": null + }, + "name": "car_test_cases.cpp:1:NightVision:45", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:PremiumSoundSystem:50", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 50, + "column": null + }, + "name": "car_test_cases.cpp:1:PremiumSoundSystem:50", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:AutomaticClimateControl:55", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 55, + "column": null + }, + "name": "car_test_cases.cpp:1:AutomaticClimateControl:55", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:RearSeatEntertainment:58", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 58, + "column": null + }, + "name": "car_test_cases.cpp:1:RearSeatEntertainment:58", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:AutomaticEmergencyBraking:83", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 83, + "column": null + }, + "name": "car_test_cases.cpp:1:AutomaticEmergencyBraking:83", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:DriverAttentionMonitoring:88", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 88, + "column": null + }, + "name": "car_test_cases.cpp:1:DriverAttentionMonitoring:88", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:RemoteStart:94", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 94, + "column": null + }, + "name": "car_test_cases.cpp:1:RemoteStart:94", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:PowerTailgate:100", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 100, + "column": null + }, + "name": "car_test_cases.cpp:1:PowerTailgate:100", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:SoftCloseDoors:113", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 113, + "column": null + }, + "name": "car_test_cases.cpp:1:SoftCloseDoors:113", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:AcousticGlass:118", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 118, + "column": null + }, + "name": "car_test_cases.cpp:1:AcousticGlass:118", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp no_references.cpp:1:TestTest:3", + "location": { + "kind": "file", + "file": "no_references.cpp", + "line": 3, + "column": null + }, + "name": "no_references.cpp:1:TestTest:3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp no_references.cpp:1:TestMultiLine:5", + "location": { + "kind": "file", + "file": "no_references.cpp", + "line": 5, + "column": null + }, + "name": "no_references.cpp:1:TestMultiLine:5", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp no_references.cpp:1:EmptyImplementation:10", + "location": { + "kind": "file", + "file": "no_references.cpp", + "line": 10, + "column": null + }, + "name": "no_references.cpp:1:EmptyImplementation:10", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp no_references.cpp:1:ImplementationMultipleLines:12", + "location": { + "kind": "file", + "file": "no_references.cpp", + "line": 12, + "column": null + }, + "name": "no_references.cpp:1:ImplementationMultipleLines:12", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp no_references.cpp:1:MultipleLinesWithComments:16", + "location": { + "kind": "file", + "file": "no_references.cpp", + "line": 16, + "column": null + }, + "name": "no_references.cpp:1:MultipleLinesWithComments:16", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp no_references.cpp:1:IAMCommented:27", + "location": { + "kind": "file", + "file": "no_references.cpp", + "line": 27, + "column": null + }, + "name": "no_references.cpp:1:IAMCommented:27", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp test_case.cpp:1:TestPInstance:3", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 3, + "column": null + }, + "name": "test_case.cpp:1:TestPInstance:3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp test_case.cpp:1:TestTest:4", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 4, + "column": null + }, + "name": "test_case.cpp:1:TestTest:4", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp test_case.cpp:1:TestTestF:5", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 5, + "column": null + }, + "name": "test_case.cpp:1:TestTestF:5", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp test_case.cpp:1:TestTestP:6", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 6, + "column": null + }, + "name": "test_case.cpp:1:TestTestP:6", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp test_case.cpp:1:TestTypedTest:7", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 7, + "column": null + }, + "name": "test_case.cpp:1:TestTypedTest:7", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp test_case.cpp:1:TestTypedTestP:8", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 8, + "column": null + }, + "name": "test_case.cpp:1:TestTypedTestP:8", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp test_case.cpp:1:TestTypedTestSuite:9", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 9, + "column": null + }, + "name": "test_case.cpp:1:TestTypedTestSuite:9", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp test_case.cpp:1:TestFInstance:10", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 10, + "column": null + }, + "name": "test_case.cpp:1:TestFInstance:10", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp test_case.cpp:1:TestMultiLine:14", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 14, + "column": null + }, + "name": "test_case.cpp:1:TestMultiLine:14", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp test_case.cpp:1:EmptyImplementation:19", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 19, + "column": null + }, + "name": "test_case.cpp:1:EmptyImplementation:19", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp test_case.cpp:1:ImplementationMultipleLines:21", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 21, + "column": null + }, + "name": "test_case.cpp:1:ImplementationMultipleLines:21", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp test_case.cpp:1:MultipleLinesWithComments:25", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 25, + "column": null + }, + "name": "test_case.cpp:1:MultipleLinesWithComments:25", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp test_case.cpp:1:TestTagInOnline:34", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 34, + "column": null + }, + "name": "test_case.cpp:1:TestTagInOnline:34", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp test_case.cpp:1:TestTagPrecededByComment:37", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 37, + "column": null + }, + "name": "test_case.cpp:1:TestTagPrecededByComment:37", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp test_case.cpp:1:TestTagFollowedByComment:41", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 41, + "column": null + }, + "name": "test_case.cpp:1:TestTagFollowedByComment:41", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp test_case.cpp:1:TestTagWithCommentsAround:45", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 45, + "column": null + }, + "name": "test_case.cpp:1:TestTagWithCommentsAround:45", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp test_case.cpp:1:TestTagAsText:50", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 50, + "column": null + }, + "name": "test_case.cpp:1:TestTagAsText:50", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp test_case.cpp:1:BriefTagInOnline:55", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 55, + "column": null + }, + "name": "test_case.cpp:1:BriefTagInOnline:55", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp test_case.cpp:1:BriefTagMultipleLines:58", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 58, + "column": null + }, + "name": "test_case.cpp:1:BriefTagMultipleLines:58", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp test_case.cpp:1:URLRequirement:83", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 83, + "column": null + }, + "name": "test_case.cpp:1:URLRequirement:83", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp test_case.cpp:1:URLRequirementsCommaSeparated:88", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 88, + "column": null + }, + "name": "test_case.cpp:1:URLRequirementsCommaSeparated:88", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp test_case.cpp:1:URLRequirementsAsCommentsSpaceSeparated:94", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 94, + "column": null + }, + "name": "test_case.cpp:1:URLRequirementsAsCommentsSpaceSeparated:94", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp test_case.cpp:1:MultipleURLRequirements:100", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 100, + "column": null + }, + "name": "test_case.cpp:1:MultipleURLRequirements:100", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp test_case.cpp:1:InvalidRequirement:113", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 113, + "column": null + }, + "name": "test_case.cpp:1:InvalidRequirement:113", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp test_case.cpp:1:MissingRequirementReference:118", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 118, + "column": null + }, + "name": "test_case.cpp:1:MissingRequirementReference:118", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp test_case.cpp:1:RequiredByWithAt:125", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 125, + "column": null + }, + "name": "test_case.cpp:1:RequiredByWithAt:125", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp test_case.cpp:1:MultipleRequiredByCommaSeparated:130", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 130, + "column": null + }, + "name": "test_case.cpp:1:MultipleRequiredByCommaSeparated:130", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp test_case.cpp:1:MultipleRequiredByAsComments:135", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 135, + "column": null + }, + "name": "test_case.cpp:1:MultipleRequiredByAsComments:135", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp test_case.cpp:1:RequiredByWithNewLines:145", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 145, + "column": null + }, + "name": "test_case.cpp:1:RequiredByWithNewLines:145", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp test_case.cpp:1:TestMethod:160", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 160, + "column": null + }, + "name": "test_case.cpp:1:TestMethod:160", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp test_case.cpp:1:TestMethodAsCommentsSpaceSeparated:163", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 163, + "column": null + }, + "name": "test_case.cpp:1:TestMethodAsCommentsSpaceSeparated:163", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp test_case.cpp:1:TestMethodAsCommentsCommaSeparated:168", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 168, + "column": null + }, + "name": "test_case.cpp:1:TestMethodAsCommentsCommaSeparated:168", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp test_case.cpp:1:InvalidTestMethod:175", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 175, + "column": null + }, + "name": "test_case.cpp:1:InvalidTestMethod:175", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp test_case.cpp:1:MissingTestMethod:180", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 180, + "column": null + }, + "name": "test_case.cpp:1:MissingTestMethod:180", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp test_case.cpp:1:VersionTagTestInOnline:187", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 187, + "column": null + }, + "name": "test_case.cpp:1:VersionTagTestInOnline:187", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp test_case.cpp:1:MultipleVersionTagTestInOnline:190", + "location": { + "kind": "file", + "file": "test_case.cpp", + "line": 190, + "column": null + }, + "name": "test_case.cpp:1:MultipleVersionTagTestInOnline:190", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster-cpptest", + "version": 5 +} diff --git a/tests_system/lobster_cpptest/data/no_input_file_config_no_kind.yaml b/tests_system/lobster_cpptest/data/no_input_file_config_no_kind.yaml new file mode 100644 index 000000000..38ad7de81 --- /dev/null +++ b/tests_system/lobster_cpptest/data/no_input_file_config_no_kind.yaml @@ -0,0 +1,9 @@ +output: + no_input_file.lobster: + markers: + - "@requirement" + +files: + - 'no_input_file.cpp' + +codebeamer_url: "https://codebeamer.com" diff --git a/tests_system/lobster_cpptest/data/no_references_config_no_kind.yaml b/tests_system/lobster_cpptest/data/no_references_config_no_kind.yaml new file mode 100644 index 000000000..098ab057d --- /dev/null +++ b/tests_system/lobster_cpptest/data/no_references_config_no_kind.yaml @@ -0,0 +1,4 @@ +output_file: "no_references_no_schema.lobster" +files: + - 'no_references.cpp' +codebeamer_url: "https://codebeamer.com" diff --git a/tests_system/lobster_cpptest/data/no_references_no_schema.lobster b/tests_system/lobster_cpptest/data/no_references_no_schema.lobster new file mode 100644 index 000000000..4c55f6338 --- /dev/null +++ b/tests_system/lobster_cpptest/data/no_references_no_schema.lobster @@ -0,0 +1,90 @@ +{ + "data": [ + { + "tag": "cpp no_references.cpp:1:TestTest:3", + "location": { + "kind": "file", + "file": "no_references.cpp", + "line": 3, + "column": null + }, + "name": "no_references.cpp:1:TestTest:3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp no_references.cpp:1:TestMultiLine:5", + "location": { + "kind": "file", + "file": "no_references.cpp", + "line": 5, + "column": null + }, + "name": "no_references.cpp:1:TestMultiLine:5", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp no_references.cpp:1:EmptyImplementation:10", + "location": { + "kind": "file", + "file": "no_references.cpp", + "line": 10, + "column": null + }, + "name": "no_references.cpp:1:EmptyImplementation:10", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp no_references.cpp:1:ImplementationMultipleLines:12", + "location": { + "kind": "file", + "file": "no_references.cpp", + "line": 12, + "column": null + }, + "name": "no_references.cpp:1:ImplementationMultipleLines:12", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp no_references.cpp:1:MultipleLinesWithComments:16", + "location": { + "kind": "file", + "file": "no_references.cpp", + "line": 16, + "column": null + }, + "name": "no_references.cpp:1:MultipleLinesWithComments:16", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp no_references.cpp:1:IAMCommented:27", + "location": { + "kind": "file", + "file": "no_references.cpp", + "line": 27, + "column": null + }, + "name": "no_references.cpp:1:IAMCommented:27", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster-cpptest", + "version": 5 +} diff --git a/tests_system/lobster_cpptest/data/report_no_schema.lobster b/tests_system/lobster_cpptest/data/report_no_schema.lobster new file mode 100644 index 000000000..0782ca785 --- /dev/null +++ b/tests_system/lobster_cpptest/data/report_no_schema.lobster @@ -0,0 +1,108 @@ +{ + "data": [ + { + "tag": "cpp 1_reference.cpp:1:SingleReference:33", + "location": { + "kind": "file", + "file": "1_reference.cpp", + "line": 33, + "column": null + }, + "name": "1_reference.cpp:1:SingleReference:33", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816" + ] + }, + { + "tag": "cpp 1_reference.cpp:1:TestTest:3", + "location": { + "kind": "file", + "file": "1_reference.cpp", + "line": 3, + "column": null + }, + "name": "1_reference.cpp:1:TestTest:3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp 1_reference.cpp:1:TestMultiLine:5", + "location": { + "kind": "file", + "file": "1_reference.cpp", + "line": 5, + "column": null + }, + "name": "1_reference.cpp:1:TestMultiLine:5", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp 1_reference.cpp:1:EmptyImplementation:10", + "location": { + "kind": "file", + "file": "1_reference.cpp", + "line": 10, + "column": null + }, + "name": "1_reference.cpp:1:EmptyImplementation:10", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp 1_reference.cpp:1:ImplementationMultipleLines:12", + "location": { + "kind": "file", + "file": "1_reference.cpp", + "line": 12, + "column": null + }, + "name": "1_reference.cpp:1:ImplementationMultipleLines:12", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp 1_reference.cpp:1:MultipleLinesWithComments:16", + "location": { + "kind": "file", + "file": "1_reference.cpp", + "line": 16, + "column": null + }, + "name": "1_reference.cpp:1:MultipleLinesWithComments:16", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp 1_reference.cpp:1:IAMCommented:28", + "location": { + "kind": "file", + "file": "1_reference.cpp", + "line": 28, + "column": null + }, + "name": "1_reference.cpp:1:IAMCommented:28", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster-cpptest", + "version": 5 +} diff --git a/tests_system/lobster_cpptest/data/specific_directory_config_no_kind.yaml b/tests_system/lobster_cpptest/data/specific_directory_config_no_kind.yaml new file mode 100644 index 000000000..ccf463f2f --- /dev/null +++ b/tests_system/lobster_cpptest/data/specific_directory_config_no_kind.yaml @@ -0,0 +1,4 @@ +output_file: "specific_directory_no_schema.lobster" +files: + - cpp_test_files +codebeamer_url: "https://codebeamer.com" diff --git a/tests_system/lobster_cpptest/data/specific_directory_no_schema.lobster b/tests_system/lobster_cpptest/data/specific_directory_no_schema.lobster new file mode 100644 index 000000000..acf038503 --- /dev/null +++ b/tests_system/lobster_cpptest/data/specific_directory_no_schema.lobster @@ -0,0 +1,448 @@ +{ + "data": [ + { + "tag": "cpp car_test_cases.cpp:1:LaneKeepAssist:64", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 64, + "column": null + }, + "name": "car_test_cases.cpp:1:LaneKeepAssist:64", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815" + ] + }, + { + "tag": "cpp car_test_cases.cpp:1:BlindSpotMonitoring:67", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 67, + "column": null + }, + "name": "car_test_cases.cpp:1:BlindSpotMonitoring:67", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816" + ] + }, + { + "tag": "cpp car_test_cases.cpp:1:ParkingSensors:70", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 70, + "column": null + }, + "name": "car_test_cases.cpp:1:ParkingSensors:70", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816" + ] + }, + { + "tag": "cpp car_test_cases.cpp:1:TrafficSignRecognition:75", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 75, + "column": null + }, + "name": "car_test_cases.cpp:1:TrafficSignRecognition:75", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816", + "itm 0817", + "itm 0818", + "itm 0819", + "itm 0820" + ] + }, + { + "tag": "cpp car_test_cases.cpp:1:MultiZoneClimateControl:107", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 107, + "column": null + }, + "name": "car_test_cases.cpp:1:MultiZoneClimateControl:107", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0816" + ] + }, + { + "tag": "cpp car_test_cases.cpp:1:LeatherSeats:3", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 3, + "column": null + }, + "name": "car_test_cases.cpp:1:LeatherSeats:3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:Sunroof:4", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 4, + "column": null + }, + "name": "car_test_cases.cpp:1:Sunroof:4", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:HeatedSteeringWheel:5", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 5, + "column": null + }, + "name": "car_test_cases.cpp:1:HeatedSteeringWheel:5", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:AdaptiveCruiseControl:6", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 6, + "column": null + }, + "name": "car_test_cases.cpp:1:AdaptiveCruiseControl:6", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:SurroundSoundSystem:7", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 7, + "column": null + }, + "name": "car_test_cases.cpp:1:SurroundSoundSystem:7", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:PanoramicRoof:8", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 8, + "column": null + }, + "name": "car_test_cases.cpp:1:PanoramicRoof:8", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:MassageSeats:9", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 9, + "column": null + }, + "name": "car_test_cases.cpp:1:MassageSeats:9", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:AmbientLighting:10", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 10, + "column": null + }, + "name": "car_test_cases.cpp:1:AmbientLighting:10", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:WirelessCharging:14", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 14, + "column": null + }, + "name": "car_test_cases.cpp:1:WirelessCharging:14", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:KeylessEntry:19", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 19, + "column": null + }, + "name": "car_test_cases.cpp:1:KeylessEntry:19", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:AutomaticParking:21", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 21, + "column": null + }, + "name": "car_test_cases.cpp:1:AutomaticParking:21", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:HeadsUpDisplay:25", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 25, + "column": null + }, + "name": "car_test_cases.cpp:1:HeadsUpDisplay:25", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:VentilatedSeats:34", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 34, + "column": null + }, + "name": "car_test_cases.cpp:1:VentilatedSeats:34", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:DigitalCockpit:37", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 37, + "column": null + }, + "name": "car_test_cases.cpp:1:DigitalCockpit:37", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:GestureControl:41", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 41, + "column": null + }, + "name": "car_test_cases.cpp:1:GestureControl:41", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:NightVision:45", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 45, + "column": null + }, + "name": "car_test_cases.cpp:1:NightVision:45", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:PremiumSoundSystem:50", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 50, + "column": null + }, + "name": "car_test_cases.cpp:1:PremiumSoundSystem:50", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:AutomaticClimateControl:55", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 55, + "column": null + }, + "name": "car_test_cases.cpp:1:AutomaticClimateControl:55", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:RearSeatEntertainment:58", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 58, + "column": null + }, + "name": "car_test_cases.cpp:1:RearSeatEntertainment:58", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:AutomaticEmergencyBraking:83", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 83, + "column": null + }, + "name": "car_test_cases.cpp:1:AutomaticEmergencyBraking:83", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:DriverAttentionMonitoring:88", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 88, + "column": null + }, + "name": "car_test_cases.cpp:1:DriverAttentionMonitoring:88", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:RemoteStart:94", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 94, + "column": null + }, + "name": "car_test_cases.cpp:1:RemoteStart:94", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:PowerTailgate:100", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 100, + "column": null + }, + "name": "car_test_cases.cpp:1:PowerTailgate:100", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:SoftCloseDoors:113", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 113, + "column": null + }, + "name": "car_test_cases.cpp:1:SoftCloseDoors:113", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp car_test_cases.cpp:1:AcousticGlass:118", + "location": { + "kind": "file", + "file": "cpp_test_files/car_test_cases.cpp", + "line": 118, + "column": null + }, + "name": "car_test_cases.cpp:1:AcousticGlass:118", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster-cpptest", + "version": 5 +} diff --git a/tests_system/lobster_cpptest/data/valid_cpptest_flow_no_kind.yaml b/tests_system/lobster_cpptest/data/valid_cpptest_flow_no_kind.yaml new file mode 100644 index 000000000..db3275391 --- /dev/null +++ b/tests_system/lobster_cpptest/data/valid_cpptest_flow_no_kind.yaml @@ -0,0 +1,2 @@ +output_file: "report_no_schema.lobster" +codebeamer_url: "https://codebeamer.com" diff --git a/tests_system/lobster_cpptest/data/valid_extension_config_no_kind.yaml b/tests_system/lobster_cpptest/data/valid_extension_config_no_kind.yaml new file mode 100644 index 000000000..1105a14a2 --- /dev/null +++ b/tests_system/lobster_cpptest/data/valid_extension_config_no_kind.yaml @@ -0,0 +1,4 @@ +output_file: "valid_extension_no_schema.lobster" +files: + - 'valid_extension.cpp' +codebeamer_url: "https://codebeamer.com" diff --git a/tests_system/lobster_cpptest/data/valid_extension_no_schema.lobster b/tests_system/lobster_cpptest/data/valid_extension_no_schema.lobster new file mode 100644 index 000000000..de881d307 --- /dev/null +++ b/tests_system/lobster_cpptest/data/valid_extension_no_schema.lobster @@ -0,0 +1,606 @@ +{ + "data": [ + { + "tag": "cpp valid_extension.cpp:1:Requirement:64", + "location": { + "kind": "file", + "file": "valid_extension.cpp", + "line": 64, + "column": null + }, + "name": "valid_extension.cpp:1:Requirement:64", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815" + ] + }, + { + "tag": "cpp valid_extension.cpp:1:RequirementAsOneLineComments:67", + "location": { + "kind": "file", + "file": "valid_extension.cpp", + "line": 67, + "column": null + }, + "name": "valid_extension.cpp:1:RequirementAsOneLineComments:67", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816" + ] + }, + { + "tag": "cpp valid_extension.cpp:1:RequirementAsComments:70", + "location": { + "kind": "file", + "file": "valid_extension.cpp", + "line": 70, + "column": null + }, + "name": "valid_extension.cpp:1:RequirementAsComments:70", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816" + ] + }, + { + "tag": "cpp valid_extension.cpp:1:RequirementsAsMultipleComments:75", + "location": { + "kind": "file", + "file": "valid_extension.cpp", + "line": 75, + "column": null + }, + "name": "valid_extension.cpp:1:RequirementsAsMultipleComments:75", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816", + "itm 0817", + "itm 0818", + "itm 0819", + "itm 0820" + ] + }, + { + "tag": "cpp valid_extension.cpp:1:MixedRequirements:107", + "location": { + "kind": "file", + "file": "valid_extension.cpp", + "line": 107, + "column": null + }, + "name": "valid_extension.cpp:1:MixedRequirements:107", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0816" + ] + }, + { + "tag": "cpp valid_extension.cpp:1:ImplementationMultipleLines:187", + "location": { + "kind": "file", + "file": "valid_extension.cpp", + "line": 187, + "column": null + }, + "name": "valid_extension.cpp:1:ImplementationMultipleLines:187", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816" + ] + }, + { + "tag": "cpp valid_extension.cpp:1:TestPInstance:3", + "location": { + "kind": "file", + "file": "valid_extension.cpp", + "line": 3, + "column": null + }, + "name": "valid_extension.cpp:1:TestPInstance:3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp valid_extension.cpp:1:TestTest:4", + "location": { + "kind": "file", + "file": "valid_extension.cpp", + "line": 4, + "column": null + }, + "name": "valid_extension.cpp:1:TestTest:4", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp valid_extension.cpp:1:TestTestF:5", + "location": { + "kind": "file", + "file": "valid_extension.cpp", + "line": 5, + "column": null + }, + "name": "valid_extension.cpp:1:TestTestF:5", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp valid_extension.cpp:1:TestTestP:6", + "location": { + "kind": "file", + "file": "valid_extension.cpp", + "line": 6, + "column": null + }, + "name": "valid_extension.cpp:1:TestTestP:6", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp valid_extension.cpp:1:TestTypedTest:7", + "location": { + "kind": "file", + "file": "valid_extension.cpp", + "line": 7, + "column": null + }, + "name": "valid_extension.cpp:1:TestTypedTest:7", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp valid_extension.cpp:1:TestTypedTestP:8", + "location": { + "kind": "file", + "file": "valid_extension.cpp", + "line": 8, + "column": null + }, + "name": "valid_extension.cpp:1:TestTypedTestP:8", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp valid_extension.cpp:1:TestTypedTestSuite:9", + "location": { + "kind": "file", + "file": "valid_extension.cpp", + "line": 9, + "column": null + }, + "name": "valid_extension.cpp:1:TestTypedTestSuite:9", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp valid_extension.cpp:1:TestFInstance:10", + "location": { + "kind": "file", + "file": "valid_extension.cpp", + "line": 10, + "column": null + }, + "name": "valid_extension.cpp:1:TestFInstance:10", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp valid_extension.cpp:1:TestMultiLine:14", + "location": { + "kind": "file", + "file": "valid_extension.cpp", + "line": 14, + "column": null + }, + "name": "valid_extension.cpp:1:TestMultiLine:14", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp valid_extension.cpp:1:EmptyImplementation:19", + "location": { + "kind": "file", + "file": "valid_extension.cpp", + "line": 19, + "column": null + }, + "name": "valid_extension.cpp:1:EmptyImplementation:19", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp valid_extension.cpp:1:ImplementationMultipleLines:21", + "location": { + "kind": "file", + "file": "valid_extension.cpp", + "line": 21, + "column": null + }, + "name": "valid_extension.cpp:1:ImplementationMultipleLines:21", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp valid_extension.cpp:1:MultipleLinesWithComments:25", + "location": { + "kind": "file", + "file": "valid_extension.cpp", + "line": 25, + "column": null + }, + "name": "valid_extension.cpp:1:MultipleLinesWithComments:25", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp valid_extension.cpp:1:TestTagInOnline:34", + "location": { + "kind": "file", + "file": "valid_extension.cpp", + "line": 34, + "column": null + }, + "name": "valid_extension.cpp:1:TestTagInOnline:34", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp valid_extension.cpp:1:TestTagPrecededByComment:37", + "location": { + "kind": "file", + "file": "valid_extension.cpp", + "line": 37, + "column": null + }, + "name": "valid_extension.cpp:1:TestTagPrecededByComment:37", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp valid_extension.cpp:1:TestTagFollowedByComment:41", + "location": { + "kind": "file", + "file": "valid_extension.cpp", + "line": 41, + "column": null + }, + "name": "valid_extension.cpp:1:TestTagFollowedByComment:41", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp valid_extension.cpp:1:TestTagWithCommentsAround:45", + "location": { + "kind": "file", + "file": "valid_extension.cpp", + "line": 45, + "column": null + }, + "name": "valid_extension.cpp:1:TestTagWithCommentsAround:45", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp valid_extension.cpp:1:TestTagAsText:50", + "location": { + "kind": "file", + "file": "valid_extension.cpp", + "line": 50, + "column": null + }, + "name": "valid_extension.cpp:1:TestTagAsText:50", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp valid_extension.cpp:1:BriefTagInOnline:55", + "location": { + "kind": "file", + "file": "valid_extension.cpp", + "line": 55, + "column": null + }, + "name": "valid_extension.cpp:1:BriefTagInOnline:55", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp valid_extension.cpp:1:BriefTagMultipleLines:58", + "location": { + "kind": "file", + "file": "valid_extension.cpp", + "line": 58, + "column": null + }, + "name": "valid_extension.cpp:1:BriefTagMultipleLines:58", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp valid_extension.cpp:1:URLRequirement:83", + "location": { + "kind": "file", + "file": "valid_extension.cpp", + "line": 83, + "column": null + }, + "name": "valid_extension.cpp:1:URLRequirement:83", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp valid_extension.cpp:1:URLRequirementsCommaSeparated:88", + "location": { + "kind": "file", + "file": "valid_extension.cpp", + "line": 88, + "column": null + }, + "name": "valid_extension.cpp:1:URLRequirementsCommaSeparated:88", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp valid_extension.cpp:1:URLRequirementsAsCommentsSpaceSeparated:94", + "location": { + "kind": "file", + "file": "valid_extension.cpp", + "line": 94, + "column": null + }, + "name": "valid_extension.cpp:1:URLRequirementsAsCommentsSpaceSeparated:94", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp valid_extension.cpp:1:MultipleURLRequirements:100", + "location": { + "kind": "file", + "file": "valid_extension.cpp", + "line": 100, + "column": null + }, + "name": "valid_extension.cpp:1:MultipleURLRequirements:100", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp valid_extension.cpp:1:InvalidRequirement:113", + "location": { + "kind": "file", + "file": "valid_extension.cpp", + "line": 113, + "column": null + }, + "name": "valid_extension.cpp:1:InvalidRequirement:113", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp valid_extension.cpp:1:MissingRequirementReference:118", + "location": { + "kind": "file", + "file": "valid_extension.cpp", + "line": 118, + "column": null + }, + "name": "valid_extension.cpp:1:MissingRequirementReference:118", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp valid_extension.cpp:1:RequiredByWithAt:125", + "location": { + "kind": "file", + "file": "valid_extension.cpp", + "line": 125, + "column": null + }, + "name": "valid_extension.cpp:1:RequiredByWithAt:125", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp valid_extension.cpp:1:MultipleRequiredByCommaSeparated:130", + "location": { + "kind": "file", + "file": "valid_extension.cpp", + "line": 130, + "column": null + }, + "name": "valid_extension.cpp:1:MultipleRequiredByCommaSeparated:130", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp valid_extension.cpp:1:MultipleRequiredByAsComments:135", + "location": { + "kind": "file", + "file": "valid_extension.cpp", + "line": 135, + "column": null + }, + "name": "valid_extension.cpp:1:MultipleRequiredByAsComments:135", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp valid_extension.cpp:1:RequiredByWithNewLines:145", + "location": { + "kind": "file", + "file": "valid_extension.cpp", + "line": 145, + "column": null + }, + "name": "valid_extension.cpp:1:RequiredByWithNewLines:145", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp valid_extension.cpp:1:TestMethod:160", + "location": { + "kind": "file", + "file": "valid_extension.cpp", + "line": 160, + "column": null + }, + "name": "valid_extension.cpp:1:TestMethod:160", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp valid_extension.cpp:1:TestMethodAsCommentsSpaceSeparated:163", + "location": { + "kind": "file", + "file": "valid_extension.cpp", + "line": 163, + "column": null + }, + "name": "valid_extension.cpp:1:TestMethodAsCommentsSpaceSeparated:163", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp valid_extension.cpp:1:TestMethodAsCommentsCommaSeparated:168", + "location": { + "kind": "file", + "file": "valid_extension.cpp", + "line": 168, + "column": null + }, + "name": "valid_extension.cpp:1:TestMethodAsCommentsCommaSeparated:168", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp valid_extension.cpp:1:InvalidTestMethod:175", + "location": { + "kind": "file", + "file": "valid_extension.cpp", + "line": 175, + "column": null + }, + "name": "valid_extension.cpp:1:InvalidTestMethod:175", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp valid_extension.cpp:1:MissingTestMethod:180", + "location": { + "kind": "file", + "file": "valid_extension.cpp", + "line": 180, + "column": null + }, + "name": "valid_extension.cpp:1:MissingTestMethod:180", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp valid_extension.cpp:1:SingleComment:205", + "location": { + "kind": "file", + "file": "valid_extension.cpp", + "line": 205, + "column": null + }, + "name": "valid_extension.cpp:1:SingleComment:205", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster-cpptest", + "version": 5 +} diff --git a/tests_system/lobster_cpptest/data/valid_invalid_files_config_no_kind.yaml b/tests_system/lobster_cpptest/data/valid_invalid_files_config_no_kind.yaml new file mode 100644 index 000000000..42541596a --- /dev/null +++ b/tests_system/lobster_cpptest/data/valid_invalid_files_config_no_kind.yaml @@ -0,0 +1,3 @@ +output_file: "valid_invalid_files_no_schema.lobster" + +codebeamer_url: "https://codebeamer.com" diff --git a/tests_system/lobster_cpptest/data/valid_invalid_files_no_schema.lobster b/tests_system/lobster_cpptest/data/valid_invalid_files_no_schema.lobster new file mode 100644 index 000000000..d04394715 --- /dev/null +++ b/tests_system/lobster_cpptest/data/valid_invalid_files_no_schema.lobster @@ -0,0 +1,534 @@ +{ + "data": [ + { + "tag": "cpp multi2.cpp:1:RequirementB:3", + "location": { + "kind": "file", + "file": "multi2.cpp", + "line": 3, + "column": null + }, + "name": "multi2.cpp:1:RequirementB:3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815" + ] + }, + { + "tag": "cpp multi2.cpp:1:RequirementAsOneLineCommentsB:6", + "location": { + "kind": "file", + "file": "multi2.cpp", + "line": 6, + "column": null + }, + "name": "multi2.cpp:1:RequirementAsOneLineCommentsB:6", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816" + ] + }, + { + "tag": "cpp multi2.cpp:1:RequirementAsCommentsB:9", + "location": { + "kind": "file", + "file": "multi2.cpp", + "line": 9, + "column": null + }, + "name": "multi2.cpp:1:RequirementAsCommentsB:9", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816" + ] + }, + { + "tag": "cpp multi2.cpp:1:RequirementsAsMultipleCommentsB:14", + "location": { + "kind": "file", + "file": "multi2.cpp", + "line": 14, + "column": null + }, + "name": "multi2.cpp:1:RequirementsAsMultipleCommentsB:14", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816", + "itm 0817", + "itm 0818", + "itm 0819", + "itm 0820" + ] + }, + { + "tag": "cpp multi2.cpp:1:MixedRequirementsB:46", + "location": { + "kind": "file", + "file": "multi2.cpp", + "line": 46, + "column": null + }, + "name": "multi2.cpp:1:MixedRequirementsB:46", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0816" + ] + }, + { + "tag": "cpp multi3.cpp:1:RequirementC:3", + "location": { + "kind": "file", + "file": "multi3.cpp", + "line": 3, + "column": null + }, + "name": "multi3.cpp:1:RequirementC:3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815" + ] + }, + { + "tag": "cpp multi3.cpp:1:RequirementAsOneLineCommentsC:6", + "location": { + "kind": "file", + "file": "multi3.cpp", + "line": 6, + "column": null + }, + "name": "multi3.cpp:1:RequirementAsOneLineCommentsC:6", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816" + ] + }, + { + "tag": "cpp multi3.cpp:1:RequirementAsCommentsC:9", + "location": { + "kind": "file", + "file": "multi3.cpp", + "line": 9, + "column": null + }, + "name": "multi3.cpp:1:RequirementAsCommentsC:9", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816" + ] + }, + { + "tag": "cpp multi3.cpp:1:RequirementsAsMultipleCommentsC:14", + "location": { + "kind": "file", + "file": "multi3.cpp", + "line": 14, + "column": null + }, + "name": "multi3.cpp:1:RequirementsAsMultipleCommentsC:14", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816", + "itm 0817", + "itm 0818", + "itm 0819", + "itm 0820" + ] + }, + { + "tag": "cpp multi3.cpp:1:MixedRequirementsC:46", + "location": { + "kind": "file", + "file": "multi3.cpp", + "line": 46, + "column": null + }, + "name": "multi3.cpp:1:MixedRequirementsC:46", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0816" + ] + }, + { + "tag": "cpp multi1.cpp:1:RequirementA:3", + "location": { + "kind": "file", + "file": "multi1.cpp", + "line": 3, + "column": null + }, + "name": "multi1.cpp:1:RequirementA:3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815" + ] + }, + { + "tag": "cpp multi1.cpp:1:RequirementAsOneLineCommentsA:6", + "location": { + "kind": "file", + "file": "multi1.cpp", + "line": 6, + "column": null + }, + "name": "multi1.cpp:1:RequirementAsOneLineCommentsA:6", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816" + ] + }, + { + "tag": "cpp multi1.cpp:1:RequirementAsCommentsA:9", + "location": { + "kind": "file", + "file": "multi1.cpp", + "line": 9, + "column": null + }, + "name": "multi1.cpp:1:RequirementAsCommentsA:9", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816" + ] + }, + { + "tag": "cpp multi1.cpp:1:RequirementsAsMultipleCommentsA:14", + "location": { + "kind": "file", + "file": "multi1.cpp", + "line": 14, + "column": null + }, + "name": "multi1.cpp:1:RequirementsAsMultipleCommentsA:14", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0815", + "itm 0816", + "itm 0817", + "itm 0818", + "itm 0819", + "itm 0820" + ] + }, + { + "tag": "cpp multi1.cpp:1:MixedRequirementsA:46", + "location": { + "kind": "file", + "file": "multi1.cpp", + "line": 46, + "column": null + }, + "name": "multi1.cpp:1:MixedRequirementsA:46", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm 0816" + ] + }, + { + "tag": "cpp multi2.cpp:1:URLRequirementB:22", + "location": { + "kind": "file", + "file": "multi2.cpp", + "line": 22, + "column": null + }, + "name": "multi2.cpp:1:URLRequirementB:22", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp multi2.cpp:1:URLRequirementsCommaSeparatedB:27", + "location": { + "kind": "file", + "file": "multi2.cpp", + "line": 27, + "column": null + }, + "name": "multi2.cpp:1:URLRequirementsCommaSeparatedB:27", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp multi2.cpp:1:URLRequirementsAsCommentsSpaceSeparatedB:33", + "location": { + "kind": "file", + "file": "multi2.cpp", + "line": 33, + "column": null + }, + "name": "multi2.cpp:1:URLRequirementsAsCommentsSpaceSeparatedB:33", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp multi2.cpp:1:MultipleURLRequirementsB:39", + "location": { + "kind": "file", + "file": "multi2.cpp", + "line": 39, + "column": null + }, + "name": "multi2.cpp:1:MultipleURLRequirementsB:39", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp multi2.cpp:1:InvalidRequirementB:52", + "location": { + "kind": "file", + "file": "multi2.cpp", + "line": 52, + "column": null + }, + "name": "multi2.cpp:1:InvalidRequirementB:52", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp multi2.cpp:1:MissingRequirementReferenceB:57", + "location": { + "kind": "file", + "file": "multi2.cpp", + "line": 57, + "column": null + }, + "name": "multi2.cpp:1:MissingRequirementReferenceB:57", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp multi3.cpp:1:URLRequirementC:22", + "location": { + "kind": "file", + "file": "multi3.cpp", + "line": 22, + "column": null + }, + "name": "multi3.cpp:1:URLRequirementC:22", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp multi3.cpp:1:URLRequirementsCommaSeparatedC:27", + "location": { + "kind": "file", + "file": "multi3.cpp", + "line": 27, + "column": null + }, + "name": "multi3.cpp:1:URLRequirementsCommaSeparatedC:27", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp multi3.cpp:1:URLRequirementsAsCommentsSpaceSeparatedC:33", + "location": { + "kind": "file", + "file": "multi3.cpp", + "line": 33, + "column": null + }, + "name": "multi3.cpp:1:URLRequirementsAsCommentsSpaceSeparatedC:33", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp multi3.cpp:1:MultipleURLRequirementsC:39", + "location": { + "kind": "file", + "file": "multi3.cpp", + "line": 39, + "column": null + }, + "name": "multi3.cpp:1:MultipleURLRequirementsC:39", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp multi3.cpp:1:InvalidRequirementC:52", + "location": { + "kind": "file", + "file": "multi3.cpp", + "line": 52, + "column": null + }, + "name": "multi3.cpp:1:InvalidRequirementC:52", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp multi3.cpp:1:MissingRequirementReferenceC:57", + "location": { + "kind": "file", + "file": "multi3.cpp", + "line": 57, + "column": null + }, + "name": "multi3.cpp:1:MissingRequirementReferenceC:57", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp multi1.cpp:1:URLRequirementA:22", + "location": { + "kind": "file", + "file": "multi1.cpp", + "line": 22, + "column": null + }, + "name": "multi1.cpp:1:URLRequirementA:22", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp multi1.cpp:1:URLRequirementsCommaSeparatedA:27", + "location": { + "kind": "file", + "file": "multi1.cpp", + "line": 27, + "column": null + }, + "name": "multi1.cpp:1:URLRequirementsCommaSeparatedA:27", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp multi1.cpp:1:URLRequirementsAsCommentsSpaceSeparatedA:33", + "location": { + "kind": "file", + "file": "multi1.cpp", + "line": 33, + "column": null + }, + "name": "multi1.cpp:1:URLRequirementsAsCommentsSpaceSeparatedA:33", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp multi1.cpp:1:MultipleURLRequirementsA:39", + "location": { + "kind": "file", + "file": "multi1.cpp", + "line": 39, + "column": null + }, + "name": "multi1.cpp:1:MultipleURLRequirementsA:39", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp multi1.cpp:1:InvalidRequirementA:52", + "location": { + "kind": "file", + "file": "multi1.cpp", + "line": 52, + "column": null + }, + "name": "multi1.cpp:1:InvalidRequirementA:52", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "cpp multi1.cpp:1:MissingRequirementReferenceA:57", + "location": { + "kind": "file", + "file": "multi1.cpp", + "line": 57, + "column": null + }, + "name": "multi1.cpp:1:MissingRequirementReferenceA:57", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster-cpptest", + "version": 5 +} diff --git a/tests_system/lobster_cpptest/lobster_cpptest_asserter.py b/tests_system/lobster_cpptest/lobster_cpptest_asserter.py index 9ed37f361..561fdd886 100644 --- a/tests_system/lobster_cpptest/lobster_cpptest_asserter.py +++ b/tests_system/lobster_cpptest/lobster_cpptest_asserter.py @@ -12,3 +12,16 @@ def assertStdOutNumAndFile(self, num_items: int, out_file: str): self.assertStdOutText( f"Written {num_items} lobster items to \"{out_file}\".\n" ) + + def assertStdOutNumAndFileDeprecated( + self, + num_items: int, + out_file: str, + schema: str, + version: int): + self.assertStdOutText( + f"Lobster file version {version} " + f"containing 'schema' = '{schema}' is deprecated, " + f"please migrate to version 5\n" + f"Written {num_items} lobster items to \"{out_file}\".\n" + ) diff --git a/tests_system/lobster_cpptest/test_directories.py b/tests_system/lobster_cpptest/test_directories.py index 5a6b11e52..1459f875a 100644 --- a/tests_system/lobster_cpptest/test_directories.py +++ b/tests_system/lobster_cpptest/test_directories.py @@ -49,6 +49,46 @@ def test_all_files_from_current_directory_consumed(self): self._test_runner.working_dir ) + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutNumAndFileDeprecated(101, OUT_FILE, "lobster-act-trace", 3) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_all_files_from_current_directory_consumed_no_schema(self): + """ + Tests that all C++ files in the current directory are consumed. + It also picks files from nested directories. + """ + # lobster-trace: UseCases.Incorrect_Number_of_Cpp_Tests_in_Output + OUT_FILE = "nested_directories_no_schema.lobster" + + self._test_runner.declare_input_file(self._data_directory / "no_references.cpp") + self._test_runner.declare_input_file( + self._data_directory / "many_references.cpp") + self._test_runner.declare_input_file(self._data_directory / "1_reference.cpp") + self._test_runner.declare_input_file(self._data_directory / "test_case.cpp") + + # Copy the "cpp_test_files" directory into the working directory + source_dir = Path(self._data_directory / "cpp_test_files") + dest_dir = Path(self._test_runner.working_dir / "cpp_test_files") + shutil.copytree(source_dir, dest_dir) + + self.output_dir = Path(Path(__file__).parents[0]) + self.output_dir = self.create_output_directory_and_copy_expected( + self.output_dir, Path(self._data_directory / OUT_FILE)) + + self._test_runner.declare_output_file(self.output_dir / + OUT_FILE) + self._test_runner.cmd_args.config = str( + self._data_directory / "nested_directories_no_kind.yaml") + + update_cpptest_output_file( + self.output_dir / OUT_FILE, + self._test_runner.working_dir + ) + completed_process = self._test_runner.run_tool_test() asserter = Asserter(self, completed_process, self._test_runner) asserter.assertNoStdErrText() @@ -82,6 +122,39 @@ def test_files_from_specified_directory_consumed(self): self._test_runner.working_dir ) + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutNumAndFileDeprecated(30, OUT_FILE, "lobster-act-trace", 3) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_files_from_specified_directory_consumed_no_schema(self): + """ + Test for processing files from a specific directory. + """ + # lobster-trace: UseCases.Incorrect_Number_of_Cpp_Tests_in_Output + OUT_FILE = "specific_directory_no_schema.lobster" + + # Copy the "cpp_test_files" directory into the working directory + source_dir = Path(self._data_directory / "cpp_test_files") + dest_dir = Path(self._test_runner.working_dir / "cpp_test_files") + shutil.copytree(source_dir, dest_dir) + + self.output_dir = Path(Path(__file__).parents[0]) + self.output_dir = self.create_output_directory_and_copy_expected( + self.output_dir, Path(self._data_directory / OUT_FILE)) + + self._test_runner.declare_output_file(self.output_dir / + OUT_FILE) + self._test_runner.cmd_args.config = str( + self._data_directory / "specific_directory_config_no_kind.yaml") + + update_cpptest_output_file( + self.output_dir / OUT_FILE, + self._test_runner.working_dir + ) + completed_process = self._test_runner.run_tool_test() asserter = Asserter(self, completed_process, self._test_runner) asserter.assertNoStdErrText() @@ -119,6 +192,43 @@ def test_specified_directory_and_files_consumed(self): self._test_runner.working_dir ) + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutNumAndFileDeprecated(43, OUT_FILE, "lobster-act-trace", 3) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_specified_directory_and_files_consumed_no_schema(self): + """ + Test for processing files from a specific directory + as well as files provided as input. + """ + # lobster-trace: UseCases.Incorrect_Number_of_Cpp_Tests_in_Output + OUT_FILE = "directory_files_no_schema.lobster" + + self._test_runner.declare_input_file(self._data_directory / "no_references.cpp") + self._test_runner.declare_input_file(self._data_directory / "1_reference.cpp") + + # Copy the "cpp_test_files" directory into the working directory + source_dir = Path(self._data_directory / "cpp_test_files") + dest_dir = Path(self._test_runner.working_dir / "cpp_test_files") + shutil.copytree(source_dir, dest_dir) + + self.output_dir = Path(Path(__file__).parents[0]) + self.output_dir = self.create_output_directory_and_copy_expected( + self.output_dir, Path(self._data_directory / OUT_FILE)) + + self._test_runner.declare_output_file(self.output_dir / + OUT_FILE) + self._test_runner.cmd_args.config = str( + self._data_directory / "directory_files_config_no_kind.yaml") + + update_cpptest_output_file( + self.output_dir / OUT_FILE, + self._test_runner.working_dir + ) + completed_process = self._test_runner.run_tool_test() asserter = Asserter(self, completed_process, self._test_runner) asserter.assertNoStdErrText() @@ -143,6 +253,23 @@ def test_no_cpptest_file(self): 'lobster-cpptest: "[\'.\']" does not contain any test file.\n') asserter.assertExitCode(1) + def test_no_cpptest_file_no_schema(self): + """ + Test case for handling the scenario where no .cpp test files are found. + No input file provided in YAML config file or in working directory. + """ + OUT_FILE = "no_cpptest_file_no_schema.lobster" + + self._test_runner.declare_output_file(self._data_directory / OUT_FILE) + self._test_runner.cmd_args.config = str( + self._data_directory / "cpptest-config_no_kind.yaml") + + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertStdErrText( + 'lobster-cpptest: "[\'.\']" does not contain any test file.\n') + asserter.assertExitCode(1) + if __name__ == "__main__": unittest.main() diff --git a/tests_system/lobster_cpptest/test_extension.py b/tests_system/lobster_cpptest/test_extension.py index 491da7f59..4edb081ec 100644 --- a/tests_system/lobster_cpptest/test_extension.py +++ b/tests_system/lobster_cpptest/test_extension.py @@ -38,6 +38,35 @@ def test_valid_extension_file(self): self._test_runner.working_dir ) + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutNumAndFileDeprecated(41, OUT_FILE, "lobster-act-trace", 3) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_valid_extension_file_no_schema(self): + """ + Test checks that the C++ files with valid extensions are processed correctly. + """ + # lobster-trace: UseCases.Incorrect_Number_of_Cpp_Tests_in_Output + # lobster-trace: UseCases.Incorrect_number_of_requirement_references_in_Output + self._test_runner.cmd_args.config = str( + self._data_directory / "valid_extension_config_no_kind.yaml") + self._test_runner.declare_input_file( + self._data_directory / "valid_extension.cpp" + ) + OUT_FILE = "valid_extension_no_schema.lobster" + self.output_dir = self.create_output_directory_and_copy_expected( + self.output_dir, Path(self._data_directory / OUT_FILE)) + self._test_runner.declare_output_file(self.output_dir / + OUT_FILE) + + update_cpptest_output_file( + self.output_dir / OUT_FILE, + self._test_runner.working_dir + ) + completed_process = self._test_runner.run_tool_test() asserter = Asserter(self, completed_process, self._test_runner) asserter.assertNoStdErrText() @@ -68,6 +97,35 @@ def test_invalid_extension_file(self): self._test_runner.working_dir ) + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutNumAndFileDeprecated(40, OUT_FILE, "lobster-act-trace", 3) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_invalid_extension_file_no_schema(self): + """ + Test processing of C++ files with invalid extensions but valid data. + Hence, the tool should still be able to process the files correctly. + """ + # lobster-trace: UseCases.Incorrect_Number_of_Cpp_Tests_in_Output + self._test_runner.cmd_args.config = str( + self._data_directory / "invalid_extension_config_no_kind.yaml") + self._test_runner.declare_input_file( + self._data_directory / "invalid_extension.xyz" + ) + OUT_FILE = "invalid_extension_no_schema.lobster" + self.output_dir = self.create_output_directory_and_copy_expected( + self.output_dir, Path(self._data_directory / OUT_FILE)) + self._test_runner.declare_output_file(self.output_dir / + OUT_FILE) + + update_cpptest_output_file( + self.output_dir / OUT_FILE, + self._test_runner.working_dir + ) + completed_process = self._test_runner.run_tool_test() asserter = Asserter(self, completed_process, self._test_runner) asserter.assertNoStdErrText() @@ -90,6 +148,21 @@ def test_no_input_file(self): ) asserter.assertExitCode(1) + def test_no_input_file_no_kind(self): + """ + Test processing of C++ files with no input files. + Input file provided in YAML config file does not exist. + """ + self._test_runner.cmd_args.config = str( + self._data_directory / "no_input_file_config_no_kind.yaml") + + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertStdErrText( + 'lobster-cpptest: "no_input_file.cpp" is not a file or directory.\n' + ) + asserter.assertExitCode(1) + if __name__ == "__main__": unittest.main() diff --git a/tests_system/lobster_cpptest/test_multiple_files.py b/tests_system/lobster_cpptest/test_multiple_files.py index 106e44637..7e5677f8a 100644 --- a/tests_system/lobster_cpptest/test_multiple_files.py +++ b/tests_system/lobster_cpptest/test_multiple_files.py @@ -42,6 +42,40 @@ def test_multiple_files(self): self._test_runner.working_dir ) + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutNumAndFileDeprecated(22, OUT_FILE, "lobster-act-trace", 3) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_multiple_files_no_schema(self): + """ + Test case for processing multiple input files. + Ensures the tool runs on files specified in the yaml config file and + generates expected output. + """ + # lobster-trace: UseCases.Incorrect_Number_of_Cpp_Tests_in_Output + # lobster-trace: UseCases.Incorrect_number_of_requirement_references_in_Output + OUT_FILE = "multiple_files_no_schema.lobster" + self._test_runner.cmd_args.config = str( + self._data_directory / "multiple_files_config_no_kind.yaml") + self._test_runner.declare_input_file(self._data_directory / "multi1.cpp") + self._test_runner.declare_input_file(self._data_directory / "multi2.cpp") + self._test_runner.declare_input_file(self._data_directory / "multi3.cpp") + self._test_runner.declare_input_file(self._data_directory / "multi4.cpp") + self._test_runner.declare_input_file(self._data_directory / "multi5.cpp") + + self.output_dir = self.create_output_directory_and_copy_expected( + self.output_dir, Path(self._data_directory / OUT_FILE)) + self._test_runner.declare_output_file(self.output_dir / + OUT_FILE) + + update_cpptest_output_file( + self.output_dir / OUT_FILE, + self._test_runner.working_dir + ) + completed_process = self._test_runner.run_tool_test() asserter = Asserter(self, completed_process, self._test_runner) asserter.assertNoStdErrText() @@ -76,6 +110,40 @@ def test_multiple_valid_invalid_files(self): self._test_runner.working_dir ) + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutNumAndFileDeprecated(33, OUT_FILE, "lobster-act-trace", 3) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_multiple_valid_invalid_files_no_schema(self): + """ + Test for processing multiple input files in a directory with valid and invalid + extensions. Ensures the tool runs on all files in the directory and generates + output for all valid files in the directory. + """ + # lobster-trace: UseCases.Incorrect_Number_of_Cpp_Tests_in_Output + # lobster-trace: UseCases.Incorrect_number_of_requirement_references_in_Output + OUT_FILE = "valid_invalid_files_no_schema.lobster" + self._test_runner.cmd_args.config = str( + self._data_directory / "valid_invalid_files_config_no_kind.yaml") + self._test_runner.declare_input_file(self._data_directory / "multi1.cpp") + self._test_runner.declare_input_file(self._data_directory / "multi2.cpp") + self._test_runner.declare_input_file(self._data_directory / "multi3.cpp") + self._test_runner.declare_input_file(self._data_directory / "dir_file1.abc") + self._test_runner.declare_input_file(self._data_directory / "dir_file2.ppp") + + self.output_dir = self.create_output_directory_and_copy_expected( + self.output_dir, Path(self._data_directory / OUT_FILE)) + self._test_runner.declare_output_file(self.output_dir / + OUT_FILE) + + update_cpptest_output_file( + self.output_dir / OUT_FILE, + self._test_runner.working_dir + ) + completed_process = self._test_runner.run_tool_test() asserter = Asserter(self, completed_process, self._test_runner) asserter.assertNoStdErrText() @@ -100,6 +168,23 @@ def test_no_input_file(self): ) asserter.assertExitCode(1) + def test_no_input_file_no_kind(self): + """ + Test case for handling the scenario where the input file does not exist. + An input file provided in YAML config file which does not exist in working + directory. + """ + # lobster-trace: UseCases.Incorrect_Number_of_Cpp_Tests_in_Output + self._test_runner.cmd_args.config = str( + self._data_directory / "no_input_file_config_no_kind.yaml") + + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertStdErrText( + 'lobster-cpptest: "no_input_file.cpp" is not a file or directory.\n' + ) + asserter.assertExitCode(1) + if __name__ == "__main__": unittest.main() diff --git a/tests_system/lobster_cpptest/test_references.py b/tests_system/lobster_cpptest/test_references.py index b17e4de9a..ca0aaf5a6 100644 --- a/tests_system/lobster_cpptest/test_references.py +++ b/tests_system/lobster_cpptest/test_references.py @@ -36,6 +36,34 @@ def test_no_references_cpptest_file(self): self._test_runner.working_dir ) + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutNumAndFileDeprecated(6, OUT_FILE, "lobster-act-trace", 3) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_no_references_cpptest_file_no_schema(self): + """ + This test checks that the file with no requirement references + is handled correctly by the lobster-cpptest tool. + """ + # lobster-trace: UseCases.Incorrect_number_of_requirement_references_in_Output + OUT_FILE = "no_references_no_schema.lobster" + self._test_runner.declare_input_file(self._data_directory / "no_references.cpp") + self._test_runner.cmd_args.config = str( + self._data_directory / "no_references_config_no_kind.yaml") + + self.output_dir = self.create_output_directory_and_copy_expected( + self.output_dir, Path(self._data_directory / OUT_FILE)) + self._test_runner.declare_output_file(self.output_dir / + OUT_FILE) + + update_cpptest_output_file( + self.output_dir / OUT_FILE, + self._test_runner.working_dir + ) + completed_process = self._test_runner.run_tool_test() asserter = Asserter(self, completed_process, self._test_runner) asserter.assertNoStdErrText() @@ -64,6 +92,34 @@ def test_one_reference_in_cpptest_file(self): self._test_runner.working_dir ) + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutNumAndFileDeprecated(7, OUT_FILE, "lobster-act-trace", 3) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_one_reference_in_cpptest_file_no_schema(self): + """ + This test checks that the file with a single requirement reference + is handled correctly by the lobster-cpptest tool. + """ + # lobster-trace: UseCases.Incorrect_number_of_requirement_references_in_Output + OUT_FILE = "1_reference_no_schema.lobster" + self._test_runner.declare_input_file(self._data_directory / "1_reference.cpp") + self._test_runner.cmd_args.config = str( + self._data_directory / "1_reference_config_no_kind.yaml") + + self.output_dir = self.create_output_directory_and_copy_expected( + self.output_dir, Path(self._data_directory / OUT_FILE)) + self._test_runner.declare_output_file(self.output_dir / + OUT_FILE) + + update_cpptest_output_file( + self.output_dir / OUT_FILE, + self._test_runner.working_dir + ) + completed_process = self._test_runner.run_tool_test() asserter = Asserter(self, completed_process, self._test_runner) asserter.assertNoStdErrText() @@ -93,6 +149,34 @@ def test_many_references_in_cpptest_file(self): self._test_runner.working_dir ) + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutNumAndFileDeprecated(13, OUT_FILE, "lobster-act-trace", 3) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_many_references_in_cpptest_file_no_schema(self): + """ + This test checks that the file with multiple requirement references + is handled correctly by the lobster-cpptest tool. + """ + # lobster-trace: UseCases.Incorrect_number_of_requirement_references_in_Output + OUT_FILE = "many_references_no_schema.lobster" + self._test_runner.declare_input_file( + self._data_directory / "many_references.cpp") + self._test_runner.cmd_args.config = str( + self._data_directory / "many_references_config_no_kind.yaml") + self.output_dir = self.create_output_directory_and_copy_expected( + self.output_dir, Path(self._data_directory / OUT_FILE)) + self._test_runner.declare_output_file(self.output_dir / + OUT_FILE) + + update_cpptest_output_file( + self.output_dir / OUT_FILE, + self._test_runner.working_dir + ) + completed_process = self._test_runner.run_tool_test() asserter = Asserter(self, completed_process, self._test_runner) asserter.assertNoStdErrText() diff --git a/tests_system/lobster_cpptest/test_valid_scenario.py b/tests_system/lobster_cpptest/test_valid_scenario.py index 2ede255d1..4b4efa326 100644 --- a/tests_system/lobster_cpptest/test_valid_scenario.py +++ b/tests_system/lobster_cpptest/test_valid_scenario.py @@ -42,6 +42,34 @@ def test_valid_input_cpptest_file(self): asserter.assertExitCode(0) asserter.assertOutputFiles() + def test_valid_input_cpptest_file_no_schema(self): + """ + This test checks that the valid C++ test file is processed correctly + by the lobster-cpptest tool. + """ + # lobster-trace: cpptest_req.Input_File_Valid_Cpp_Test_File + OUT_FILE = "report_no_schema.lobster" + self._test_runner.declare_input_file(self._data_directory / "1_reference.cpp") + self._test_runner.cmd_args.config = str( + self._data_directory / "valid_cpptest_flow_no_kind.yaml") + + self.output_dir = self.create_output_directory_and_copy_expected( + self.output_dir, Path(self._data_directory / OUT_FILE)) + self._test_runner.declare_output_file(self.output_dir / + OUT_FILE) + + update_cpptest_output_file( + self.output_dir / OUT_FILE, + self._test_runner.working_dir + ) + + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + # asserter.assertStdOutNumAndFile(7, OUT_FILE) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + if __name__ == "__main__": unittest.main() diff --git a/tests_system/lobster_html_report/data/all_status_tracing_policy.html b/tests_system/lobster_html_report/data/all_status_tracing_policy.html new file mode 100644 index 000000000..a031e0083 --- /dev/null +++ b/tests_system/lobster_html_report/data/all_status_tracing_policy.html @@ -0,0 +1,1052 @@ + + + + +L.O.B.S.T.E.R. + + + +
+

L.O.B.S.T.E.R.

+
Lightweight Open BMW Software Traceability Evidence Report
+
+ +
+ + + + + + + + + + +! + + + + + + + + + + + + + + + + + +

Overview

+
+
+
+

Coverage

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CategoryRatioCoverageOK ItemsTotal Items
usecases71.4% + +71.43% + +57
System Requirements57.1% + +57.14% + +47
Software Requirements66.7% + +66.67% + +46
+
+
+

Tracing policy

+ + +LOBSTER Tracing Policy + + + +n_69946e94f6df7a936df43371c18df3ba + + +usecases + + + + + +n_419cfc02b324dc7d8faefa90ed608fb0 + + +System Requirements + + + + + +n_69946e94f6df7a936df43371c18df3ba->n_419cfc02b324dc7d8faefa90ed608fb0 + + + + + +n_9d273bd32c1fceb91b7d6a4d40e98bdd + + +Software Requirements + + + + + +n_419cfc02b324dc7d8faefa90ed608fb0->n_9d273bd32c1fceb91b7d6a4d40e98bdd + + + + + +
+
+
+

Filtering

+
+

Item Filters

+
+ + + + + + +
+

Show Issues

+
+ +
+

Filter

+ +
+

Issues

+
+ +
+

Detailed report

+
+
+

Requirements and Specification

+
+

usecases

+
just_requirements.trlc
+ +
+
TRLC Usecase complex_just_example.lost_sock_scenario
+ +
+
User loses a sock during laundry and needs to find it quickly
+
+
+
Issues: +
    +
  • missing reference to System Requirements
  • +
+
+
+
+ + +
+
TRLC Usecase complex_just_example.monday_motivation_scenario
+ +
+
User wakes up feeling unmotivated on Monday morning
+
+
+
Traces to: + +
+
Justifications: +
    +
  • Not applicable down reference
  • +
+
+
+
+ + +
+
TRLC Usecase complex_just_example.pizza_waiting_scenario
+ +
+
User orders pizza and anxiously waits for delivery
+
+
+
Justifications: +
    +
  • Not applicable down reference
  • +
+
+
+
+ + +
+
TRLC Usecase complex_just_example.cat_communication_scenario
+ +
+
User tries to understand what their cat wants
+
+
+
Justifications: +
    +
  • Not applicable up and down reference
  • +
+
+
+
+ + +
+
TRLC Usecase complex_just_example.remote_hunting_scenario
+ +
+
User wants to watch TV but cannot find the remote control
+
+
+
Justifications: +
    +
  • Not applicable up reference
  • +
  • Not applicable down reference
  • +
+
+
+
+ + +
+
TRLC Usecase complex_just_example.sadness_relief_scenario
+ +
+
User feels sad and needs cheering up
+
+
+
Traces to: + +
+
+
+ + +
+
TRLC Usecase complex_just_example.midnight_snack_temptation_scenario
+ +
+
User is tempted to eat unhealthy snacks late at night
+
+
+
Issues: +
    +
  • missing reference to System Requirements
  • +
+
+
+
+ +
+
+

System Requirements

+ +
+
TRLC System_requirement complex_just_example.sock_finder
+ +
+
The system shall locate missing socks from the laundry dimension
+
+
+
Issues: +
    +
  • missing reference to Software Requirements
  • +
+
+
+
+ + +
+
TRLC System_requirement complex_just_example.monday_mood
+ +
+
The system shall automatically improve user mood on Monday mornings
+
+
+
Derived from: + +
+
Justifications: +
    +
  • Not applicable down reference
  • +
+
+
+
+ + +
+
TRLC System_requirement complex_just_example.pizza_detector
+ +
+
The system shall detect when pizza delivery arrives within 5 miles
+
+
+
Issues: +
    +
  • missing up reference
  • +
+
+
+
+ + +
+
TRLC System_requirement complex_just_example.cat_translator
+ +
+
The system shall translate cat meows into human language
+
+
+
Justifications: +
    +
  • Not applicable up and down reference
  • +
+
+
+
+ + +
+
TRLC System_requirement complex_just_example.remote_locator
+ +
+
The system shall find TV remotes hiding in couch cushions
+
+
+
Justifications: +
    +
  • Not applicable up reference
  • +
  • Not applicable down reference
  • +
+
+
+
+ + +
+
TRLC System_requirement complex_just_example.joke_generator
+ +
+
The system shall tell dad jokes when users are feeling sad
+
+
+
Traces to: + +
+
Derived from: + +
+
+
+ + +
+
TRLC System_requirement complex_just_example.cookie_guard
+ +
+
The system shall protect cookies from midnight snack attacks
+
+
+
Issues: +
    +
  • missing up reference
  • +
  • missing reference to Software Requirements
  • +
+
+
+
+ +
+
+

Software Requirements

+ +
+
TRLC Software_requirement complex_just_example.sock_scanner
+ +
+
The software shall scan washing machines and dryers for sock presence
+
+
+
Justifications: +
    +
  • Not applicable up reference
  • +
+
+
+
+ + +
+
TRLC Software_requirement complex_just_example.mood_analyzer
+ +
+
The software shall analyze user facial expressions and deploy happiness algorithms
+
+
+
Issues: +
    +
  • missing up reference
  • +
+
+
+
+ + +
+
TRLC Software_requirement complex_just_example.pizza_radar
+ +
+
The software shall monitor GPS coordinates of pizza delivery vehicles
+
+
+
Justifications: +
    +
  • Not applicable up and down reference
  • +
+
+
+
+ + +
+
TRLC Software_requirement complex_just_example.meow_processor
+ +
+
The software shall process cat vocalizations using advanced feline linguistics
+
+
+
Justifications: +
    +
  • Not applicable up reference
  • +
  • Not applicable down reference
  • +
+
+
+
+ + +
+
TRLC Software_requirement complex_just_example.pun_database
+ +
+
The software shall maintain a database of dad jokes sorted by cringe level
+
+
+
Derived from: + +
+
+
+ + +
+
TRLC Software_requirement complex_just_example.cushion_explorer
+ +
+
The software shall map couch cushion topography for remote detection
+
+
+
Issues: +
    +
  • missing up reference
  • +
+
+
+
+ +
+
+
+

Implementation

+
+
+

Verification and Validation

+
+
+
+

LOBSTER Version: 1.0.3-dev

+
+
+
+ + + + diff --git a/tests_system/lobster_html_report/data/codebeamer_links_tracing_policy.html b/tests_system/lobster_html_report/data/codebeamer_links_tracing_policy.html new file mode 100644 index 000000000..e8c0a0882 --- /dev/null +++ b/tests_system/lobster_html_report/data/codebeamer_links_tracing_policy.html @@ -0,0 +1,758 @@ + + + + +L.O.B.S.T.E.R. + + + +
+

L.O.B.S.T.E.R.

+
Lightweight Open BMW Software Traceability Evidence Report
+
+ +
+ + + + + + + + + + +! + + + + + + + + + + + + + + + + + +

Overview

+
+
+
+

Coverage

+ + + + + + + + + + + + + + + + + + + + + + + + +
CategoryRatioCoverageOK ItemsTotal Items
Requirements100.0% + +100.00% + +44
Code100.0% + +100.00% + +44
+
+
+

Tracing policy

+ + +LOBSTER Tracing Policy + + + +n_5a2ebfb8baa378cfcfcba58bbb1380c2 + + +Requirements + + + + + +n_ca0dbad92a874b2f69b549293387925e + + +Code + + + + + +n_5a2ebfb8baa378cfcfcba58bbb1380c2->n_ca0dbad92a874b2f69b549293387925e + + + + + +
+
+
+

Filtering

+
+

Item Filters

+
+ + + + + + +
+

Show Issues

+
+ +
+

Filter

+ +
+

Issues

+
+ +
+

Detailed report

+
+
+

Requirements and Specification

+
+

Requirements

+
Codebeamer https://localhost:8999, tracker 10000
+ +
+
codebeamer Codebeamer item Requirement 1: Dynamic name
+ +
+Status: Status 1 +
+
+
Traces to: + +
+
+
+ +
Codebeamer https://localhost:8999, tracker 20000
+ +
+
codebeamer Codebeamer item Requirement 2: Dynamic name
+ +
+Status: Status 2 +
+
+
Traces to: + +
+
+
+ +
Codebeamer https://localhost:8999, tracker 30000
+ +
+
codebeamer Codebeamer item Requirement 3: Dynamic name
+ +
+Status: Status 3 +
+
+
Traces to: + +
+
+
+ +
Codebeamer https://localhost:8999, tracker 40000
+ +
+
codebeamer Codebeamer item Requirement 4: Dynamic name
+ +
+Status: Status 4 +
+
+
Traces to: + +
+
+
+ +
+
+
+

Implementation

+
+

Code

+
codebeamer_funny_impl.py
+ +
+
Python Function codebeamer_funny_impl.translate_dog_barking
+ +
+
Derived from: + +
+
+
+ + +
+
Python Function codebeamer_funny_impl.organize_cloud_shapes
+ +
+
Derived from: + +
+
+
+ + +
+
Python Function codebeamer_funny_impl.schedule_cat_meetings
+ +
+
Derived from: + +
+
+
+ + +
+
Python Function codebeamer_funny_impl.calibrate_sandwich_perfection
+ +
+
Derived from: + +
+
+
+ +
+
+
+

Verification and Validation

+
+
+
+

LOBSTER Version: 1.0.3-dev

+
+
+
+ + + + diff --git a/tests_system/lobster_html_report/data/custom_data_tracing_policy.html b/tests_system/lobster_html_report/data/custom_data_tracing_policy.html index 8cb3b68c8..edfd7b91b 100644 --- a/tests_system/lobster_html_report/data/custom_data_tracing_policy.html +++ b/tests_system/lobster_html_report/data/custom_data_tracing_policy.html @@ -549,7 +549,7 @@

Verification and Validation

-

LOBSTER Version: 0.14.6-dev

+

LOBSTER Version: 1.0.3-dev

diff --git a/tests_system/lobster_html_report/data/is_actually_html_tracing_policy.html b/tests_system/lobster_html_report/data/is_actually_html_tracing_policy.html new file mode 100644 index 000000000..e89d82ae3 --- /dev/null +++ b/tests_system/lobster_html_report/data/is_actually_html_tracing_policy.html @@ -0,0 +1,658 @@ + + + + +L.O.B.S.T.E.R. + + + +
+

L.O.B.S.T.E.R.

+
Lightweight Open BMW Software Traceability Evidence Report
+
+ +
+ + + + + + + + + + +! + + + + + + + + + + + + + + + + + +

Overview

+
+
+
+

Coverage

+ + + + + + + + + + + + + + + + + + + + + + + + +
CategoryRatioCoverageOK ItemsTotal Items
Requirements0.0% + +0.00% + +01
Code0.0% + +0.00% + +01
+
+
+

Tracing policy

+ + +LOBSTER Tracing Policy + + + +n_5a2ebfb8baa378cfcfcba58bbb1380c2 + + +Requirements + + + + + +n_ca0dbad92a874b2f69b549293387925e + + +Code + + + + + +n_5a2ebfb8baa378cfcfcba58bbb1380c2->n_ca0dbad92a874b2f69b549293387925e + + + + + +
+
+
+

Filtering

+
+

Item Filters

+
+ + + + + + +
+

Show Issues

+
+ +
+

Filter

+ +
+

Issues

+
+ +
+

Detailed report

+
+
+

Requirements and Specification

+
+

Requirements

+
.\demo.trlc
+ +
+
TRLC Requirement example.adas_100_A
+
Source: + +.\demo.trlc +
+
+Status: status1 +
+
+
keep the vehicle flying
+
+
+
Issues: +
    +
  • status is status1, expected abc or def
  • +
  • missing reference to Code
  • +
+
+
+
+ +
+
+
+

Implementation

+
+

Code

+
.\software.py
+ +
+
Python Function software.Example
+
Source: + +.\software.py +
+
+
Issues: +
    +
  • missing up reference
  • +
+
+
+
+ +
+
+
+

Verification and Validation

+
+
+
+

LOBSTER Version: 1.0.3-dev

+
+
+
+ + + + diff --git a/tests_system/lobster_html_report/data/octopus_tracing_policy.html b/tests_system/lobster_html_report/data/octopus_tracing_policy.html new file mode 100644 index 000000000..cba2059e0 --- /dev/null +++ b/tests_system/lobster_html_report/data/octopus_tracing_policy.html @@ -0,0 +1,1186 @@ + + + + +L.O.B.S.T.E.R. + + + +
+

L.O.B.S.T.E.R.

+
Lightweight Open BMW Software Traceability Evidence Report
+
+ +
+ + + + + + + + + + +! + + + + + + + + + + + + + + + + + +

Overview

+
+
+
+

Coverage

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CategoryRatioCoverageOK ItemsTotal Items
Requirements100.0% + +100.00% + +88
Code80.0% + +80.00% + +810
test81.8% + +81.82% + +911
+
+
+

Tracing policy

+ + +LOBSTER Tracing Policy + + + +n_5a2ebfb8baa378cfcfcba58bbb1380c2 + + +Requirements + + + + + +n_ca0dbad92a874b2f69b549293387925e + + +Code + + + + + +n_5a2ebfb8baa378cfcfcba58bbb1380c2->n_ca0dbad92a874b2f69b549293387925e + + + + + +n_098f6bcd4621d373cade4e832627b4f6 + + +test + + + + + +n_5a2ebfb8baa378cfcfcba58bbb1380c2->n_098f6bcd4621d373cade4e832627b4f6 + + + + + +
+
+
+

Filtering

+
+

Item Filters

+
+ + + + + + +
+

Show Issues

+
+ +
+

Filter

+ +
+

Issues

+
+ +
+

Detailed report

+
+
+

Requirements and Specification

+
+

Requirements

+
octopus_requirements.trlc
+ +
+
TRLC Software_requirement octopus_example.tentacle_motor_control
+ +
+
The software shall implement motor control algorithms for independent tentacle movement
+
+
+ +
Derived from: + +
+
+
+ + +
+
TRLC Software_requirement octopus_example.chromatophore_processor
+ +
+
The software shall process color-changing commands to chromatophore cells in real-time
+
+
+ +
Derived from: + +
+
+
+ + +
+
TRLC Software_requirement octopus_example.ink_sac_trigger
+ +
+
The software shall trigger ink sac release with precise timing and volume control
+
+
+ +
Derived from: + +
+
+
+ + +
+
TRLC Software_requirement octopus_example.vision_processing_unit
+ +
+
The software shall process multiple camera feeds for 360-degree underwater vision
+
+
+ +
Derived from: + +
+
+
+ +
octopus_requirements1.trlc
+ +
+
TRLC1 System_requirement1 octopus_example.tentacle_coordination
+ +
+
The system shall coordinate all eight tentacles simultaneously without getting tangled
+
+ +
+ +
octopus_requirements2.trlc
+ +
+
TRLC2 System_requirement2 octopus_example.color_camouflage
+ +
+
The system shall change colors instantly to blend with coral reefs and escape predators
+
+ +
+ +
octopus_requirements3.trlc
+ +
+
TRLC3 System_requirement3 octopus_example.ink_defense
+ +
+
The system shall deploy ink clouds as defensive countermeasure when threatened
+
+ +
+ +
octopus_requirements4.trlc
+ +
+
TRLC4 System_requirement4 octopus_example.prey_detection
+ +
+
The system shall detect and track multiple prey items using advanced underwater vision
+
+ +
+ +
+
+
+

Implementation

+
+

Code

+
tentacle_commander.py
+ +
+
Python Class tentacle_commander.TentacleCoordinator
+ +
+
Derived from: + +
+
+
+ + +
+
Python Class tentacle_commander.ColorCamouflage
+ +
+
Derived from: + +
+
+
+ + +
+
Python Class tentacle_commander.InkDefense
+ +
+
Derived from: + +
+
+
+ + +
+
Python Class tentacle_commander.PreyDetection
+ +
+
Derived from: + +
+
+
+ + +
+
Python Class tentacle_commander.DenSecurity
+ +
+
Issues: +
    +
  • unknown tracing target req octopus_example.den_security
  • +
  • missing up reference
  • +
+
+
+
+ +
tentacle_toolkit.py
+ +
+
Python Class tentacle_toolkit.MotorController
+
Source: + +tentacle_toolkit.py +
+
+
Derived from: + +
+
+
+ + +
+
Python Class tentacle_toolkit.ColorProcessor
+
Source: + +tentacle_toolkit.py +
+
+
Derived from: + +
+
+
+ + +
+
Python Class tentacle_toolkit.InkTrigger
+
Source: + +tentacle_toolkit.py +
+
+
Derived from: + +
+
+
+ + +
+
Python Class tentacle_toolkit.VisionProcessor
+
Source: + +tentacle_toolkit.py +
+
+
Derived from: + +
+
+
+ + +
+
Python Class tentacle_toolkit.ConstructionPlanner
+
Source: + +tentacle_toolkit.py +
+
+
Issues: +
    +
  • unknown tracing target req octopus_example.rock_arrangement_planner
  • +
  • missing up reference
  • +
+
+
+
+ +
+
+
+

Verification and Validation

+
+

test

+
test_tentacle_commander.py
+ +
+
PyUnit Test test_tentacle_commander.TestTentacleCoordinator.test_move_tentacles:18
+ +
+
Derived from: + +
+
+
+ + +
+
PyUnit Test test_tentacle_commander.TestColorCamouflage.test_change_color_coral:28
+ +
+
Derived from: + +
+
+
+ + +
+
PyUnit Test test_tentacle_commander.TestColorCamouflage.test_change_color_sand:33
+ +
+
Derived from: + +
+
+
+ + +
+
PyUnit Test test_tentacle_commander.TestInkDefense.test_deploy_ink:42
+ +
+
Derived from: + +
+
+
+ + +
+
PyUnit Test test_tentacle_commander.TestPreyDetection.test_scan_for_prey:52
+ +
+
Derived from: + +
+
+
+ + +
+
PyUnit Test test_tentacle_commander.TestDenSecurity.test_secure_den:62
+ +
+
Issues: +
    +
  • unknown tracing target req octopus_example.den_security
  • +
  • missing up reference
  • +
+
+
+
+ +
test_tentacle_toolkit.py
+ +
+
PyUnit Test test_tentacle_toolkit.TestMotorController.test_control_motors:18
+ +
+
Derived from: + +
+
+
+ + +
+
PyUnit Test test_tentacle_toolkit.TestColorProcessor.test_process_color_change:28
+ +
+
Derived from: + +
+
+
+ + +
+
PyUnit Test test_tentacle_toolkit.TestInkTrigger.test_trigger_ink_release:38
+ +
+
Derived from: + +
+
+
+ + +
+
PyUnit Test test_tentacle_toolkit.TestVisionProcessor.test_process_vision:48
+ +
+
Derived from: + +
+
+
+ + +
+
PyUnit Test test_tentacle_toolkit.TestConstructionPlanner.test_plan_construction:58
+ +
+
Issues: +
    +
  • unknown tracing target req octopus_example.rock_arrangement_planner
  • +
  • missing up reference
  • +
+
+
+
+ +
+
+
+
+

LOBSTER Version: 1.0.3-dev

+
+
+
+ + + + diff --git a/tests_system/lobster_html_report/data/pizza_online_tracing_policy.html b/tests_system/lobster_html_report/data/pizza_online_tracing_policy.html new file mode 100644 index 000000000..946831234 --- /dev/null +++ b/tests_system/lobster_html_report/data/pizza_online_tracing_policy.html @@ -0,0 +1,1622 @@ + + + + +L.O.B.S.T.E.R. + + + +
+

L.O.B.S.T.E.R.

+
Lightweight Open BMW Software Traceability Evidence Report
+
+ +
+ + + + + + + + + + +! + + + + + + + + + + + + + + + + + +

Overview

+
+
+
+

Coverage

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CategoryRatioCoverageOK ItemsTotal Items
System Requirements100.0% + +100.00% + +88
Software Requirements100.0% + +100.00% + +88
Code100.0% + +100.00% + +1313
Component Tests100.0% + +100.00% + +77
Unit Tests100.0% + +100.00% + +88
+
+
+

Tracing policy

+ + +LOBSTER Tracing Policy + + + +n_419cfc02b324dc7d8faefa90ed608fb0 + + +System Requirements + + + + + +n_ca0dbad92a874b2f69b549293387925e + + +Code + + + + + +n_419cfc02b324dc7d8faefa90ed608fb0->n_ca0dbad92a874b2f69b549293387925e + + + + + +n_89ee055e759171b6b87a317d46004553 + + +Component Tests + + + + + +n_419cfc02b324dc7d8faefa90ed608fb0->n_89ee055e759171b6b87a317d46004553 + + + + + +n_9d273bd32c1fceb91b7d6a4d40e98bdd + + +Software Requirements + + + + + +n_9d273bd32c1fceb91b7d6a4d40e98bdd->n_ca0dbad92a874b2f69b549293387925e + + + + + +n_9d273bd32c1fceb91b7d6a4d40e98bdd->n_89ee055e759171b6b87a317d46004553 + + + + + +n_d6a712b8912b88fc5654b52032b40f5b + + +Unit Tests + + + + + +n_9d273bd32c1fceb91b7d6a4d40e98bdd->n_d6a712b8912b88fc5654b52032b40f5b + + + + + +
+
+
+

Filtering

+
+

Item Filters

+
+ + + + + + +
+

Show Issues

+
+ +
+

Filter

+ +
+

Issues

+
+ +
+

Detailed report

+
+
+

Requirements and Specification

+
+

System Requirements

+
pizza_system_requirements.trlc
+ +
+
TRLC System_requirement pizza_example.oven
+ +
+
The system shall heat pizzas to perfect crispy goodness
+
+ +
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ + +
+
TRLC System_requirement pizza_example.delivery
+ +
+
The system shall transport pizzas while they are still hot
+
+ +
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ + +
+
TRLC System_requirement pizza_example.ordering
+ +
+
The system shall accept pizza orders from hungry customers
+
+ +
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ + +
+
TRLC System_requirement pizza_example.payment
+ +
+
The system shall process money without stealing tips
+
+ +
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ + +
+
TRLC System_requirement pizza_example.tracking
+ +
+
The system shall show where the pizza is on its journey
+
+ +
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ + +
+
TRLC System_requirement pizza_example.inventory
+ +
+
The system shall keep track of cheese and pepperoni supplies
+
+ +
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ + +
+
TRLC System_requirement pizza_example.communication
+ +
+
The system shall notify customers when pizza arrives
+
+ +
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ + +
+
TRLC System_requirement pizza_example.quality
+ +
+
The system shall ensure pizzas taste better than cardboard
+
+ +
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ +
+
+

Software Requirements

+
pizza_software_requirements.trlc
+ +
+
TRLC Software_requirement pizza_example.oven_controller
+ +
+
The software shall control oven temperature and cooking timer
+
+ +
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ + +
+
TRLC Software_requirement pizza_example.route_planner
+ +
+
The software shall calculate fastest delivery routes
+
+ +
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ + + + + +
+
TRLC Software_requirement pizza_example.payment_gateway
+ +
+
The software shall handle credit card transactions securely
+
+ +
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ + +
+
TRLC Software_requirement pizza_example.gps_tracker
+ +
+
The software shall provide real-time delivery location updates
+
+ +
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ + +
+
TRLC Software_requirement pizza_example.stock_manager
+ +
+
The software shall monitor ingredient levels and send alerts
+
+ +
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ + +
+
TRLC Software_requirement pizza_example.notification_system
+ +
+
The software shall send SMS and email updates to customers
+
+ +
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ + +
+
TRLC Software_requirement pizza_example.recipe_database
+ +
+
The software shall store pizza recipes and quality standards
+
+ +
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ +
+
+
+

Implementation

+
+

Code

+
pizza_implementation.py
+ +
+
Python Method pizza_implementation.OvenController.start_cooking
+ +
+
Derived from: + +
+
+
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ + +
+
Python Method pizza_implementation.OvenController.check_cooking_status
+ +
+
Derived from: + +
+
+
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ + +
+
Python Method pizza_implementation.RouteOptimizer.calculate_route
+ +
+
Derived from: + +
+
+
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ + +
+
Python Method pizza_implementation.OrderProcessor.create_customer
+ +
+
Derived from: + +
+
+
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ + +
+
Python Method pizza_implementation.OrderProcessor.place_order
+ +
+
Derived from: + +
+
+
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ + +
+
Python Method pizza_implementation.PaymentGateway.process_payment
+ +
+
Derived from: + +
+
+
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ + +
+
Python Method pizza_implementation.DeliveryTracker.start_delivery
+ +
+
Derived from: + +
+
+
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ + +
+
Python Method pizza_implementation.InventoryManager.use_ingredients
+ +
+
Derived from: + +
+
+
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ + +
+
Python Method pizza_implementation.InventoryManager.check_for_alerts
+ +
+
Derived from: + +
+
+
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ + +
+
Python Method pizza_implementation.NotificationSystem.send_sms
+ +
+
Derived from: + +
+
+
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ + +
+
Python Method pizza_implementation.NotificationSystem.notify_order_status
+ +
+
Derived from: + +
+
+
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ + +
+
Python Method pizza_implementation.RecipeDatabase.get_recipe
+ +
+
Derived from: + +
+
+
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ + +
+
Python Method pizza_implementation.RecipeDatabase.validate_quality
+ +
+
Derived from: + +
+
+
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ +
+
+
+

Verification and Validation

+
+

Component Tests

+
test_pizza_components.py
+ +
+
PyUnit Test test_pizza_components.TestOrderProcessingComponent.test_complete_order_creation_workflow:26
+ +
+
Derived from: + +
+
+
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ + +
+
PyUnit Test test_pizza_components.TestCookingComponent.test_recipe_to_cooking_workflow:62
+ +
+
Derived from: + +
+
+
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ + +
+
PyUnit Test test_pizza_components.TestDeliveryComponent.test_delivery_tracking_workflow:102
+ +
+
Derived from: + +
+
+
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ + +
+
PyUnit Test test_pizza_components.TestInventoryAlertComponent.test_low_stock_alert_workflow:142
+ +
+
Derived from: + +
+
+
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ + +
+
PyUnit Test test_pizza_components.TestQualityControlComponent.test_quality_validation_workflow:173
+ +
+
Derived from: + +
+
+
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ + +
+
PyUnit Test test_pizza_components.TestEndToEndOrderComponent.test_complete_pizza_order_system:205
+ +
+
Derived from: + +
+
+
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ + +
+
PyUnit Test test_pizza_components.TestErrorHandlingComponent.test_payment_failure_workflow:278
+ +
+
Derived from: + +
+
+
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ +
+
+

Unit Tests

+
test_pizza_implementation.py
+ +
+
PyUnit Test test_pizza_implementation.TestOvenController.test_start_cooking:18
+ +
+
Derived from: + +
+
+
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ + +
+
PyUnit Test test_pizza_implementation.TestOrderProcessor.test_create_customer:33
+ +
+
Derived from: + +
+
+
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ + +
+
PyUnit Test test_pizza_implementation.TestOrderProcessor.test_place_order:43
+ +
+
Derived from: + +
+
+
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ + +
+
PyUnit Test test_pizza_implementation.TestPaymentGateway.test_process_payment_valid:57
+ +
+
Derived from: + +
+
+
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ + +
+
PyUnit Test test_pizza_implementation.TestInventoryManager.test_use_ingredients:71
+ +
+
Derived from: + +
+
+
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ + +
+
PyUnit Test test_pizza_implementation.TestNotificationSystem.test_send_sms:86
+ +
+
Derived from: + +
+
+
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ + +
+
PyUnit Test test_pizza_implementation.TestRecipeDatabase.test_get_recipe:100
+ +
+
Derived from: + +
+
+
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ + +
+
PyUnit Test test_pizza_implementation.TestRouteOptimizer.test_calculate_route_empty:114
+ +
+
Derived from: + +
+
+
Build Reference: HEAD | Timestamp: 2025-11-20 13:51:06+00:00 UTC
+
+ +
+
+
+
+

LOBSTER Version: 1.0.3-dev

+
+
+
+ + + + diff --git a/tests_system/lobster_html_report/data/pizza_tracing_policy.html b/tests_system/lobster_html_report/data/pizza_tracing_policy.html new file mode 100644 index 000000000..bb3106707 --- /dev/null +++ b/tests_system/lobster_html_report/data/pizza_tracing_policy.html @@ -0,0 +1,1578 @@ + + + + +L.O.B.S.T.E.R. + + + +
+

L.O.B.S.T.E.R.

+
Lightweight Open BMW Software Traceability Evidence Report
+
+ +
+ + + + + + + + + + +! + + + + + + + + + + + + + + + + + +

Overview

+
+
+
+

Coverage

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CategoryRatioCoverageOK ItemsTotal Items
System Requirements100.0% + +100.00% + +88
Software Requirements100.0% + +100.00% + +88
Code100.0% + +100.00% + +1313
Component Tests100.0% + +100.00% + +77
Unit Tests100.0% + +100.00% + +88
+
+
+

Tracing policy

+ + +LOBSTER Tracing Policy + + + +n_419cfc02b324dc7d8faefa90ed608fb0 + + +System Requirements + + + + + +n_ca0dbad92a874b2f69b549293387925e + + +Code + + + + + +n_419cfc02b324dc7d8faefa90ed608fb0->n_ca0dbad92a874b2f69b549293387925e + + + + + +n_89ee055e759171b6b87a317d46004553 + + +Component Tests + + + + + +n_419cfc02b324dc7d8faefa90ed608fb0->n_89ee055e759171b6b87a317d46004553 + + + + + +n_9d273bd32c1fceb91b7d6a4d40e98bdd + + +Software Requirements + + + + + +n_9d273bd32c1fceb91b7d6a4d40e98bdd->n_ca0dbad92a874b2f69b549293387925e + + + + + +n_9d273bd32c1fceb91b7d6a4d40e98bdd->n_89ee055e759171b6b87a317d46004553 + + + + + +n_d6a712b8912b88fc5654b52032b40f5b + + +Unit Tests + + + + + +n_9d273bd32c1fceb91b7d6a4d40e98bdd->n_d6a712b8912b88fc5654b52032b40f5b + + + + + +
+
+
+

Filtering

+
+

Item Filters

+
+ + + + + + +
+

Show Issues

+
+ +
+

Filter

+ +
+

Issues

+
+ +
+

Detailed report

+
+
+

Requirements and Specification

+
+

System Requirements

+
pizza_system_requirements.trlc
+ + + + +
+
TRLC System_requirement pizza_example.delivery
+ +
+
The system shall transport pizzas while they are still hot
+
+ +
+ + + + + + + + +
+
TRLC System_requirement pizza_example.tracking
+ +
+
The system shall show where the pizza is on its journey
+
+ +
+ + + + + + + + + + +
+
+

Software Requirements

+
pizza_software_requirements.trlc
+ + + + + + + + + + + + + +
+
TRLC Software_requirement pizza_example.gps_tracker
+ +
+
The software shall provide real-time delivery location updates
+
+ +
+ + + + + + + + + + +
+
+
+

Implementation

+
+

Code

+
pizza_implementation.py
+ +
+
Python Method pizza_implementation.OvenController.start_cooking
+ +
+
Derived from: + +
+
+
+ + +
+
Python Method pizza_implementation.OvenController.check_cooking_status
+ +
+
Derived from: + +
+
+
+ + +
+
Python Method pizza_implementation.RouteOptimizer.calculate_route
+ +
+
Derived from: + +
+
+
+ + +
+
Python Method pizza_implementation.OrderProcessor.create_customer
+ +
+
Derived from: + +
+
+
+ + +
+
Python Method pizza_implementation.OrderProcessor.place_order
+ +
+
Derived from: + +
+
+
+ + +
+
Python Method pizza_implementation.PaymentGateway.process_payment
+ +
+
Derived from: + +
+
+
+ + +
+
Python Method pizza_implementation.DeliveryTracker.start_delivery
+ +
+
Derived from: + +
+
+
+ + +
+
Python Method pizza_implementation.InventoryManager.use_ingredients
+ +
+
Derived from: + +
+
+
+ + +
+
Python Method pizza_implementation.InventoryManager.check_for_alerts
+ +
+
Derived from: + +
+
+
+ + +
+
Python Method pizza_implementation.NotificationSystem.send_sms
+ +
+
Derived from: + +
+
+
+ + +
+
Python Method pizza_implementation.NotificationSystem.notify_order_status
+ +
+
Derived from: + +
+
+
+ + +
+
Python Method pizza_implementation.RecipeDatabase.get_recipe
+ +
+
Derived from: + +
+
+
+ + +
+
Python Method pizza_implementation.RecipeDatabase.validate_quality
+ +
+
Derived from: + +
+
+
+ +
+
+
+

Verification and Validation

+
+

Component Tests

+
test_pizza_components.py
+ +
+
PyUnit Test test_pizza_components.TestOrderProcessingComponent.test_complete_order_creation_workflow:26
+ +
+
Derived from: + +
+
+
+ + +
+
PyUnit Test test_pizza_components.TestCookingComponent.test_recipe_to_cooking_workflow:62
+ +
+
Derived from: + +
+
+
+ + +
+
PyUnit Test test_pizza_components.TestDeliveryComponent.test_delivery_tracking_workflow:102
+ +
+
Derived from: + +
+
+
+ + +
+
PyUnit Test test_pizza_components.TestInventoryAlertComponent.test_low_stock_alert_workflow:142
+ +
+
Derived from: + +
+
+
+ + +
+
PyUnit Test test_pizza_components.TestQualityControlComponent.test_quality_validation_workflow:173
+ +
+
Derived from: + +
+
+
+ + +
+
PyUnit Test test_pizza_components.TestEndToEndOrderComponent.test_complete_pizza_order_system:205
+ +
+
Derived from: + +
+
+
+ + +
+
PyUnit Test test_pizza_components.TestErrorHandlingComponent.test_payment_failure_workflow:278
+ +
+
Derived from: + +
+
+
+ +
+
+

Unit Tests

+
test_pizza_implementation.py
+ +
+
PyUnit Test test_pizza_implementation.TestOvenController.test_start_cooking:18
+ +
+
Derived from: + +
+
+
+ + +
+
PyUnit Test test_pizza_implementation.TestOrderProcessor.test_create_customer:33
+ +
+
Derived from: + +
+
+
+ + +
+
PyUnit Test test_pizza_implementation.TestOrderProcessor.test_place_order:43
+ +
+
Derived from: + +
+
+
+ + +
+
PyUnit Test test_pizza_implementation.TestPaymentGateway.test_process_payment_valid:57
+ +
+
Derived from: + +
+
+
+ + +
+
PyUnit Test test_pizza_implementation.TestInventoryManager.test_use_ingredients:71
+ +
+
Derived from: + +
+
+
+ + +
+
PyUnit Test test_pizza_implementation.TestNotificationSystem.test_send_sms:86
+ +
+
Derived from: + +
+
+
+ + +
+
PyUnit Test test_pizza_implementation.TestRecipeDatabase.test_get_recipe:100
+ +
+
Derived from: + +
+
+
+ + +
+
PyUnit Test test_pizza_implementation.TestRouteOptimizer.test_calculate_route_empty:114
+ +
+
Derived from: + +
+
+
+ +
+
+
+
+

LOBSTER Version: 1.0.3-dev

+
+
+
+ + + + diff --git a/tests_system/lobster_html_report/data/to_render_md_content_tracing_policy.html b/tests_system/lobster_html_report/data/to_render_md_content_tracing_policy.html new file mode 100644 index 000000000..6b7ae2d32 --- /dev/null +++ b/tests_system/lobster_html_report/data/to_render_md_content_tracing_policy.html @@ -0,0 +1,694 @@ + + + + +L.O.B.S.T.E.R. + + + +
+

L.O.B.S.T.E.R.

+
Lightweight Open BMW Software Traceability Evidence Report
+
+ +
+ + + + + + + + + + +! + + + + + + + + + + + + + + + + + +

Overview

+
+
+
+

Coverage

+ + + + + + + + + + + + + + + + + + + + + + + + +
CategoryRatioCoverageOK ItemsTotal Items
Requirements0.0% + +0.00% + +01
Code0.0% + +0.00% + +01
+
+
+

Tracing policy

+ + +LOBSTER Tracing Policy + + + +n_5a2ebfb8baa378cfcfcba58bbb1380c2 + + +Requirements + + + + + +n_ca0dbad92a874b2f69b549293387925e + + +Code + + + + + +n_5a2ebfb8baa378cfcfcba58bbb1380c2->n_ca0dbad92a874b2f69b549293387925e + + + + + +
+
+
+

Filtering

+
+

Item Filters

+
+ + + + + + +
+

Show Issues

+
+ +
+

Filter

+ +
+

Issues

+
+ +
+

Detailed report

+
+
+

Requirements and Specification

+
+

Requirements

+
.\demo.trlc
+ +
+
TRLC Requirement example.adas_100_A
+
Source: + +.\demo.trlc +
+
+Status: status1 +
+
+

Test

+

List

+
    +
  • first
  • +
  • second
  • +
  • third
  • +
+

Table

+ + + + + + + + + + + + + +
H1H2
B1B2
+

italic
+bold

+
+
+
Issues: +
    +
  • status is status1, expected abc or def
  • +
  • missing reference to Code
  • +
+
+
+
+ +
+
+
+

Implementation

+
+

Code

+
.\software.py
+ +
+
Python Function software.Example
+
Source: + +.\software.py +
+
+
Issues: +
    +
  • missing up reference
  • +
+
+
+
+ +
+
+
+

Verification and Validation

+
+
+
+

LOBSTER Version: 1.0.3-dev

+
+
+
+ + + + diff --git a/tests_system/lobster_html_report/test_html_content.py b/tests_system/lobster_html_report/test_html_content.py index 50c8b10fd..5e66b168b 100644 --- a/tests_system/lobster_html_report/test_html_content.py +++ b/tests_system/lobster_html_report/test_html_content.py @@ -30,7 +30,11 @@ def test_item_unique_data(self): This test checks that the data is not mixed and unique data in each item processed correctly """ - output_filename = "octopus.html" + dot_present = is_dot_available(dot=None) + if dot_present: + output_filename = "octopus_tracing_policy.html" + else: + output_filename = "octopus.html" inputfile2 = self._data_directory / "report_octopus.lobster" self.output_dir = self.create_output_directory_and_copy_expected( @@ -46,7 +50,7 @@ def test_item_unique_data(self): completed_process = self.test_runner.run_tool_test() asserter = Asserter(self, completed_process, self.test_runner) - if is_dot_available(dot=None): + if dot_present: expected_stdout = f"LOBSTER HTML report written to {output_filename}\n" else: @@ -72,7 +76,11 @@ def test_complex_tracing_policy_data(self): This test checks that the data created using complex tracing policy is processed correctly. """ - output_filename = "pizza.html" + dot_present = is_dot_available(dot=None) + if dot_present: + output_filename = "pizza_tracing_policy.html" + else: + output_filename = "pizza.html" inputfile = self._data_directory / "report_pizza.lobster" self.output_dir = self.create_output_directory_and_copy_expected( @@ -88,7 +96,7 @@ def test_complex_tracing_policy_data(self): completed_process = self.test_runner.run_tool_test() asserter = Asserter(self, completed_process, self.test_runner) - if is_dot_available(dot=None): + if dot_present: expected_stdout = f"LOBSTER HTML report written to {output_filename}\n" else: @@ -115,7 +123,11 @@ def test_multiple_input_files_in_working_directory(self): This test checks that the tool shall process only the provided input file and ignore all other files in the working directory. """ - output_filename = "pizza.html" + dot_present = is_dot_available(dot=None) + if dot_present: + output_filename = "pizza_tracing_policy.html" + else: + output_filename = "pizza.html" inputfile1 = self._data_directory / "report_pizza.lobster" inputfile2 = self._data_directory / "report_octopus.lobster" @@ -134,7 +146,7 @@ def test_multiple_input_files_in_working_directory(self): completed_process = self.test_runner.run_tool_test() asserter = Asserter(self, completed_process, self.test_runner) - if is_dot_available(dot=None): + if dot_present: expected_stdout = f"LOBSTER HTML report written to {output_filename}\n" else: @@ -162,7 +174,11 @@ def test_html_content_with_multiple_status(self): with multiple status like ok, missing, partial, justified and displays content correctly according to its status. """ - output_filename = "all_status.html" + dot_present = is_dot_available(dot=None) + if dot_present: + output_filename = "all_status_tracing_policy.html" + else: + output_filename = "all_status.html" inputfile = self._data_directory / "report_all_status.lobster" self.output_dir = self.create_output_directory_and_copy_expected( @@ -178,7 +194,7 @@ def test_html_content_with_multiple_status(self): completed_process = self.test_runner.run_tool_test() asserter = Asserter(self, completed_process, self.test_runner) - if is_dot_available(dot=None): + if dot_present: expected_stdout = f"LOBSTER HTML report written to {output_filename}\n" else: @@ -204,7 +220,11 @@ def test_codebeamer_links(self): It also covers that the correct codebeamer links i.e codebeamer source location is included in output """ - output_filename = "codebeamer_links.html" + dot_present = is_dot_available(dot=None) + if dot_present: + output_filename = "codebeamer_links_tracing_policy.html" + else: + output_filename = "codebeamer_links.html" inputfile = self._data_directory / "codebeamer_links.lobster" self.output_dir = self.create_output_directory_and_copy_expected( @@ -220,7 +240,7 @@ def test_codebeamer_links(self): completed_process = self.test_runner.run_tool_test() asserter = Asserter(self, completed_process, self.test_runner) - if is_dot_available(dot=None): + if dot_present: expected_stdout = f"LOBSTER HTML report written to {output_filename}\n" else: @@ -248,7 +268,11 @@ def test_message_in_item(self): This test checks the input .lobster file has a content in message attributes and HTML tool correctly processes it and write correct output file. """ - output_filename = "octopus.html" + dot_present = is_dot_available(dot=None) + if dot_present: + output_filename = "octopus_tracing_policy.html" + else: + output_filename = "octopus.html" inputfile = self._data_directory / "report_octopus.lobster" self.output_dir = self.create_output_directory_and_copy_expected( @@ -264,7 +288,7 @@ def test_message_in_item(self): completed_process = self.test_runner.run_tool_test() asserter = Asserter(self, completed_process, self.test_runner) - if is_dot_available(dot=None): + if dot_present: expected_stdout = f"LOBSTER HTML report written to {output_filename}\n" else: diff --git a/tests_system/lobster_html_report/test_input_file.py b/tests_system/lobster_html_report/test_input_file.py index 84205e216..851c9ada6 100644 --- a/tests_system/lobster_html_report/test_input_file.py +++ b/tests_system/lobster_html_report/test_input_file.py @@ -40,7 +40,11 @@ def test_valid_lobster_file_succeeds(self): # lobster-trace: html_req.Valid_Lobster_File # lobster-trace: UseCases.Missing_tracing_policy_violation_in_output """Verify the tool runs successfully with a valid .lobster file.""" - output_filename = "is_actually_html.html" + dot_present = is_dot_available(dot=None) + if dot_present: + output_filename = "is_actually_html_tracing_policy.html" + else: + output_filename = "is_actually_html.html" valid_inputfile = self._data_directory / "awesome.lobster" self.output_dir = self.create_output_directory_and_copy_expected( @@ -57,7 +61,7 @@ def test_valid_lobster_file_succeeds(self): completed_process = self.test_runner.run_tool_test() asserter = Asserter(self, completed_process, self.test_runner) - if is_dot_available(dot=None): + if dot_present: expected_stdout = f"LOBSTER HTML report written to {output_filename}\n" else: @@ -115,7 +119,11 @@ def test_valid_md_lobster_file_succeeds(self): # lobster-trace: html_req.Valid_Lobster_File_With_Md_Content # lobster-trace: UseCases.Missing_tracing_policy_violation_in_output """Verify tool runs successfully with a valid .lobster file with md content.""" - output_filename = "to_render_md_content.html" + dot_present = is_dot_available(dot=None) + if dot_present: + output_filename = "to_render_md_content_tracing_policy.html" + else: + output_filename = "to_render_md_content.html" valid_inputfile = self._data_directory / "to_render_md_content.lobster" self.output_dir = self.create_output_directory_and_copy_expected( @@ -132,7 +140,7 @@ def test_valid_md_lobster_file_succeeds(self): completed_process = self.test_runner.run_tool_test() asserter = Asserter(self, completed_process, self.test_runner) - if is_dot_available(dot=None): + if dot_present: expected_stdout = f"LOBSTER HTML report written to {output_filename}\n" else: diff --git a/tests_system/lobster_html_report/test_online_report_input.py b/tests_system/lobster_html_report/test_online_report_input.py index 051e99137..5e2237ad1 100644 --- a/tests_system/lobster_html_report/test_online_report_input.py +++ b/tests_system/lobster_html_report/test_online_report_input.py @@ -1,5 +1,6 @@ from pathlib import Path import unittest +from lobster.tools.core.html_report.html_report import is_dot_available from tests_system.lobster_html_report.lobster_UI_system_test_case_base import ( LobsterUISystemTestCaseBase) from tests_system.asserter import Asserter @@ -29,7 +30,11 @@ def test_online_report_input(self): the online report file is created using complex tracing policy which contains requirements, code and tests. """ - output_filename = "pizza_online.html" + dot_present = is_dot_available(dot=None) + if dot_present: + output_filename = "pizza_online_tracing_policy.html" + else: + output_filename = "pizza_online.html" valid_inputfile = self._data_directory / "pizza_online_report.lobster" self.output_dir = self.create_output_directory_and_copy_expected( diff --git a/tests_system/lobster_json/data/apple-banana_no_schema.lobster b/tests_system/lobster_json/data/apple-banana_no_schema.lobster new file mode 100644 index 000000000..13c2ca680 --- /dev/null +++ b/tests_system/lobster_json/data/apple-banana_no_schema.lobster @@ -0,0 +1,34 @@ +{ + "data": [ + { + "tag": "json valid-json.txt:banana", + "location": { + "kind": "file", + "file": "valid-json.txt", + "line": null, + "column": null + }, + "name": "valid-json.txt:banana", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "json valid-mini.json:apple", + "location": { + "kind": "file", + "file": "valid-mini.json", + "line": null, + "column": null + }, + "name": "valid-mini.json:apple", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster-json", + "version": 5 +} diff --git a/tests_system/lobster_json/data/banana_no_schema.lobster b/tests_system/lobster_json/data/banana_no_schema.lobster new file mode 100644 index 000000000..8a3b46a83 --- /dev/null +++ b/tests_system/lobster_json/data/banana_no_schema.lobster @@ -0,0 +1,20 @@ +{ + "data": [ + { + "tag": "json valid-json.txt:banana", + "location": { + "kind": "file", + "file": "valid-json.txt", + "line": null, + "column": null + }, + "name": "valid-json.txt:banana", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster-json", + "version": 5 +} diff --git a/tests_system/lobster_json/data/basic-with-name_no_schema.lobster b/tests_system/lobster_json/data/basic-with-name_no_schema.lobster new file mode 100644 index 000000000..ba4c9fe66 --- /dev/null +++ b/tests_system/lobster_json/data/basic-with-name_no_schema.lobster @@ -0,0 +1,100 @@ +{ + "data": [ + { + "tag": "json basic.json:Test_1", + "location": { + "kind": "file", + "file": "basic.json", + "line": null, + "column": null + }, + "name": "basic.json:Test_1", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.req1" + ] + }, + { + "tag": "json basic.json:Test_2", + "location": { + "kind": "file", + "file": "basic.json", + "line": null, + "column": null + }, + "name": "basic.json:Test_2", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "json basic.json:Test_3", + "location": { + "kind": "file", + "file": "basic.json", + "line": null, + "column": null + }, + "name": "basic.json:Test_3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.req2", + "req example.req3" + ] + }, + { + "tag": "json basic.json:Test_4", + "location": { + "kind": "file", + "file": "basic.json", + "line": null, + "column": null + }, + "name": "basic.json:Test_4", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "json basic.json:Test_5", + "location": { + "kind": "file", + "file": "basic.json", + "line": null, + "column": null + }, + "name": "basic.json:Test_5", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.req4" + ] + }, + { + "tag": "json basic.json:Test_6", + "location": { + "kind": "file", + "file": "basic.json", + "line": null, + "column": null + }, + "name": "basic.json:Test_6", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster-json", + "version": 5 +} diff --git a/tests_system/lobster_json/data/basic-without-name-nested_no_schema.lobster b/tests_system/lobster_json/data/basic-without-name-nested_no_schema.lobster new file mode 100644 index 000000000..49aac3c60 --- /dev/null +++ b/tests_system/lobster_json/data/basic-without-name-nested_no_schema.lobster @@ -0,0 +1,100 @@ +{ + "data": [ + { + "tag": "json ./one/two/basic.json:one.two.basic.1", + "location": { + "kind": "file", + "file": "./one/two/basic.json", + "line": null, + "column": null + }, + "name": "./one/two/basic.json:one.two.basic.1", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.req1" + ] + }, + { + "tag": "json ./one/two/basic.json:one.two.basic.2", + "location": { + "kind": "file", + "file": "./one/two/basic.json", + "line": null, + "column": null + }, + "name": "./one/two/basic.json:one.two.basic.2", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "json ./one/two/basic.json:one.two.basic.3", + "location": { + "kind": "file", + "file": "./one/two/basic.json", + "line": null, + "column": null + }, + "name": "./one/two/basic.json:one.two.basic.3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.req2", + "req example.req3" + ] + }, + { + "tag": "json ./one/two/basic.json:one.two.basic.4", + "location": { + "kind": "file", + "file": "./one/two/basic.json", + "line": null, + "column": null + }, + "name": "./one/two/basic.json:one.two.basic.4", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "json ./one/two/basic.json:one.two.basic.5", + "location": { + "kind": "file", + "file": "./one/two/basic.json", + "line": null, + "column": null + }, + "name": "./one/two/basic.json:one.two.basic.5", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.req4" + ] + }, + { + "tag": "json ./one/two/basic.json:one.two.basic.6", + "location": { + "kind": "file", + "file": "./one/two/basic.json", + "line": null, + "column": null + }, + "name": "./one/two/basic.json:one.two.basic.6", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster-json", + "version": 5 +} diff --git a/tests_system/lobster_json/data/basic-without-name_no_schema.lobster b/tests_system/lobster_json/data/basic-without-name_no_schema.lobster new file mode 100644 index 000000000..326fc413e --- /dev/null +++ b/tests_system/lobster_json/data/basic-without-name_no_schema.lobster @@ -0,0 +1,100 @@ +{ + "data": [ + { + "tag": "json basic.json:basic.1", + "location": { + "kind": "file", + "file": "basic.json", + "line": null, + "column": null + }, + "name": "basic.json:basic.1", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.req1" + ] + }, + { + "tag": "json basic.json:basic.2", + "location": { + "kind": "file", + "file": "basic.json", + "line": null, + "column": null + }, + "name": "basic.json:basic.2", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "json basic.json:basic.3", + "location": { + "kind": "file", + "file": "basic.json", + "line": null, + "column": null + }, + "name": "basic.json:basic.3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.req2", + "req example.req3" + ] + }, + { + "tag": "json basic.json:basic.4", + "location": { + "kind": "file", + "file": "basic.json", + "line": null, + "column": null + }, + "name": "basic.json:basic.4", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "json basic.json:basic.5", + "location": { + "kind": "file", + "file": "basic.json", + "line": null, + "column": null + }, + "name": "basic.json:basic.5", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.req4" + ] + }, + { + "tag": "json basic.json:basic.6", + "location": { + "kind": "file", + "file": "basic.json", + "line": null, + "column": null + }, + "name": "basic.json:basic.6", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster-json", + "version": 5 +} diff --git a/tests_system/lobster_json/data/both_inputs_with_extra_files_no_schema.lobster b/tests_system/lobster_json/data/both_inputs_with_extra_files_no_schema.lobster new file mode 100644 index 000000000..2a902890e --- /dev/null +++ b/tests_system/lobster_json/data/both_inputs_with_extra_files_no_schema.lobster @@ -0,0 +1,207 @@ +{ + "data": [ + { + "tag": "json basic.json:Test_1", + "location": { + "kind": "file", + "file": "basic.json", + "line": null, + "column": null + }, + "name": "basic.json:Test_1", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.req1" + ] + }, + { + "tag": "json basic.json:Test_2", + "location": { + "kind": "file", + "file": "basic.json", + "line": null, + "column": null + }, + "name": "basic.json:Test_2", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "json basic.json:Test_3", + "location": { + "kind": "file", + "file": "basic.json", + "line": null, + "column": null + }, + "name": "basic.json:Test_3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.req2", + "req example.req3" + ] + }, + { + "tag": "json basic.json:Test_4", + "location": { + "kind": "file", + "file": "basic.json", + "line": null, + "column": null + }, + "name": "basic.json:Test_4", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "json basic.json:Test_5", + "location": { + "kind": "file", + "file": "basic.json", + "line": null, + "column": null + }, + "name": "basic.json:Test_5", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.req4" + ] + }, + { + "tag": "json basic.json:Test_6", + "location": { + "kind": "file", + "file": "basic.json", + "line": null, + "column": null + }, + "name": "basic.json:Test_6", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "json input_dir/dir_file1.json:empty_test", + "location": { + "kind": "file", + "file": "input_dir/dir_file1.json", + "line": null, + "column": null + }, + "name": "input_dir/dir_file1.json:empty_test", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req empty.req1" + ] + }, + { + "tag": "json input_dir/dir_file2.json:testDef", + "location": { + "kind": "file", + "file": "input_dir/dir_file2.json", + "line": null, + "column": null + }, + "name": "input_dir/dir_file2.json:testDef", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "json input_with_attributes.json:testDef_demo", + "location": { + "kind": "file", + "file": "input_with_attributes.json", + "line": null, + "column": null + }, + "name": "input_with_attributes.json:testDef_demo", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "json multi1.json:apple", + "location": { + "kind": "file", + "file": "multi1.json", + "line": null, + "column": null + }, + "name": "multi1.json:apple", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.req1" + ] + }, + { + "tag": "json multi1.json:banana", + "location": { + "kind": "file", + "file": "multi1.json", + "line": null, + "column": null + }, + "name": "multi1.json:banana", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "json multi1.json:apple", + "location": { + "kind": "file", + "file": "multi1.json", + "line": null, + "column": null + }, + "name": "multi1.json:apple", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.req1" + ] + }, + { + "tag": "json multi1.json:banana", + "location": { + "kind": "file", + "file": "multi1.json", + "line": null, + "column": null + }, + "name": "multi1.json:banana", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster-json", + "version": 5 +} diff --git a/tests_system/lobster_json/data/empty_directory_no_schema.lobster b/tests_system/lobster_json/data/empty_directory_no_schema.lobster new file mode 100644 index 000000000..63ce0706f --- /dev/null +++ b/tests_system/lobster_json/data/empty_directory_no_schema.lobster @@ -0,0 +1,5 @@ +{ + "data": [], + "generator": "lobster-json", + "version": 5 +} diff --git a/tests_system/lobster_json/data/empty_no_schema.lobster b/tests_system/lobster_json/data/empty_no_schema.lobster new file mode 100644 index 000000000..63ce0706f --- /dev/null +++ b/tests_system/lobster_json/data/empty_no_schema.lobster @@ -0,0 +1,5 @@ +{ + "data": [], + "generator": "lobster-json", + "version": 5 +} diff --git a/tests_system/lobster_json/data/file_and_nested_directories_no_schema.lobster b/tests_system/lobster_json/data/file_and_nested_directories_no_schema.lobster new file mode 100644 index 000000000..5e65146d0 --- /dev/null +++ b/tests_system/lobster_json/data/file_and_nested_directories_no_schema.lobster @@ -0,0 +1,269 @@ +{ + "data": [ + { + "tag": "json ./inputs_non_critical.json:Non_Critical_1", + "location": { + "kind": "file", + "file": "./inputs_non_critical.json", + "line": null, + "column": null + }, + "name": "./inputs_non_critical.json:Non_Critical_1", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Blind Spot Monitoring", + "req Rear Cross Traffic Alert" + ] + }, + { + "tag": "json ./inputs_non_critical.json:Non_Critical_2", + "location": { + "kind": "file", + "file": "./inputs_non_critical.json", + "line": null, + "column": null + }, + "name": "./inputs_non_critical.json:Non_Critical_2", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Automatic Emergency Braking", + "req Collision Warning" + ] + }, + { + "tag": "json ./inputs_non_critical.json:Non_Critical_3", + "location": { + "kind": "file", + "file": "./inputs_non_critical.json", + "line": null, + "column": null + }, + "name": "./inputs_non_critical.json:Non_Critical_3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Parking Sensors", + "req Rearview Camera" + ] + }, + { + "tag": "json ./inputs_safety.json:Safety_Features_1", + "location": { + "kind": "file", + "file": "./inputs_safety.json", + "line": null, + "column": null + }, + "name": "./inputs_safety.json:Safety_Features_1", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Air Conditioning", + "req Climate Control" + ] + }, + { + "tag": "json ./inputs_safety.json:Safety_Features_2", + "location": { + "kind": "file", + "file": "./inputs_safety.json", + "line": null, + "column": null + }, + "name": "./inputs_safety.json:Safety_Features_2", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Cruise Control", + "req Adaptive Cruise Control" + ] + }, + { + "tag": "json ./inputs_safety.json:Safety_Features_3", + "location": { + "kind": "file", + "file": "./inputs_safety.json", + "line": null, + "column": null + }, + "name": "./inputs_safety.json:Safety_Features_3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Lane Assist", + "req Lane Departure Warning" + ] + }, + { + "tag": "json ./inputs_safety.json:Safety_Features_4", + "location": { + "kind": "file", + "file": "./inputs_safety.json", + "line": null, + "column": null + }, + "name": "./inputs_safety.json:Safety_Features_4", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Blind Spot Monitoring", + "req Rear Cross Traffic Alert" + ] + }, + { + "tag": "json ./inputs_safety.json:Safety_Features_5", + "location": { + "kind": "file", + "file": "./inputs_safety.json", + "line": null, + "column": null + }, + "name": "./inputs_safety.json:Safety_Features_5", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Automatic Emergency Braking", + "req Collision Warning" + ] + }, + { + "tag": "json ./inputs_safety.json:Safety_Features_6", + "location": { + "kind": "file", + "file": "./inputs_safety.json", + "line": null, + "column": null + }, + "name": "./inputs_safety.json:Safety_Features_6", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Parking Sensors", + "req Rearview Camera" + ] + }, + { + "tag": "json ./inputs_safety.json:Safety_Features_7", + "location": { + "kind": "file", + "file": "./inputs_safety.json", + "line": null, + "column": null + }, + "name": "./inputs_safety.json:Safety_Features_7", + "messages": [], + "just_up": [ + "Testing justification attribute which is only relevant for tag_attribute and not name_attribute" + ], + "just_down": [], + "just_global": [] + }, + { + "tag": "json ./nested_directory_data/car_software_critical.json:Emergency Braking System Activation", + "location": { + "kind": "file", + "file": "./nested_directory_data/car_software_critical.json", + "line": null, + "column": null + }, + "name": "./nested_directory_data/car_software_critical.json:Emergency Braking System Activation", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req ADSF-001" + ] + }, + { + "tag": "json ./nested_directory_data/car_software_critical.json:Lane Keeping Assist on Curved Roads", + "location": { + "kind": "file", + "file": "./nested_directory_data/car_software_critical.json", + "line": null, + "column": null + }, + "name": "./nested_directory_data/car_software_critical.json:Lane Keeping Assist on Curved Roads", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req ADSF-002" + ] + }, + { + "tag": "json ./nested_directory_data/car_software_critical.json:Adaptive Cruise Control Distance Maintenance", + "location": { + "kind": "file", + "file": "./nested_directory_data/car_software_critical.json", + "line": null, + "column": null + }, + "name": "./nested_directory_data/car_software_critical.json:Adaptive Cruise Control Distance Maintenance", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req ADSF-003" + ] + }, + { + "tag": "json ./nested_directory_data/car_software_critical.json:Pedestrian Detection and Response", + "location": { + "kind": "file", + "file": "./nested_directory_data/car_software_critical.json", + "line": null, + "column": null + }, + "name": "./nested_directory_data/car_software_critical.json:Pedestrian Detection and Response", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req ADSF-004" + ] + }, + { + "tag": "json ./nested_directory_data/car_software_critical.json:Driver Alertness Monitoring System Assessment", + "location": { + "kind": "file", + "file": "./nested_directory_data/car_software_critical.json", + "line": null, + "column": null + }, + "name": "./nested_directory_data/car_software_critical.json:Driver Alertness Monitoring System Assessment", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req ADSF-005" + ] + } + ], + "generator": "lobster-json", + "version": 5 +} diff --git a/tests_system/lobster_json/data/files_from_cwd_no_schema.lobster b/tests_system/lobster_json/data/files_from_cwd_no_schema.lobster new file mode 100644 index 000000000..f854fbe3f --- /dev/null +++ b/tests_system/lobster_json/data/files_from_cwd_no_schema.lobster @@ -0,0 +1,184 @@ +{ + "data": [ + { + "tag": "json ./inputs_non_critical.json:Non_Critical_1", + "location": { + "kind": "file", + "file": "./inputs_non_critical.json", + "line": null, + "column": null + }, + "name": "./inputs_non_critical.json:Non_Critical_1", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Blind Spot Monitoring", + "req Rear Cross Traffic Alert" + ] + }, + { + "tag": "json ./inputs_non_critical.json:Non_Critical_2", + "location": { + "kind": "file", + "file": "./inputs_non_critical.json", + "line": null, + "column": null + }, + "name": "./inputs_non_critical.json:Non_Critical_2", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Automatic Emergency Braking", + "req Collision Warning" + ] + }, + { + "tag": "json ./inputs_non_critical.json:Non_Critical_3", + "location": { + "kind": "file", + "file": "./inputs_non_critical.json", + "line": null, + "column": null + }, + "name": "./inputs_non_critical.json:Non_Critical_3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Parking Sensors", + "req Rearview Camera" + ] + }, + { + "tag": "json ./inputs_safety.json:Safety_Features_1", + "location": { + "kind": "file", + "file": "./inputs_safety.json", + "line": null, + "column": null + }, + "name": "./inputs_safety.json:Safety_Features_1", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Air Conditioning", + "req Climate Control" + ] + }, + { + "tag": "json ./inputs_safety.json:Safety_Features_2", + "location": { + "kind": "file", + "file": "./inputs_safety.json", + "line": null, + "column": null + }, + "name": "./inputs_safety.json:Safety_Features_2", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Cruise Control", + "req Adaptive Cruise Control" + ] + }, + { + "tag": "json ./inputs_safety.json:Safety_Features_3", + "location": { + "kind": "file", + "file": "./inputs_safety.json", + "line": null, + "column": null + }, + "name": "./inputs_safety.json:Safety_Features_3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Lane Assist", + "req Lane Departure Warning" + ] + }, + { + "tag": "json ./inputs_safety.json:Safety_Features_4", + "location": { + "kind": "file", + "file": "./inputs_safety.json", + "line": null, + "column": null + }, + "name": "./inputs_safety.json:Safety_Features_4", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Blind Spot Monitoring", + "req Rear Cross Traffic Alert" + ] + }, + { + "tag": "json ./inputs_safety.json:Safety_Features_5", + "location": { + "kind": "file", + "file": "./inputs_safety.json", + "line": null, + "column": null + }, + "name": "./inputs_safety.json:Safety_Features_5", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Automatic Emergency Braking", + "req Collision Warning" + ] + }, + { + "tag": "json ./inputs_safety.json:Safety_Features_6", + "location": { + "kind": "file", + "file": "./inputs_safety.json", + "line": null, + "column": null + }, + "name": "./inputs_safety.json:Safety_Features_6", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Parking Sensors", + "req Rearview Camera" + ] + }, + { + "tag": "json ./inputs_safety.json:Safety_Features_7", + "location": { + "kind": "file", + "file": "./inputs_safety.json", + "line": null, + "column": null + }, + "name": "./inputs_safety.json:Safety_Features_7", + "messages": [], + "just_up": [ + "Testing justification attribute which is only relevant for tag_attribute and not name_attribute" + ], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster-json", + "version": 5 +} diff --git a/tests_system/lobster_json/data/inputs_from_file_no_schema.lobster b/tests_system/lobster_json/data/inputs_from_file_no_schema.lobster new file mode 100644 index 000000000..59a2e8472 --- /dev/null +++ b/tests_system/lobster_json/data/inputs_from_file_no_schema.lobster @@ -0,0 +1,256 @@ +{ + "data": [ + { + "tag": "json inputs_cosmetic.json:Cosmetic_Features_1", + "location": { + "kind": "file", + "file": "inputs_cosmetic.json", + "line": null, + "column": null + }, + "name": "inputs_cosmetic.json:Cosmetic_Features_1", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Keyless Entry", + "req Push Button Start" + ] + }, + { + "tag": "json inputs_cosmetic.json:Cosmetic_Features_2", + "location": { + "kind": "file", + "file": "inputs_cosmetic.json", + "line": null, + "column": null + }, + "name": "inputs_cosmetic.json:Cosmetic_Features_2", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Navigation System", + "req Touchscreen Display" + ] + }, + { + "tag": "json inputs_cosmetic.json:Cosmetic_Features_3", + "location": { + "kind": "file", + "file": "inputs_cosmetic.json", + "line": null, + "column": null + }, + "name": "inputs_cosmetic.json:Cosmetic_Features_3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Bluetooth Connectivity", + "req Voice Control" + ] + }, + { + "tag": "json inputs_cosmetic.json:Cosmetic_Features_4", + "location": { + "kind": "file", + "file": "inputs_cosmetic.json", + "line": null, + "column": null + }, + "name": "inputs_cosmetic.json:Cosmetic_Features_4", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Heated Seats", + "req Ventilated Seats" + ] + }, + { + "tag": "json inputs_non_critical.json:Non_Critical_1", + "location": { + "kind": "file", + "file": "inputs_non_critical.json", + "line": null, + "column": null + }, + "name": "inputs_non_critical.json:Non_Critical_1", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Blind Spot Monitoring", + "req Rear Cross Traffic Alert" + ] + }, + { + "tag": "json inputs_non_critical.json:Non_Critical_2", + "location": { + "kind": "file", + "file": "inputs_non_critical.json", + "line": null, + "column": null + }, + "name": "inputs_non_critical.json:Non_Critical_2", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Automatic Emergency Braking", + "req Collision Warning" + ] + }, + { + "tag": "json inputs_non_critical.json:Non_Critical_3", + "location": { + "kind": "file", + "file": "inputs_non_critical.json", + "line": null, + "column": null + }, + "name": "inputs_non_critical.json:Non_Critical_3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Parking Sensors", + "req Rearview Camera" + ] + }, + { + "tag": "json inputs_safety.json:Safety_Features_1", + "location": { + "kind": "file", + "file": "inputs_safety.json", + "line": null, + "column": null + }, + "name": "inputs_safety.json:Safety_Features_1", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Air Conditioning", + "req Climate Control" + ] + }, + { + "tag": "json inputs_safety.json:Safety_Features_2", + "location": { + "kind": "file", + "file": "inputs_safety.json", + "line": null, + "column": null + }, + "name": "inputs_safety.json:Safety_Features_2", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Cruise Control", + "req Adaptive Cruise Control" + ] + }, + { + "tag": "json inputs_safety.json:Safety_Features_3", + "location": { + "kind": "file", + "file": "inputs_safety.json", + "line": null, + "column": null + }, + "name": "inputs_safety.json:Safety_Features_3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Lane Assist", + "req Lane Departure Warning" + ] + }, + { + "tag": "json inputs_safety.json:Safety_Features_4", + "location": { + "kind": "file", + "file": "inputs_safety.json", + "line": null, + "column": null + }, + "name": "inputs_safety.json:Safety_Features_4", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Blind Spot Monitoring", + "req Rear Cross Traffic Alert" + ] + }, + { + "tag": "json inputs_safety.json:Safety_Features_5", + "location": { + "kind": "file", + "file": "inputs_safety.json", + "line": null, + "column": null + }, + "name": "inputs_safety.json:Safety_Features_5", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Automatic Emergency Braking", + "req Collision Warning" + ] + }, + { + "tag": "json inputs_safety.json:Safety_Features_6", + "location": { + "kind": "file", + "file": "inputs_safety.json", + "line": null, + "column": null + }, + "name": "inputs_safety.json:Safety_Features_6", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Parking Sensors", + "req Rearview Camera" + ] + }, + { + "tag": "json inputs_safety.json:Safety_Features_7", + "location": { + "kind": "file", + "file": "inputs_safety.json", + "line": null, + "column": null + }, + "name": "inputs_safety.json:Safety_Features_7", + "messages": [], + "just_up": [ + "Testing justification attribute which is only relevant for tag_attribute and not name_attribute" + ], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster-json", + "version": 5 +} diff --git a/tests_system/lobster_json/data/inputs_no_schema.lobster b/tests_system/lobster_json/data/inputs_no_schema.lobster new file mode 100644 index 000000000..59a2e8472 --- /dev/null +++ b/tests_system/lobster_json/data/inputs_no_schema.lobster @@ -0,0 +1,256 @@ +{ + "data": [ + { + "tag": "json inputs_cosmetic.json:Cosmetic_Features_1", + "location": { + "kind": "file", + "file": "inputs_cosmetic.json", + "line": null, + "column": null + }, + "name": "inputs_cosmetic.json:Cosmetic_Features_1", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Keyless Entry", + "req Push Button Start" + ] + }, + { + "tag": "json inputs_cosmetic.json:Cosmetic_Features_2", + "location": { + "kind": "file", + "file": "inputs_cosmetic.json", + "line": null, + "column": null + }, + "name": "inputs_cosmetic.json:Cosmetic_Features_2", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Navigation System", + "req Touchscreen Display" + ] + }, + { + "tag": "json inputs_cosmetic.json:Cosmetic_Features_3", + "location": { + "kind": "file", + "file": "inputs_cosmetic.json", + "line": null, + "column": null + }, + "name": "inputs_cosmetic.json:Cosmetic_Features_3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Bluetooth Connectivity", + "req Voice Control" + ] + }, + { + "tag": "json inputs_cosmetic.json:Cosmetic_Features_4", + "location": { + "kind": "file", + "file": "inputs_cosmetic.json", + "line": null, + "column": null + }, + "name": "inputs_cosmetic.json:Cosmetic_Features_4", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Heated Seats", + "req Ventilated Seats" + ] + }, + { + "tag": "json inputs_non_critical.json:Non_Critical_1", + "location": { + "kind": "file", + "file": "inputs_non_critical.json", + "line": null, + "column": null + }, + "name": "inputs_non_critical.json:Non_Critical_1", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Blind Spot Monitoring", + "req Rear Cross Traffic Alert" + ] + }, + { + "tag": "json inputs_non_critical.json:Non_Critical_2", + "location": { + "kind": "file", + "file": "inputs_non_critical.json", + "line": null, + "column": null + }, + "name": "inputs_non_critical.json:Non_Critical_2", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Automatic Emergency Braking", + "req Collision Warning" + ] + }, + { + "tag": "json inputs_non_critical.json:Non_Critical_3", + "location": { + "kind": "file", + "file": "inputs_non_critical.json", + "line": null, + "column": null + }, + "name": "inputs_non_critical.json:Non_Critical_3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Parking Sensors", + "req Rearview Camera" + ] + }, + { + "tag": "json inputs_safety.json:Safety_Features_1", + "location": { + "kind": "file", + "file": "inputs_safety.json", + "line": null, + "column": null + }, + "name": "inputs_safety.json:Safety_Features_1", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Air Conditioning", + "req Climate Control" + ] + }, + { + "tag": "json inputs_safety.json:Safety_Features_2", + "location": { + "kind": "file", + "file": "inputs_safety.json", + "line": null, + "column": null + }, + "name": "inputs_safety.json:Safety_Features_2", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Cruise Control", + "req Adaptive Cruise Control" + ] + }, + { + "tag": "json inputs_safety.json:Safety_Features_3", + "location": { + "kind": "file", + "file": "inputs_safety.json", + "line": null, + "column": null + }, + "name": "inputs_safety.json:Safety_Features_3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Lane Assist", + "req Lane Departure Warning" + ] + }, + { + "tag": "json inputs_safety.json:Safety_Features_4", + "location": { + "kind": "file", + "file": "inputs_safety.json", + "line": null, + "column": null + }, + "name": "inputs_safety.json:Safety_Features_4", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Blind Spot Monitoring", + "req Rear Cross Traffic Alert" + ] + }, + { + "tag": "json inputs_safety.json:Safety_Features_5", + "location": { + "kind": "file", + "file": "inputs_safety.json", + "line": null, + "column": null + }, + "name": "inputs_safety.json:Safety_Features_5", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Automatic Emergency Braking", + "req Collision Warning" + ] + }, + { + "tag": "json inputs_safety.json:Safety_Features_6", + "location": { + "kind": "file", + "file": "inputs_safety.json", + "line": null, + "column": null + }, + "name": "inputs_safety.json:Safety_Features_6", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Parking Sensors", + "req Rearview Camera" + ] + }, + { + "tag": "json inputs_safety.json:Safety_Features_7", + "location": { + "kind": "file", + "file": "inputs_safety.json", + "line": null, + "column": null + }, + "name": "inputs_safety.json:Safety_Features_7", + "messages": [], + "just_up": [ + "Testing justification attribute which is only relevant for tag_attribute and not name_attribute" + ], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster-json", + "version": 5 +} diff --git a/tests_system/lobster_json/data/justification_attribute_given_no_schema.lobster b/tests_system/lobster_json/data/justification_attribute_given_no_schema.lobster new file mode 100644 index 000000000..d15688c4a --- /dev/null +++ b/tests_system/lobster_json/data/justification_attribute_given_no_schema.lobster @@ -0,0 +1,128 @@ +{ + "data": [ + { + "tag": "json justification_attribute_given.json:Safety_Features_1", + "location": { + "kind": "file", + "file": "justification_attribute_given.json", + "line": null, + "column": null + }, + "name": "justification_attribute_given.json:Safety_Features_1", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Air Conditioning", + "req Climate Control" + ] + }, + { + "tag": "json justification_attribute_given.json:Safety_Features_2", + "location": { + "kind": "file", + "file": "justification_attribute_given.json", + "line": null, + "column": null + }, + "name": "justification_attribute_given.json:Safety_Features_2", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Cruise Control", + "req Adaptive Cruise Control" + ] + }, + { + "tag": "json justification_attribute_given.json:Safety_Features_3", + "location": { + "kind": "file", + "file": "justification_attribute_given.json", + "line": null, + "column": null + }, + "name": "justification_attribute_given.json:Safety_Features_3", + "messages": [], + "just_up": [ + "Testing justification attribute which is only relevant for tag_attribute and not name_attribute" + ], + "just_down": [], + "just_global": [] + }, + { + "tag": "json justification_attribute_given.json:Safety_Features_4", + "location": { + "kind": "file", + "file": "justification_attribute_given.json", + "line": null, + "column": null + }, + "name": "justification_attribute_given.json:Safety_Features_4", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Blind Spot Monitoring", + "req Rear Cross Traffic Alert" + ] + }, + { + "tag": "json justification_attribute_given.json:Safety_Features_5", + "location": { + "kind": "file", + "file": "justification_attribute_given.json", + "line": null, + "column": null + }, + "name": "justification_attribute_given.json:Safety_Features_5", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Automatic Emergency Braking", + "req Collision Warning" + ] + }, + { + "tag": "json justification_attribute_given.json:Safety_Features_6", + "location": { + "kind": "file", + "file": "justification_attribute_given.json", + "line": null, + "column": null + }, + "name": "justification_attribute_given.json:Safety_Features_6", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Parking Sensors", + "req Rearview Camera" + ] + }, + { + "tag": "json justification_attribute_given.json:Safety_Features_7", + "location": { + "kind": "file", + "file": "justification_attribute_given.json", + "line": null, + "column": null + }, + "name": "justification_attribute_given.json:Safety_Features_7", + "messages": [], + "just_up": [ + "Testing justification attribute which is only relevant for tag_attribute and not name_attribute" + ], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster-json", + "version": 5 +} diff --git a/tests_system/lobster_json/data/justification_attribute_irrelavent_no_schema.lobster b/tests_system/lobster_json/data/justification_attribute_irrelavent_no_schema.lobster new file mode 100644 index 000000000..3df037923 --- /dev/null +++ b/tests_system/lobster_json/data/justification_attribute_irrelavent_no_schema.lobster @@ -0,0 +1,124 @@ +{ + "data": [ + { + "tag": "json justification_attribute_given.json:Safety_Features_1", + "location": { + "kind": "file", + "file": "justification_attribute_given.json", + "line": null, + "column": null + }, + "name": "justification_attribute_given.json:Safety_Features_1", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Air Conditioning", + "req Climate Control" + ] + }, + { + "tag": "json justification_attribute_given.json:Safety_Features_2", + "location": { + "kind": "file", + "file": "justification_attribute_given.json", + "line": null, + "column": null + }, + "name": "justification_attribute_given.json:Safety_Features_2", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Cruise Control", + "req Adaptive Cruise Control" + ] + }, + { + "tag": "json justification_attribute_given.json:Safety_Features_3", + "location": { + "kind": "file", + "file": "justification_attribute_given.json", + "line": null, + "column": null + }, + "name": "justification_attribute_given.json:Safety_Features_3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "json justification_attribute_given.json:Safety_Features_4", + "location": { + "kind": "file", + "file": "justification_attribute_given.json", + "line": null, + "column": null + }, + "name": "justification_attribute_given.json:Safety_Features_4", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Blind Spot Monitoring", + "req Rear Cross Traffic Alert" + ] + }, + { + "tag": "json justification_attribute_given.json:Safety_Features_5", + "location": { + "kind": "file", + "file": "justification_attribute_given.json", + "line": null, + "column": null + }, + "name": "justification_attribute_given.json:Safety_Features_5", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Automatic Emergency Braking", + "req Collision Warning" + ] + }, + { + "tag": "json justification_attribute_given.json:Safety_Features_6", + "location": { + "kind": "file", + "file": "justification_attribute_given.json", + "line": null, + "column": null + }, + "name": "justification_attribute_given.json:Safety_Features_6", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Parking Sensors", + "req Rearview Camera" + ] + }, + { + "tag": "json justification_attribute_given.json:Safety_Features_7", + "location": { + "kind": "file", + "file": "justification_attribute_given.json", + "line": null, + "column": null + }, + "name": "justification_attribute_given.json:Safety_Features_7", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster-json", + "version": 5 +} diff --git a/tests_system/lobster_json/data/justification_attribute_not_given_no_schema.lobster b/tests_system/lobster_json/data/justification_attribute_not_given_no_schema.lobster new file mode 100644 index 000000000..3df037923 --- /dev/null +++ b/tests_system/lobster_json/data/justification_attribute_not_given_no_schema.lobster @@ -0,0 +1,124 @@ +{ + "data": [ + { + "tag": "json justification_attribute_given.json:Safety_Features_1", + "location": { + "kind": "file", + "file": "justification_attribute_given.json", + "line": null, + "column": null + }, + "name": "justification_attribute_given.json:Safety_Features_1", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Air Conditioning", + "req Climate Control" + ] + }, + { + "tag": "json justification_attribute_given.json:Safety_Features_2", + "location": { + "kind": "file", + "file": "justification_attribute_given.json", + "line": null, + "column": null + }, + "name": "justification_attribute_given.json:Safety_Features_2", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Cruise Control", + "req Adaptive Cruise Control" + ] + }, + { + "tag": "json justification_attribute_given.json:Safety_Features_3", + "location": { + "kind": "file", + "file": "justification_attribute_given.json", + "line": null, + "column": null + }, + "name": "justification_attribute_given.json:Safety_Features_3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "json justification_attribute_given.json:Safety_Features_4", + "location": { + "kind": "file", + "file": "justification_attribute_given.json", + "line": null, + "column": null + }, + "name": "justification_attribute_given.json:Safety_Features_4", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Blind Spot Monitoring", + "req Rear Cross Traffic Alert" + ] + }, + { + "tag": "json justification_attribute_given.json:Safety_Features_5", + "location": { + "kind": "file", + "file": "justification_attribute_given.json", + "line": null, + "column": null + }, + "name": "justification_attribute_given.json:Safety_Features_5", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Automatic Emergency Braking", + "req Collision Warning" + ] + }, + { + "tag": "json justification_attribute_given.json:Safety_Features_6", + "location": { + "kind": "file", + "file": "justification_attribute_given.json", + "line": null, + "column": null + }, + "name": "justification_attribute_given.json:Safety_Features_6", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req Parking Sensors", + "req Rearview Camera" + ] + }, + { + "tag": "json justification_attribute_given.json:Safety_Features_7", + "location": { + "kind": "file", + "file": "justification_attribute_given.json", + "line": null, + "column": null + }, + "name": "justification_attribute_given.json:Safety_Features_7", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster-json", + "version": 5 +} diff --git a/tests_system/lobster_json/data/mix_inputs_no_schema.lobster b/tests_system/lobster_json/data/mix_inputs_no_schema.lobster new file mode 100644 index 000000000..df59993f2 --- /dev/null +++ b/tests_system/lobster_json/data/mix_inputs_no_schema.lobster @@ -0,0 +1,51 @@ +{ + "data": [ + { + "tag": "json input_dir_mix/test_one.json:Test_1", + "location": { + "kind": "file", + "file": "input_dir_mix/test_one.json", + "line": null, + "column": null + }, + "name": "input_dir_mix/test_one.json:Test_1", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "json input_dir_mix/test_one.json:Test_2", + "location": { + "kind": "file", + "file": "input_dir_mix/test_one.json", + "line": null, + "column": null + }, + "name": "input_dir_mix/test_one.json:Test_2", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.req4" + ] + }, + { + "tag": "json input_dir_mix/test_one.json:Test_3", + "location": { + "kind": "file", + "file": "input_dir_mix/test_one.json", + "line": null, + "column": null + }, + "name": "input_dir_mix/test_one.json:Test_3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster-json", + "version": 5 +} \ No newline at end of file diff --git a/tests_system/lobster_json/data/multi_config_no_schema.lobster b/tests_system/lobster_json/data/multi_config_no_schema.lobster new file mode 100644 index 000000000..016e86099 --- /dev/null +++ b/tests_system/lobster_json/data/multi_config_no_schema.lobster @@ -0,0 +1,131 @@ +{ + "data": [ + { + "tag": "json basic.json:Test_1", + "location": { + "kind": "file", + "file": "basic.json", + "line": null, + "column": null + }, + "name": "basic.json:Test_1", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.req1" + ] + }, + { + "tag": "json basic.json:Test_2", + "location": { + "kind": "file", + "file": "basic.json", + "line": null, + "column": null + }, + "name": "basic.json:Test_2", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "json basic.json:Test_3", + "location": { + "kind": "file", + "file": "basic.json", + "line": null, + "column": null + }, + "name": "basic.json:Test_3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.req2", + "req example.req3" + ] + }, + { + "tag": "json basic.json:Test_4", + "location": { + "kind": "file", + "file": "basic.json", + "line": null, + "column": null + }, + "name": "basic.json:Test_4", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "json basic.json:Test_5", + "location": { + "kind": "file", + "file": "basic.json", + "line": null, + "column": null + }, + "name": "basic.json:Test_5", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.req4" + ] + }, + { + "tag": "json basic.json:Test_6", + "location": { + "kind": "file", + "file": "basic.json", + "line": null, + "column": null + }, + "name": "basic.json:Test_6", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "json multi1.json:apple", + "location": { + "kind": "file", + "file": "multi1.json", + "line": null, + "column": null + }, + "name": "multi1.json:apple", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.req1" + ] + }, + { + "tag": "json multi1.json:banana", + "location": { + "kind": "file", + "file": "multi1.json", + "line": null, + "column": null + }, + "name": "multi1.json:banana", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster-json", + "version": 5 +} diff --git a/tests_system/lobster_json/data/multiple_files_mixed_ext_no_schema.lobster b/tests_system/lobster_json/data/multiple_files_mixed_ext_no_schema.lobster new file mode 100644 index 000000000..6ec24ca4a --- /dev/null +++ b/tests_system/lobster_json/data/multiple_files_mixed_ext_no_schema.lobster @@ -0,0 +1,238 @@ +{ + "data": [ + { + "tag": "json basic.json:Test_1", + "location": { + "kind": "file", + "file": "basic.json", + "line": null, + "column": null + }, + "name": "basic.json:Test_1", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.req1" + ] + }, + { + "tag": "json basic.json:Test_2", + "location": { + "kind": "file", + "file": "basic.json", + "line": null, + "column": null + }, + "name": "basic.json:Test_2", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "json basic.json:Test_3", + "location": { + "kind": "file", + "file": "basic.json", + "line": null, + "column": null + }, + "name": "basic.json:Test_3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.req2", + "req example.req3" + ] + }, + { + "tag": "json basic.json:Test_4", + "location": { + "kind": "file", + "file": "basic.json", + "line": null, + "column": null + }, + "name": "basic.json:Test_4", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "json basic.json:Test_5", + "location": { + "kind": "file", + "file": "basic.json", + "line": null, + "column": null + }, + "name": "basic.json:Test_5", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.req4" + ] + }, + { + "tag": "json basic.json:Test_6", + "location": { + "kind": "file", + "file": "basic.json", + "line": null, + "column": null + }, + "name": "basic.json:Test_6", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "json maroon.json:Chill_1", + "location": { + "kind": "file", + "file": "maroon.json", + "line": null, + "column": null + }, + "name": "maroon.json:Chill_1", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req fun.stuff" + ] + }, + { + "tag": "json maroon.json:Buddy_2", + "location": { + "kind": "file", + "file": "maroon.json", + "line": null, + "column": null + }, + "name": "maroon.json:Buddy_2", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "json maroon.json:Hangout_6", + "location": { + "kind": "file", + "file": "maroon.json", + "line": null, + "column": null + }, + "name": "maroon.json:Hangout_6", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "json multi1.json:apple", + "location": { + "kind": "file", + "file": "multi1.json", + "line": null, + "column": null + }, + "name": "multi1.json:apple", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.req1" + ] + }, + { + "tag": "json multi1.json:banana", + "location": { + "kind": "file", + "file": "multi1.json", + "line": null, + "column": null + }, + "name": "multi1.json:banana", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "json multi2_invalid.txt:red", + "location": { + "kind": "file", + "file": "multi2_invalid.txt", + "line": null, + "column": null + }, + "name": "multi2_invalid.txt:red", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req green" + ] + }, + { + "tag": "json multi3_invalid.abc:Sunset", + "location": { + "kind": "file", + "file": "multi3_invalid.abc", + "line": null, + "column": null + }, + "name": "multi3_invalid.abc:Sunset", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req cool.things" + ] + }, + { + "tag": "json multi3_invalid.abc:sunrise", + "location": { + "kind": "file", + "file": "multi3_invalid.abc", + "line": null, + "column": null + }, + "name": "multi3_invalid.abc:sunrise", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "json multi3_invalid.abc:Blueberry", + "location": { + "kind": "file", + "file": "multi3_invalid.abc", + "line": null, + "column": null + }, + "name": "multi3_invalid.abc:Blueberry", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster-json", + "version": 5 +} diff --git a/tests_system/lobster_json/data/no_schema.lobster b/tests_system/lobster_json/data/no_schema.lobster new file mode 100644 index 000000000..8501d41ff --- /dev/null +++ b/tests_system/lobster_json/data/no_schema.lobster @@ -0,0 +1,47 @@ +{ + "data": [ + { + "tag": "json specific_schema.json:This is a description 1.", + "location": { + "kind": "file", + "file": "specific_schema.json", + "line": null, + "column": null + }, + "name": "specific_schema.json:This is a description 1.", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req something-001", + "req something-002", + "req something-003", + "req something-004" + ] + }, + { + "tag": "json specific_schema.json:This is a description 2.", + "location": { + "kind": "file", + "file": "specific_schema.json", + "line": null, + "column": null + }, + "name": "specific_schema.json:This is a description 2.", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req something-005", + "req something-006", + "req something-007", + "req something-008", + "req something-009" + ] + } + ], + "generator": "lobster-json", + "version": 5 +} \ No newline at end of file diff --git a/tests_system/lobster_json/data/tag_attribute_irrelavent_no_schema.lobster b/tests_system/lobster_json/data/tag_attribute_irrelavent_no_schema.lobster new file mode 100644 index 000000000..9f4dde465 --- /dev/null +++ b/tests_system/lobster_json/data/tag_attribute_irrelavent_no_schema.lobster @@ -0,0 +1,62 @@ +{ + "data": [ + { + "tag": "json tag_attribute_given_key_missing.json:tag_attribute_given_key_missing.1", + "location": { + "kind": "file", + "file": "tag_attribute_given_key_missing.json", + "line": null, + "column": null + }, + "name": "tag_attribute_given_key_missing.json:tag_attribute_given_key_missing.1", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "json tag_attribute_given_key_missing.json:tag_attribute_given_key_missing.2", + "location": { + "kind": "file", + "file": "tag_attribute_given_key_missing.json", + "line": null, + "column": null + }, + "name": "tag_attribute_given_key_missing.json:tag_attribute_given_key_missing.2", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "json tag_attribute_given_key_missing.json:tag_attribute_given_key_missing.3", + "location": { + "kind": "file", + "file": "tag_attribute_given_key_missing.json", + "line": null, + "column": null + }, + "name": "tag_attribute_given_key_missing.json:tag_attribute_given_key_missing.3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "json tag_attribute_given_key_missing.json:tag_attribute_given_key_missing.4", + "location": { + "kind": "file", + "file": "tag_attribute_given_key_missing.json", + "line": null, + "column": null + }, + "name": "tag_attribute_given_key_missing.json:tag_attribute_given_key_missing.4", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster-json", + "version": 5 +} diff --git a/tests_system/lobster_json/data/tag_attribute_requirements_no_schema.lobster b/tests_system/lobster_json/data/tag_attribute_requirements_no_schema.lobster new file mode 100644 index 000000000..00f46c9fd --- /dev/null +++ b/tests_system/lobster_json/data/tag_attribute_requirements_no_schema.lobster @@ -0,0 +1,148 @@ +{ + "data": [ + { + "tag": "json tag_attribute_given.json:tag_attribute_given.1", + "location": { + "kind": "file", + "file": "tag_attribute_given.json", + "line": null, + "column": null + }, + "name": "tag_attribute_given.json:tag_attribute_given.1", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req FunnyCar.BoogieMode", + "req FunnyCar.PartyHorn" + ] + }, + { + "tag": "json tag_attribute_given.json:tag_attribute_given.2", + "location": { + "kind": "file", + "file": "tag_attribute_given.json", + "line": null, + "column": null + }, + "name": "tag_attribute_given.json:tag_attribute_given.2", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req FunnyCar.AutoBlanket", + "req FunnyCar.SnoreDetector" + ] + }, + { + "tag": "json tag_attribute_given.json:tag_attribute_given.3", + "location": { + "kind": "file", + "file": "tag_attribute_given.json", + "line": null, + "column": null + }, + "name": "tag_attribute_given.json:tag_attribute_given.3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req FunnyCar.PizzaOven", + "req FunnyCar.SodaDispenser" + ] + }, + { + "tag": "json tag_attribute_given.json:tag_attribute_given.4", + "location": { + "kind": "file", + "file": "tag_attribute_given.json", + "line": null, + "column": null + }, + "name": "tag_attribute_given.json:tag_attribute_given.4", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req FunnyCar.KaraokeMachine", + "req FunnyCar.MicrophoneAutoTune" + ] + }, + { + "tag": "json tag_attribute_given.json:tag_attribute_given.5", + "location": { + "kind": "file", + "file": "tag_attribute_given.json", + "line": null, + "column": null + }, + "name": "tag_attribute_given.json:tag_attribute_given.5", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req FunnyCar.CoffeeMaker" + ] + }, + { + "tag": "json tag_attribute_given.json:tag_attribute_given.6", + "location": { + "kind": "file", + "file": "tag_attribute_given.json", + "line": null, + "column": null + }, + "name": "tag_attribute_given.json:tag_attribute_given.6", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req FunnyCar.JokeGenerator" + ] + }, + { + "tag": "json tag_attribute_given.json:tag_attribute_given.7", + "location": { + "kind": "file", + "file": "tag_attribute_given.json", + "line": null, + "column": null + }, + "name": "tag_attribute_given.json:tag_attribute_given.7", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req FunnyCar.MassageSeat", + "req FunnyCar.NeckRoller" + ] + }, + { + "tag": "json tag_attribute_given.json:tag_attribute_given.8", + "location": { + "kind": "file", + "file": "tag_attribute_given.json", + "line": null, + "column": null + }, + "name": "tag_attribute_given.json:tag_attribute_given.8", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req FunnyCar.CatDetector", + "req FunnyCar.LaserPointer" + ] + } + ], + "generator": "lobster-json", + "version": 5 +} diff --git a/tests_system/lobster_json/data/valid_dir_no_schema.lobster b/tests_system/lobster_json/data/valid_dir_no_schema.lobster new file mode 100644 index 000000000..a31bf5610 --- /dev/null +++ b/tests_system/lobster_json/data/valid_dir_no_schema.lobster @@ -0,0 +1,82 @@ +{ + "data": [ + { + "tag": "json input_dir/dir_file1.json:empty_test", + "location": { + "kind": "file", + "file": "input_dir/dir_file1.json", + "line": null, + "column": null + }, + "name": "input_dir/dir_file1.json:empty_test", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req empty.req1" + ] + }, + { + "tag": "json input_dir/dir_file2.json:testDef", + "location": { + "kind": "file", + "file": "input_dir/dir_file2.json", + "line": null, + "column": null + }, + "name": "input_dir/dir_file2.json:testDef", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "json input_with_attributes.json:testDef_demo", + "location": { + "kind": "file", + "file": "input_with_attributes.json", + "line": null, + "column": null + }, + "name": "input_with_attributes.json:testDef_demo", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "json multi1.json:apple", + "location": { + "kind": "file", + "file": "multi1.json", + "line": null, + "column": null + }, + "name": "multi1.json:apple", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.req1" + ] + }, + { + "tag": "json multi1.json:banana", + "location": { + "kind": "file", + "file": "multi1.json", + "line": null, + "column": null + }, + "name": "multi1.json:banana", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster-json", + "version": 5 +} diff --git a/tests_system/lobster_json/data/valid_directory_no_schema.lobster b/tests_system/lobster_json/data/valid_directory_no_schema.lobster new file mode 100644 index 000000000..413855413 --- /dev/null +++ b/tests_system/lobster_json/data/valid_directory_no_schema.lobster @@ -0,0 +1,100 @@ +{ + "data": [ + { + "tag": "json valid_directory/test_one.json:Test_1", + "location": { + "kind": "file", + "file": "valid_directory/test_one.json", + "line": null, + "column": null + }, + "name": "valid_directory/test_one.json:Test_1", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.req1" + ] + }, + { + "tag": "json valid_directory/test_one.json:Test_2", + "location": { + "kind": "file", + "file": "valid_directory/test_one.json", + "line": null, + "column": null + }, + "name": "valid_directory/test_one.json:Test_2", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "json valid_directory/test_one.json:Test_3", + "location": { + "kind": "file", + "file": "valid_directory/test_one.json", + "line": null, + "column": null + }, + "name": "valid_directory/test_one.json:Test_3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.req2", + "req example.req3" + ] + }, + { + "tag": "json valid_directory/nested_dir/test_two.json:Test_4", + "location": { + "kind": "file", + "file": "valid_directory/nested_dir/test_two.json", + "line": null, + "column": null + }, + "name": "valid_directory/nested_dir/test_two.json:Test_4", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "json valid_directory/nested_dir/test_two.json:Test_5", + "location": { + "kind": "file", + "file": "valid_directory/nested_dir/test_two.json", + "line": null, + "column": null + }, + "name": "valid_directory/nested_dir/test_two.json:Test_5", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.req4" + ] + }, + { + "tag": "json valid_directory/nested_dir/test_two.json:Test_6", + "location": { + "kind": "file", + "file": "valid_directory/nested_dir/test_two.json", + "line": null, + "column": null + }, + "name": "valid_directory/nested_dir/test_two.json:Test_6", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster-json", + "version": 5 +} diff --git a/tests_system/lobster_json/lobsterjsonasserter.py b/tests_system/lobster_json/lobsterjsonasserter.py index 493b82b8a..dc004b3f5 100644 --- a/tests_system/lobster_json/lobsterjsonasserter.py +++ b/tests_system/lobster_json/lobsterjsonasserter.py @@ -12,3 +12,16 @@ def assertStdOutNumAndFile(self, num_items: int, out_file: str): self.assertStdOutText( f"lobster-json: wrote {num_items} items to {out_file}\n" ) + + def assertStdOutNumAndFileDeprecated( + self, + num_items: int, + out_file: str, + schema: str, + version: int): + self.assertStdOutText( + f"Lobster file version {version} " + f"containing 'schema' = '{schema}' is deprecated, " + f"please migrate to version 5\n" + f"lobster-json: wrote {num_items} items to {out_file}\n" + ) diff --git a/tests_system/lobster_json/lobsterjsontestrunner.py b/tests_system/lobster_json/lobsterjsontestrunner.py index ee8a89d16..6ab0578a4 100644 --- a/tests_system/lobster_json/lobsterjsontestrunner.py +++ b/tests_system/lobster_json/lobsterjsontestrunner.py @@ -42,6 +42,7 @@ def append_if_not_none(key, value): class CmdArgs: out: Optional[str] = None config: Optional[str] = None + kind: Optional[str] = "itm" def as_list(self) -> List[str]: """Returns the command line arguments as a list""" @@ -53,6 +54,7 @@ def append_if_string(parameter: str, value: Optional[str]): append_if_string("--out", self.out) append_if_string("--config", self.config) + append_if_string("--kind", self.kind) return cmd_args diff --git a/tests_system/lobster_json/test_config_exceptions.py b/tests_system/lobster_json/test_config_exceptions.py index a57719847..d2965d6db 100644 --- a/tests_system/lobster_json/test_config_exceptions.py +++ b/tests_system/lobster_json/test_config_exceptions.py @@ -17,7 +17,8 @@ def test_missing_config_file_parameter(self): completed_process = self._test_runner.run_tool_test() asserter = LobsterJsonAsserter(self, completed_process, self._test_runner) asserter.assertStdErrText( - 'usage: lobster-json [-h] [-v] [--out OUT] --config CONFIG\n' + 'usage: lobster-json [-h] [-v] [--out OUT] --config CONFIG' + ' [--kind {itm,act}]\n' 'lobster-json: error: the following arguments are required: --config\n' ) asserter.assertExitCode(2) diff --git a/tests_system/lobster_json/test_directories.py b/tests_system/lobster_json/test_directories.py index 8c9c2ae69..14c10198e 100644 --- a/tests_system/lobster_json/test_directories.py +++ b/tests_system/lobster_json/test_directories.py @@ -30,6 +30,24 @@ def test_empty_directory(self): self._test_runner.cmd_args.out = OUT_FILE self._test_runner.declare_output_file(self._data_directory / OUT_FILE) + empty_dir_name = "empty_directory" + empty_dir_path = self._data_directory / empty_dir_name + self._test_runner.config_file_data.inputs.append(str(empty_dir_path)) + self._test_runner.config_file_data.tag_attribute = "directory_test" + self._test_runner.cmd_args.kind = "act" + + completed_process = self._test_runner.run_tool_test() + asserter = LobsterJsonAsserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutNumAndFileDeprecated(0, OUT_FILE, "lobster-act-trace", 3) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_empty_directory_no_schema(self): + OUT_FILE = "empty_directory_no_schema.lobster" + self._test_runner.cmd_args.out = OUT_FILE + self._test_runner.declare_output_file(self._data_directory / OUT_FILE) + empty_dir_name = "empty_directory" empty_dir_path = self._data_directory / empty_dir_name self._test_runner.config_file_data.inputs.append(str(empty_dir_path)) @@ -49,6 +67,28 @@ def test_consumes_files_in_specified_directory(self): self._test_runner.config_file_data.tag_attribute = "tags" self._test_runner.config_file_data.name_attribute = "name" self._test_runner.config_file_data.inputs.append("valid_directory") + self._test_runner.cmd_args.kind = "act" + + source_dir = self._data_directory / "valid_directory" + dest_dir = self._test_runner.working_dir / "valid_directory" + shutil.copytree(source_dir, dest_dir) + + self._test_runner.declare_output_file(self._data_directory / OUT_FILE) + + completed_process = self._test_runner.run_tool_test() + asserter = LobsterJsonAsserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutNumAndFileDeprecated(6, OUT_FILE, "lobster-act-trace", 3) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_consumes_files_in_specified_directory_no_schema(self): + # lobster-trace: UseCases.Incorrect_Number_of_JSON_Tests_in_Output + OUT_FILE = "valid_directory_no_schema.lobster" + self._test_runner.cmd_args.out = OUT_FILE + self._test_runner.config_file_data.tag_attribute = "tags" + self._test_runner.config_file_data.name_attribute = "name" + self._test_runner.config_file_data.inputs.append("valid_directory") source_dir = self._data_directory / "valid_directory" dest_dir = self._test_runner.working_dir / "valid_directory" @@ -70,6 +110,28 @@ def test_mix_inputs_from_directory(self): self._test_runner.config_file_data.tag_attribute = "tags" self._test_runner.config_file_data.name_attribute = "name" self._test_runner.config_file_data.inputs.append("input_dir_mix") + self._test_runner.cmd_args.kind = "act" + + source_dir = self._data_directory / "input_dir_mix" + dest_dir = self._test_runner.working_dir / "input_dir_mix" + shutil.copytree(source_dir, dest_dir) + + self._test_runner.declare_output_file(self._data_directory / OUT_FILE) + + completed_process = self._test_runner.run_tool_test() + asserter = LobsterJsonAsserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutNumAndFileDeprecated(3, OUT_FILE, "lobster-act-trace", 3) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_mix_inputs_from_directory_no_schema(self): + # lobster-trace: UseCases.Incorrect_Number_of_JSON_Tests_in_Output + OUT_FILE = "mix_inputs_no_schema.lobster" + self._test_runner.cmd_args.out = OUT_FILE + self._test_runner.config_file_data.tag_attribute = "tags" + self._test_runner.config_file_data.name_attribute = "name" + self._test_runner.config_file_data.inputs.append("input_dir_mix") source_dir = self._data_directory / "input_dir_mix" dest_dir = self._test_runner.working_dir / "input_dir_mix" diff --git a/tests_system/lobster_json/test_inputs_and_inputs_from_file.py b/tests_system/lobster_json/test_inputs_and_inputs_from_file.py index 6d5a72af8..f7a388e80 100644 --- a/tests_system/lobster_json/test_inputs_and_inputs_from_file.py +++ b/tests_system/lobster_json/test_inputs_and_inputs_from_file.py @@ -18,6 +18,7 @@ def setUp(self): def test_inputs(self): # lobster-trace: UseCases.Incorrect_Number_of_JSON_Tests_in_Output + self._test_runner.cmd_args.kind = "act" self._test_runner.declare_input_file( self._data_directory / "inputs_safety.json") self._test_runner.declare_input_file( @@ -29,6 +30,26 @@ def test_inputs(self): self._test_runner.cmd_args.out = out_file self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() + asserter = LobsterJsonAsserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutNumAndFileDeprecated(14, out_file, "lobster-act-trace", 3) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_inputs_no_schema(self): + # lobster-trace: UseCases.Incorrect_Number_of_JSON_Tests_in_Output + self._test_runner.declare_input_file( + self._data_directory / "inputs_safety.json") + self._test_runner.declare_input_file( + self._data_directory / "inputs_non_critical.json") + self._test_runner.declare_input_file( + self._data_directory / "inputs_cosmetic.json") + + out_file = "inputs_no_schema.lobster" + self._test_runner.cmd_args.out = out_file + self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() asserter = LobsterJsonAsserter(self, completed_process, self._test_runner) asserter.assertNoStdErrText() @@ -38,6 +59,7 @@ def test_inputs(self): def test_inputs_from_file(self): # lobster-trace: UseCases.Incorrect_Number_of_JSON_Tests_in_Output + self._test_runner.cmd_args.kind = "act" self._test_runner.declare_inputs_from_file( self._data_directory / "inputs_from_file.txt", self._data_directory) @@ -45,6 +67,22 @@ def test_inputs_from_file(self): self._test_runner.cmd_args.out = out_file self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() + asserter = LobsterJsonAsserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutNumAndFileDeprecated(14, out_file, "lobster-act-trace", 3) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_inputs_from_file_no_schema(self): + # lobster-trace: UseCases.Incorrect_Number_of_JSON_Tests_in_Output + self._test_runner.declare_inputs_from_file( + self._data_directory / "inputs_from_file.txt", self._data_directory) + + out_file = "inputs_from_file_no_schema.lobster" + self._test_runner.cmd_args.out = out_file + self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() asserter = LobsterJsonAsserter(self, completed_process, self._test_runner) asserter.assertNoStdErrText() @@ -54,6 +92,7 @@ def test_inputs_from_file(self): def test_consume_files_from_cwd(self): # lobster-trace: UseCases.Incorrect_Number_of_JSON_Tests_in_Output + self._test_runner.cmd_args.kind = "act" self._test_runner.copy_file_to_working_directory( self._data_directory / "inputs_non_critical.json") self._test_runner.copy_file_to_working_directory( @@ -63,6 +102,24 @@ def test_consume_files_from_cwd(self): self._test_runner.cmd_args.out = out_file self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() + asserter = LobsterJsonAsserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutNumAndFileDeprecated(10, out_file, "lobster-act-trace", 3) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_consume_files_from_cwd_no_schema(self): + # lobster-trace: UseCases.Incorrect_Number_of_JSON_Tests_in_Output + self._test_runner.copy_file_to_working_directory( + self._data_directory / "inputs_non_critical.json") + self._test_runner.copy_file_to_working_directory( + self._data_directory / "inputs_safety.json") + + out_file = "files_from_cwd_no_schema.lobster" + self._test_runner.cmd_args.out = out_file + self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() asserter = LobsterJsonAsserter(self, completed_process, self._test_runner) asserter.assertNoStdErrText() @@ -72,6 +129,7 @@ def test_consume_files_from_cwd(self): def test_consume_files_and_nested_directory_from_cwd(self): # lobster-trace: UseCases.Incorrect_Number_of_JSON_Tests_in_Output + self._test_runner.cmd_args.kind = "act" self._test_runner.copy_file_to_working_directory( self._data_directory / "inputs_non_critical.json") self._test_runner.copy_file_to_working_directory( @@ -86,6 +144,29 @@ def test_consume_files_and_nested_directory_from_cwd(self): self._test_runner.cmd_args.out = out_file self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() + asserter = LobsterJsonAsserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutNumAndFileDeprecated(15, out_file, "lobster-act-trace", 3) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_consume_files_and_nested_directory_from_cwd_no_schema(self): + # lobster-trace: UseCases.Incorrect_Number_of_JSON_Tests_in_Output + self._test_runner.copy_file_to_working_directory( + self._data_directory / "inputs_non_critical.json") + self._test_runner.copy_file_to_working_directory( + self._data_directory / "inputs_safety.json") + + # Copy the "nested_directory_data" directory into the working directory + source_dir = Path(self._data_directory / "nested_directory_data") + dest_dir = Path(self._test_runner.working_dir / "nested_directory_data") + shutil.copytree(source_dir, dest_dir) + + out_file = "file_and_nested_directories_no_schema.lobster" + self._test_runner.cmd_args.out = out_file + self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() asserter = LobsterJsonAsserter(self, completed_process, self._test_runner) asserter.assertNoStdErrText() @@ -95,6 +176,7 @@ def test_consume_files_and_nested_directory_from_cwd(self): def test_inputs_from_file_and_input(self): # lobster-trace: UseCases.Incorrect_Number_of_JSON_Tests_in_Output + self._test_runner.cmd_args.kind = "act" self._test_runner.declare_inputs_from_file( self._data_directory / "inputs_from_file.txt", self._data_directory) self._test_runner.declare_input_file( @@ -104,6 +186,23 @@ def test_inputs_from_file_and_input(self): self._test_runner.cmd_args.out = out_file self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() + asserter = LobsterJsonAsserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutNumAndFileDeprecated(18, out_file, "lobster-act-trace", 3) + asserter.assertExitCode(0) + + def test_inputs_from_file_and_input_no_schema(self): + # lobster-trace: UseCases.Incorrect_Number_of_JSON_Tests_in_Output + self._test_runner.declare_inputs_from_file( + self._data_directory / "inputs_from_file.txt", self._data_directory) + self._test_runner.declare_input_file( + self._data_directory / "inputs_cosmetic_duplicate.json") + + out_file = "inputs_from_file_and_input_no_schema.lobster" + self._test_runner.cmd_args.out = out_file + self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() asserter = LobsterJsonAsserter(self, completed_process, self._test_runner) asserter.assertNoStdErrText() diff --git a/tests_system/lobster_json/test_json_extension.py b/tests_system/lobster_json/test_json_extension.py index aa9612777..9d24a28ea 100644 --- a/tests_system/lobster_json/test_json_extension.py +++ b/tests_system/lobster_json/test_json_extension.py @@ -15,11 +15,35 @@ def setUp(self): def test_single_non_json_extensions(self): # lobster-trace: UseCases.Incorrect_Number_of_JSON_Tests_in_Output # lobster-trace: json_req.Input_File_JSON_Extension + self._test_runner.cmd_args.kind = "act" self._test_runner.declare_input_file(self._data_directory / "valid-json.txt") OUT_FILE = "banana.lobster" self._test_runner.cmd_args.out = OUT_FILE self._test_runner.declare_output_file(self._data_directory / OUT_FILE) + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + version = 3 + schema = "lobster-act-trace" + asserter.assertStdOutText( + f": lobster warning: not a .json file\n" + f"Lobster file version {version} " + f"containing 'schema' = '{schema}' is deprecated, " + f"please migrate to version 5\n" + f"lobster-json: wrote 1 items to {OUT_FILE}\n" + ) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_single_non_json_extensions_no_schema(self): + # lobster-trace: UseCases.Incorrect_Number_of_JSON_Tests_in_Output + # lobster-trace: json_req.Input_File_JSON_Extension + self._test_runner.declare_input_file(self._data_directory / "valid-json.txt") + OUT_FILE = "banana_no_schema.lobster" + self._test_runner.cmd_args.out = OUT_FILE + self._test_runner.declare_output_file(self._data_directory / OUT_FILE) + completed_process = self._test_runner.run_tool_test() asserter = Asserter(self, completed_process, self._test_runner) asserter.assertNoStdErrText() @@ -33,12 +57,37 @@ def test_single_non_json_extensions(self): def test_mixed_extensions(self): # lobster-trace: UseCases.Incorrect_Number_of_JSON_Tests_in_Output # lobster-trace: json_req.Input_File_JSON_Extension + self._test_runner.cmd_args.kind = "act" self._test_runner.declare_input_file(self._data_directory / "valid-mini.json") self._test_runner.declare_input_file(self._data_directory / "valid-json.txt") OUT_FILE = "apple-banana.lobster" self._test_runner.cmd_args.out = OUT_FILE self._test_runner.declare_output_file(self._data_directory / OUT_FILE) + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + version = 3 + schema = "lobster-act-trace" + asserter.assertStdOutText( + f": lobster warning: not a .json file\n" + f"Lobster file version {version} " + f"containing 'schema' = '{schema}' is deprecated, " + f"please migrate to version 5\n" + f"lobster-json: wrote 2 items to {OUT_FILE}\n" + ) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_mixed_extensions_no_schema(self): + # lobster-trace: UseCases.Incorrect_Number_of_JSON_Tests_in_Output + # lobster-trace: json_req.Input_File_JSON_Extension + self._test_runner.declare_input_file(self._data_directory / "valid-mini.json") + self._test_runner.declare_input_file(self._data_directory / "valid-json.txt") + OUT_FILE = "apple-banana_no_schema.lobster" + self._test_runner.cmd_args.out = OUT_FILE + self._test_runner.declare_output_file(self._data_directory / OUT_FILE) + completed_process = self._test_runner.run_tool_test() asserter = Asserter(self, completed_process, self._test_runner) asserter.assertNoStdErrText() @@ -63,11 +112,51 @@ def test_inputs_and_inputs_from_files_with_mixed_extension(self): Tests the processing of multiple input files with mixed extensions, including both valid and invalid JSON files. """ + self._test_runner.cmd_args.kind = "act" self._test_runner.config_file_data.tag_attribute = "tags" self._test_runner.config_file_data.name_attribute = "name" out_file = "multiple_files_mixed_ext.lobster" self._test_runner.cmd_args.out = out_file + self._test_runner.declare_output_file(self._data_directory / out_file) + self._test_runner.declare_inputs_from_file( + self._data_directory / "valid_invalid.txt", self._data_directory) + for filename in [ + "basic.json", + "multi1.json", + "multi2_invalid.txt", + ]: + self._test_runner.declare_input_file( + self._data_directory / filename + ) + + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + version = 3 + schema = "lobster-act-trace" + asserter.assertStdOutText( + f": lobster warning: not a .json file\n" + f"valid_invalid.txt:1: lobster warning: not a .json file\n" + f"Lobster file version {version} " + f"containing 'schema' = '{schema}' is deprecated, " + f"please migrate to version 5\n" + f"lobster-json: wrote 15 items to {out_file}\n" + ) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_inputs_and_inputs_from_files_with_mixed_extension_no_schema(self): + # lobster-trace: UseCases.Incorrect_Number_of_JSON_Tests_in_Output + """ + Tests the processing of multiple input files with mixed extensions, + including both valid and invalid JSON files. + """ + self._test_runner.config_file_data.tag_attribute = "tags" + self._test_runner.config_file_data.name_attribute = "name" + out_file = "multiple_files_mixed_ext_no_schema.lobster" + self._test_runner.cmd_args.out = out_file + self._test_runner.declare_output_file(self._data_directory / out_file) self._test_runner.declare_inputs_from_file( self._data_directory / "valid_invalid.txt", self._data_directory) diff --git a/tests_system/lobster_json/test_justification_attribute.py b/tests_system/lobster_json/test_justification_attribute.py index df577bcd1..182fa62cc 100644 --- a/tests_system/lobster_json/test_justification_attribute.py +++ b/tests_system/lobster_json/test_justification_attribute.py @@ -16,10 +16,27 @@ def test_justification_attribute_given(self): self._data_directory / "justification_attribute_given.json") self._test_runner.config_file_data.justification_attribute = "Justification" + self._test_runner.cmd_args.kind = "act" out_file = "justification_attribute_given.lobster" self._test_runner.cmd_args.out = out_file self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() + asserter = LobsterJsonAsserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutNumAndFileDeprecated(7, out_file, "lobster-act-trace", 3) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_justification_attribute_given_no_schema(self): + self._test_runner.declare_input_file( + self._data_directory / "justification_attribute_given.json") + + self._test_runner.config_file_data.justification_attribute = "Justification" + out_file = "justification_attribute_given_no_schema.lobster" + self._test_runner.cmd_args.out = out_file + self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() asserter = LobsterJsonAsserter(self, completed_process, self._test_runner) asserter.assertNoStdErrText() @@ -32,11 +49,29 @@ def test_justification_attribute_given_but_key_missing(self): self._data_directory / "justification_attribute_given.json") self._test_runner.config_file_data.justification_attribute = "missingkey" + self._test_runner.cmd_args.kind = "act" out_file = "justification_attribute_irrelavent.lobster" self._test_runner.cmd_args.out = out_file self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() + asserter = LobsterJsonAsserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutNumAndFileDeprecated(7, out_file, "lobster-act-trace", 3) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_justification_attribute_given_but_key_missing_no_schema(self): + self._test_runner.declare_input_file( + self._data_directory / "justification_attribute_given.json") + + self._test_runner.config_file_data.justification_attribute = "missingkey" + + out_file = "justification_attribute_irrelavent_no_schema.lobster" + self._test_runner.cmd_args.out = out_file + self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() asserter = LobsterJsonAsserter(self, completed_process, self._test_runner) asserter.assertNoStdErrText() @@ -48,10 +83,26 @@ def test_justification_attribute_not_given(self): self._test_runner.declare_input_file( self._data_directory / "justification_attribute_given.json") + self._test_runner.cmd_args.kind = "act" out_file = "justification_attribute_not_given.lobster" self._test_runner.cmd_args.out = out_file self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() + asserter = LobsterJsonAsserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutNumAndFileDeprecated(7, out_file, "lobster-act-trace", 3) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_justification_attribute_not_given_no_schema(self): + self._test_runner.declare_input_file( + self._data_directory / "justification_attribute_given.json") + + out_file = "justification_attribute_not_given_no_schema.lobster" + self._test_runner.cmd_args.out = out_file + self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() asserter = LobsterJsonAsserter(self, completed_process, self._test_runner) asserter.assertNoStdErrText() diff --git a/tests_system/lobster_json/test_multiple_files.py b/tests_system/lobster_json/test_multiple_files.py index 370d906b8..56f783c34 100644 --- a/tests_system/lobster_json/test_multiple_files.py +++ b/tests_system/lobster_json/test_multiple_files.py @@ -18,6 +18,7 @@ def test_multiple_input_files_specified_in_config(self): Tests the processing of input files specified in a configuration file using the 'inputs' parameter. """ + self._test_runner.cmd_args.kind = "act" self._test_runner.config_file_data.inputs = [ "basic.json", "multi1.json", @@ -25,6 +26,37 @@ def test_multiple_input_files_specified_in_config(self): out_file = "multi_config.lobster" self._test_runner.cmd_args.out = out_file + self._test_runner.declare_output_file(self._data_directory / out_file) + for filename in [ + "basic.json", + "multi1.json", + "single2.json", + "input_with_attributes.json", + ]: + self._test_runner.copy_file_to_working_directory( + self._data_directory / filename + ) + + completed_process = self._test_runner.run_tool_test() + asserter = LobsterJsonAsserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutNumAndFileDeprecated(8, out_file, "lobster-act-trace", 3) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_multiple_input_files_specified_in_config_no_schema(self): + # lobster-trace: UseCases.Incorrect_Number_of_JSON_Tests_in_Output + """ + Tests the processing of input files specified in a configuration file + using the 'inputs' parameter. + """ + self._test_runner.config_file_data.inputs = [ + "basic.json", + "multi1.json", + ] + out_file = "multi_config_no_schema.lobster" + self._test_runner.cmd_args.out = out_file + self._test_runner.declare_output_file(self._data_directory / out_file) for filename in [ "basic.json", @@ -49,6 +81,27 @@ def test_directory_with_empty_invalid_file(self): """ out_file = "empty.lobster" self._test_runner.cmd_args.out = out_file + self._test_runner.cmd_args.kind = "act" + self._test_runner.config_file_data.inputs.append("one") + self._test_runner.declare_output_file(self._data_directory / out_file) + + source_dir = self._data_directory / "one" + dest_dir = self._test_runner.working_dir / "one" + shutil.copytree(source_dir, dest_dir) + + completed_process = self._test_runner.run_tool_test() + asserter = LobsterJsonAsserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutNumAndFileDeprecated(0, out_file, "lobster-act-trace", 3) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_directory_with_empty_invalid_file_no_schema(self): + """ + Tests the processing of a directory containing an empty invalid file. + """ + out_file = "empty_no_schema.lobster" + self._test_runner.cmd_args.out = out_file self._test_runner.config_file_data.inputs.append("one") self._test_runner.declare_output_file(self._data_directory / out_file) @@ -71,6 +124,36 @@ def test_inputs_from_file_specified_in_config(self): """ out_file = "valid_dir.lobster" self._test_runner.cmd_args.out = out_file + self._test_runner.cmd_args.kind = "act" + + self._test_runner.declare_output_file(self._data_directory / out_file) + self._test_runner.declare_inputs_from_file( + self._data_directory / "input_files.txt", self._data_directory) + for filename in [ + "basic.json", + "multi1.json", + "single2.json", + "input_with_attributes.json", + ]: + self._test_runner.copy_file_to_working_directory( + self._data_directory / filename + ) + + completed_process = self._test_runner.run_tool_test() + asserter = LobsterJsonAsserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutNumAndFileDeprecated(5, out_file, "lobster-act-trace", 3) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_inputs_from_file_specified_in_config_no_schema(self): + # lobster-trace: UseCases.Incorrect_Number_of_JSON_Tests_in_Output + """ + Tests the processing of input files specified in a configuration file + using the 'inputs_from_file' parameter. + """ + out_file = "valid_dir_no_schema.lobster" + self._test_runner.cmd_args.out = out_file self._test_runner.declare_output_file(self._data_directory / out_file) self._test_runner.declare_inputs_from_file( @@ -100,6 +183,38 @@ def test_inputs_and_inputs_from_file_With_extra_valid_files(self): """ out_file = "both_inputs_with_extra_files.lobster" self._test_runner.cmd_args.out = out_file + self._test_runner.cmd_args.kind = "act" + + self._test_runner.declare_output_file(self._data_directory / out_file) + self._test_runner.declare_input_file(self._data_directory / "basic.json") + self._test_runner.declare_input_file(self._data_directory / "multi1.json") + self._test_runner.declare_inputs_from_file( + self._data_directory / "input_files.txt", self._data_directory) + for filename in [ + "basic.json", + "multi1.json", + "single2.json", + "input_with_attributes.json", + ]: + self._test_runner.copy_file_to_working_directory( + self._data_directory / filename + ) + + completed_process = self._test_runner.run_tool_test() + asserter = LobsterJsonAsserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutNumAndFileDeprecated(13, out_file, "lobster-act-trace", 3) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_inputs_and_inputs_from_file_With_extra_valid_files_no_schema(self): + # lobster-trace: UseCases.Incorrect_Number_of_JSON_Tests_in_Output + """ + Tests the processing of both 'inputs' and 'inputs_from_file' parameters + in the configuration file, including additional valid files. + """ + out_file = "both_inputs_with_extra_files_no_schema.lobster" + self._test_runner.cmd_args.out = out_file self._test_runner.declare_output_file(self._data_directory / out_file) self._test_runner.declare_input_file(self._data_directory / "basic.json") diff --git a/tests_system/lobster_json/test_name_attribute.py b/tests_system/lobster_json/test_name_attribute.py index fc9d8d17d..b5ca918af 100644 --- a/tests_system/lobster_json/test_name_attribute.py +++ b/tests_system/lobster_json/test_name_attribute.py @@ -17,10 +17,26 @@ def test_attribute_given(self): # lobster-trace: json_req.Name_Attribute_Given self._test_runner.declare_input_file(self._data_directory / "basic.json") self._test_runner.config_file_data.name_attribute = "name" + self._test_runner.cmd_args.kind = "act" out_file = "basic-with-name.lobster" self._test_runner.cmd_args.out = out_file self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() + asserter = LobsterJsonAsserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutNumAndFileDeprecated(6, out_file, "lobster-act-trace", 3) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_attribute_given_no_schema(self): + # lobster-trace: json_req.Name_Attribute_Given + self._test_runner.declare_input_file(self._data_directory / "basic.json") + self._test_runner.config_file_data.name_attribute = "name" + out_file = "basic-with-name_no_schema.lobster" + self._test_runner.cmd_args.out = out_file + self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() asserter = LobsterJsonAsserter(self, completed_process, self._test_runner) asserter.assertNoStdErrText() @@ -29,6 +45,24 @@ def test_attribute_given(self): asserter.assertOutputFiles() def test_attribute_given_but_key_missing(self): + # lobster-trace: json_req.Name_Attribute_Given_Key_Missing + self._test_runner.declare_input_file(self._data_directory / "single2.json") + self._test_runner.config_file_data.name_attribute = "name-not-in-item" + self._test_runner.config_file_data.kind = "act" + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutText( + "{'actual': {'expect': 42,\n" + " 'inputs': [1, 2, 3],\n" + " 'name': 'Single_Item',\n" + " 'tags': 'link-to-requirement'}}\n" + "single2.json: malformed input: object does not contain name-not-in-item\n" + "lobster-json: aborting due to earlier errors\n" + ) + asserter.assertExitCode(1) + + def test_attribute_given_but_key_missing_no_schema(self): # lobster-trace: json_req.Name_Attribute_Given_Key_Missing self._test_runner.declare_input_file(self._data_directory / "single2.json") self._test_runner.config_file_data.name_attribute = "name-not-in-item" @@ -51,6 +85,21 @@ def test_name_attribute_missing_flat_input(self): out_file = "basic-without-name.lobster" self._test_runner.cmd_args.out = out_file self._test_runner.declare_output_file(self._data_directory / out_file) + self._test_runner.cmd_args.kind = "act" + + completed_process = self._test_runner.run_tool_test() + asserter = LobsterJsonAsserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutNumAndFileDeprecated(6, out_file, "lobster-act-trace", 3) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_name_attribute_missing_flat_input_no_schema(self): + # lobster-trace: json_req.Name_Attribute_Missing + self._test_runner.declare_input_file(self._data_directory / "basic.json") + out_file = "basic-without-name_no_schema.lobster" + self._test_runner.cmd_args.out = out_file + self._test_runner.declare_output_file(self._data_directory / out_file) completed_process = self._test_runner.run_tool_test() asserter = LobsterJsonAsserter(self, completed_process, self._test_runner) @@ -71,6 +120,27 @@ def test_name_attribute_missing_nested_input(self): out_file = "basic-without-name-nested.lobster" self._test_runner.cmd_args.out = out_file self._test_runner.declare_output_file(self._data_directory / out_file) + self._test_runner.cmd_args.kind = "act" + + completed_process = self._test_runner.run_tool_test() + asserter = LobsterJsonAsserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutNumAndFileDeprecated(6, out_file, "lobster-act-trace", 3) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_name_attribute_missing_nested_input_no_schema(self): + # lobster-trace: json_req.Name_Attribute_Missing + nested_directory = self._test_runner.working_dir / "one" / "two" + makedirs(nested_directory, exist_ok=False) + shutil.copy( + src=self._data_directory / "basic.json", + dst=nested_directory, + ) + + out_file = "basic-without-name-nested_no_schema.lobster" + self._test_runner.cmd_args.out = out_file + self._test_runner.declare_output_file(self._data_directory / out_file) completed_process = self._test_runner.run_tool_test() asserter = LobsterJsonAsserter(self, completed_process, self._test_runner) diff --git a/tests_system/lobster_json/test_tag_attribute.py b/tests_system/lobster_json/test_tag_attribute.py index cc36824db..28eb01585 100644 --- a/tests_system/lobster_json/test_tag_attribute.py +++ b/tests_system/lobster_json/test_tag_attribute.py @@ -13,10 +13,26 @@ def test_tag_attribute_given(self): self._test_runner.declare_input_file( self._data_directory / "tag_attribute_given.json") self._test_runner.config_file_data.tag_attribute = "Requirements" + self._test_runner.cmd_args.kind = "act" out_file = "tag_attribute_requirements.lobster" self._test_runner.cmd_args.out = out_file self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() + asserter = LobsterJsonAsserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutNumAndFileDeprecated(8, out_file, "lobster-act-trace", 3) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_tag_attribute_given_no_schema(self): + self._test_runner.declare_input_file( + self._data_directory / "tag_attribute_given.json") + self._test_runner.config_file_data.tag_attribute = "Requirements" + out_file = "tag_attribute_requirements_no_schema.lobster" + self._test_runner.cmd_args.out = out_file + self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() asserter = LobsterJsonAsserter(self, completed_process, self._test_runner) asserter.assertNoStdErrText() @@ -28,10 +44,26 @@ def test_tag_attribute_given_but_key_missing(self): self._test_runner.declare_input_file( self._data_directory / "tag_attribute_given_key_missing.json") self._test_runner.config_file_data.tag_attribute = "missingkey" + self._test_runner.cmd_args.kind = "act" out_file = "tag_attribute_irrelavent.lobster" self._test_runner.cmd_args.out = out_file self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() + asserter = LobsterJsonAsserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutNumAndFileDeprecated(4, out_file, "lobster-act-trace", 3) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_tag_attribute_given_but_key_missing_no_schema(self): + self._test_runner.declare_input_file( + self._data_directory / "tag_attribute_given_key_missing.json") + self._test_runner.config_file_data.tag_attribute = "missingkey" + out_file = "tag_attribute_irrelavent_no_schema.lobster" + self._test_runner.cmd_args.out = out_file + self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() asserter = LobsterJsonAsserter(self, completed_process, self._test_runner) asserter.assertNoStdErrText() diff --git a/tests_system/lobster_json/test_valid_input.py b/tests_system/lobster_json/test_valid_input.py index 322529fff..45a3994f4 100644 --- a/tests_system/lobster_json/test_valid_input.py +++ b/tests_system/lobster_json/test_valid_input.py @@ -15,6 +15,7 @@ def test_input_with_specific_schema(self): # lobster-trace: UseCases.Incorrect_number_of_requirement_refs_in_JSON_Output out_file = "specific_schema.lobster" self._test_runner.cmd_args.out = out_file + self._test_runner.cmd_args.kind = "act" self._test_runner.config_file_data.tag_attribute = "requirements" self._test_runner.config_file_data.name_attribute = "description" @@ -26,8 +27,35 @@ def test_input_with_specific_schema(self): completed_process = self._test_runner.run_tool_test() asserter = Asserter(self, completed_process, self._test_runner) asserter.assertNoStdErrText() + version = 3 + schema = "lobster-act-trace" asserter.assertStdOutText( - "lobster-json: wrote 2 items to specific_schema.lobster\n" + f"Lobster file version {version} " + f"containing 'schema' = '{schema}' is deprecated, " + f"please migrate to version 5\n" + f"lobster-json: wrote 2 items to specific_schema.lobster\n" + ) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_input_with_no_schema(self): + # lobster-trace: UseCases.Incorrect_number_of_requirement_refs_in_JSON_Output + out_file = "no_schema.lobster" + self._test_runner.cmd_args.out = out_file + + self._test_runner.config_file_data.tag_attribute = "requirements" + self._test_runner.config_file_data.name_attribute = "description" + self._test_runner.config_file_data.kind = "itm" + + self._test_runner.declare_output_file(self._data_directory / out_file) + self._test_runner.declare_input_file(self._data_directory / + "specific_schema.json") + + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutText( + f"lobster-json: wrote 2 items to {out_file}\n" ) asserter.assertExitCode(0) asserter.assertOutputFiles() diff --git a/tests_system/lobster_pkg/data/valid_file1_and_valid_file2_no_schema.lobster b/tests_system/lobster_pkg/data/valid_file1_and_valid_file2_no_schema.lobster new file mode 100644 index 000000000..36234fd53 --- /dev/null +++ b/tests_system/lobster_pkg/data/valid_file1_and_valid_file2_no_schema.lobster @@ -0,0 +1,40 @@ +{ + "data": [ + { + "tag": "pkg valid_file1.pkg", + "location": { + "kind": "file", + "file": "valid_file1.pkg", + "line": null, + "column": null + }, + "name": "valid_file1.pkg", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm banana.reqA", + "itm banana.reqB", + "itm valid.req1", + "itm valid.req2" + ] + }, + { + "tag": "pkg valid_file2.pkg", + "location": { + "kind": "file", + "file": "valid_file2.pkg", + "line": null, + "column": null + }, + "name": "valid_file2.pkg", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster-pkg", + "version": 5 +} \ No newline at end of file diff --git a/tests_system/lobster_pkg/data/valid_file1_folder_no_schema.lobster b/tests_system/lobster_pkg/data/valid_file1_folder_no_schema.lobster new file mode 100644 index 000000000..7e50a6882 --- /dev/null +++ b/tests_system/lobster_pkg/data/valid_file1_folder_no_schema.lobster @@ -0,0 +1,26 @@ +{ + "data": [ + { + "tag": "pkg pkg_files/valid_file1.pkg", + "location": { + "kind": "file", + "file": "pkg_files/valid_file1.pkg", + "line": null, + "column": null + }, + "name": "pkg_files/valid_file1.pkg", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm banana.reqA", + "itm banana.reqB", + "itm valid.req1", + "itm valid.req2" + ] + } + ], + "generator": "lobster-pkg", + "version": 5 +} diff --git a/tests_system/lobster_pkg/data/valid_file1_no_schema.lobster b/tests_system/lobster_pkg/data/valid_file1_no_schema.lobster new file mode 100644 index 000000000..48a63a5c3 --- /dev/null +++ b/tests_system/lobster_pkg/data/valid_file1_no_schema.lobster @@ -0,0 +1,26 @@ +{ + "data": [ + { + "tag": "pkg valid_file1.pkg", + "location": { + "kind": "file", + "file": "valid_file1.pkg", + "line": null, + "column": null + }, + "name": "valid_file1.pkg", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm banana.reqA", + "itm banana.reqB", + "itm valid.req1", + "itm valid.req2" + ] + } + ], + "generator": "lobster-pkg", + "version": 5 +} diff --git a/tests_system/lobster_pkg/data/valid_ta_file_no_schema.lobster b/tests_system/lobster_pkg/data/valid_ta_file_no_schema.lobster new file mode 100644 index 000000000..de9418c2d --- /dev/null +++ b/tests_system/lobster_pkg/data/valid_ta_file_no_schema.lobster @@ -0,0 +1,24 @@ +{ + "data": [ + { + "tag": "pkg valid_file.ta", + "location": { + "kind": "file", + "file": "valid_file.ta", + "line": null, + "column": null + }, + "name": "valid_file.ta", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm REQ-1234", + "itm REQ-5678" + ] + } + ], + "generator": "lobster-pkg", + "version": 5 +} diff --git a/tests_system/lobster_pkg/data/without_lobster_trace_no_schema.lobster b/tests_system/lobster_pkg/data/without_lobster_trace_no_schema.lobster new file mode 100644 index 000000000..3f8bef5c5 --- /dev/null +++ b/tests_system/lobster_pkg/data/without_lobster_trace_no_schema.lobster @@ -0,0 +1,20 @@ +{ + "data": [ + { + "tag": "pkg without_lobster_trace.pkg", + "location": { + "kind": "file", + "file": "without_lobster_trace.pkg", + "line": null, + "column": null + }, + "name": "without_lobster_trace.pkg", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster-pkg", + "version": 5 +} diff --git a/tests_system/lobster_pkg/data/without_testcase_tag_no_schema.lobster b/tests_system/lobster_pkg/data/without_testcase_tag_no_schema.lobster new file mode 100644 index 000000000..bf6a5b78a --- /dev/null +++ b/tests_system/lobster_pkg/data/without_testcase_tag_no_schema.lobster @@ -0,0 +1,24 @@ +{ + "data": [ + { + "tag": "pkg without_testcase_tag.pkg", + "location": { + "kind": "file", + "file": "without_testcase_tag.pkg", + "line": null, + "column": null + }, + "name": "without_testcase_tag.pkg", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "itm valid.req1", + "itm valid.req2" + ] + } + ], + "generator": "lobster-pkg", + "version": 5 +} diff --git a/tests_system/lobster_pkg/lobster_pkg_asserter.py b/tests_system/lobster_pkg/lobster_pkg_asserter.py index f9f527e59..05cc92dff 100644 --- a/tests_system/lobster_pkg/lobster_pkg_asserter.py +++ b/tests_system/lobster_pkg/lobster_pkg_asserter.py @@ -12,3 +12,16 @@ def assertStdOutNumAndFile(self, num_items: int, out_file: str): self.assertStdOutText( f"lobster-pkg: wrote {num_items} items to {out_file}\n" ) + + def assertStdOutNumAndFileDeprecated( + self, + num_items: int, + out_file: str, + schema: str, + version: int): + self.assertStdOutText( + f"Lobster file version {version} " + f"containing 'schema' = '{schema}' is deprecated, " + f"please migrate to version 5\n" + f"lobster-pkg: wrote {num_items} items to {out_file}\n" + ) diff --git a/tests_system/lobster_pkg/lobster_pkg_test_runner.py b/tests_system/lobster_pkg/lobster_pkg_test_runner.py index 9ca3d5917..a8dcd8f6e 100644 --- a/tests_system/lobster_pkg/lobster_pkg_test_runner.py +++ b/tests_system/lobster_pkg/lobster_pkg_test_runner.py @@ -9,6 +9,7 @@ class CmdArgs: files: List[str] = field(default_factory=list) out: Optional[str] = None + kind: Optional[str] = None def as_list(self) -> List[str]: """Returns the command line arguments as a list""" @@ -17,6 +18,8 @@ def as_list(self) -> List[str]: cmd_args.extend(self.files) if self.out: cmd_args.extend(["--out", self.out]) + if self.kind: + cmd_args.extend(["--kind", self.kind]) return cmd_args diff --git a/tests_system/lobster_pkg/test_valid_scenario.py b/tests_system/lobster_pkg/test_valid_scenario.py index da46b2061..890cccc5b 100644 --- a/tests_system/lobster_pkg/test_valid_scenario.py +++ b/tests_system/lobster_pkg/test_valid_scenario.py @@ -20,6 +20,28 @@ def test_valid_input_pkg_file(self): OUT_FILE = "valid_file1.lobster" self._test_runner.declare_input_file(self._data_directory / "valid_file1.pkg") self._test_runner.cmd_args.files = ["valid_file1.pkg"] + self._test_runner.cmd_args.kind = "act" + + self._test_runner.cmd_args.out = OUT_FILE + completed_process = self._test_runner.run_tool_test() + + out_file = self._data_directory / OUT_FILE + self._test_runner.declare_output_file(out_file) + + asserter = LobsterPkgAsserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutNumAndFileDeprecated(1, OUT_FILE, "lobster-act-trace", 3) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_valid_input_pkg_file_no_schema(self): + # lobster-trace: UseCases.PKG_Items_Extraction + # lobster-trace: req.Pkg_File_Item + # lobster-trace: req.Trace_in_Test_Step_Node + # lobster-trace: req.Trace_in_Analysis_Node + OUT_FILE = "valid_file1_no_schema.lobster" + self._test_runner.declare_input_file(self._data_directory / "valid_file1.pkg") + self._test_runner.cmd_args.files = ["valid_file1.pkg"] self._test_runner.cmd_args.out = OUT_FILE completed_process = self._test_runner.run_tool_test() @@ -40,6 +62,27 @@ def test_valid_input_ta_file(self): OUT_FILE = "valid_ta_file.lobster" self._test_runner.declare_input_file(self._data_directory / "valid_file.ta") self._test_runner.cmd_args.files = ["valid_file.ta"] + self._test_runner.cmd_args.kind = "act" + + self._test_runner.cmd_args.out = OUT_FILE + completed_process = self._test_runner.run_tool_test() + + out_file = self._data_directory / OUT_FILE + self._test_runner.declare_output_file(out_file) + + asserter = LobsterPkgAsserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutNumAndFileDeprecated(1, OUT_FILE, "lobster-act-trace", 3) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_valid_input_ta_file_no_schema(self): + # lobster-trace: UseCases.PKG_Items_Extraction + # lobster-trace: req.Pkg_File_Item + # lobster-trace: req.Trace_in_Analysis_Node + OUT_FILE = "valid_ta_file_no_schema.lobster" + self._test_runner.declare_input_file(self._data_directory / "valid_file.ta") + self._test_runner.cmd_args.files = ["valid_file.ta"] self._test_runner.cmd_args.out = OUT_FILE completed_process = self._test_runner.run_tool_test() @@ -117,6 +160,30 @@ def test_valid_input_pkg_files(self): self._test_runner.declare_input_file(self._data_directory / file) self._test_runner.cmd_args.files.append(file) + self._test_runner.cmd_args.kind = "act" + self._test_runner.cmd_args.out = OUT_FILE + completed_process = self._test_runner.run_tool_test() + + out_file = self._data_directory / OUT_FILE + self._test_runner.declare_output_file(out_file) + + asserter = LobsterPkgAsserter(self, completed_process, self._test_runner) + + asserter.assertNoStdErrText() + asserter.assertStdOutNumAndFileDeprecated(2, OUT_FILE, "lobster-act-trace", 3) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_valid_input_pkg_files_no_schema(self): + # lobster-trace: UseCases.PKG_Items_Extraction + # lobster-trace: req.Pkg_File_Item + # lobster-trace: req.Trace_in_Test_Step_Node + # lobster-trace: req.Trace_in_Analysis_Node + OUT_FILE = "valid_file1_and_valid_file2_no_schema.lobster" + for file in ("valid_file1.pkg", "valid_file2.pkg"): + self._test_runner.declare_input_file(self._data_directory / file) + self._test_runner.cmd_args.files.append(file) + self._test_runner.cmd_args.out = OUT_FILE completed_process = self._test_runner.run_tool_test() @@ -136,7 +203,7 @@ def test_valid_input_file_and_extra_file(self): # lobster-trace: req.Pkg_File_Item # lobster-trace: req.Trace_in_Test_Step_Node # lobster-trace: req.Trace_in_Analysis_Node - OUT_FILE = "valid_file1.lobster" + OUT_FILE = "valid_file1_no_schema.lobster" IN_FILES = ("valid_file1.pkg", "valid_file2.pkg") for f in IN_FILES: self._test_runner.copy_file_to_working_directory(self._data_directory / f) @@ -168,6 +235,35 @@ def test_valid_input_pkg_folder(self): dst_pkg = pkg_files_dir / "valid_file1.pkg" shutil.copy(src_pkg, dst_pkg) + self._test_runner.cmd_args.files = ["pkg_files"] + self._test_runner.cmd_args.kind = "act" + + self._test_runner.cmd_args.out = OUT_FILE + completed_process = self._test_runner.run_tool_test() + + out_file = self._data_directory / OUT_FILE + self._test_runner.declare_output_file(out_file) + asserter = LobsterPkgAsserter(self, completed_process, self._test_runner) + + asserter.assertNoStdErrText() + asserter.assertStdOutNumAndFileDeprecated(1, OUT_FILE, "lobster-act-trace", 3) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_valid_input_pkg_folder_no_schema(self): + # lobster-trace: UseCases.PKG_Items_Extraction + # lobster-trace: req.Pkg_File_Item + # lobster-trace: req.Trace_in_Test_Step_Node + # lobster-trace: req.Trace_in_Analysis_Node + OUT_FILE = "valid_file1_folder_no_schema.lobster" + + pkg_files_dir = Path(self._test_runner.working_dir) / "pkg_files" + pkg_files_dir.mkdir(parents=True, exist_ok=True) + + src_pkg = self._data_directory / "valid_file1.pkg" + dst_pkg = pkg_files_dir / "valid_file1.pkg" + shutil.copy(src_pkg, dst_pkg) + self._test_runner.cmd_args.files = ["pkg_files"] self._test_runner.cmd_args.out = OUT_FILE @@ -189,6 +285,27 @@ def test_valid_file_without_lobster_trace(self): self._test_runner.declare_input_file(self._data_directory / "without_lobster_trace.pkg") self._test_runner.cmd_args.files = ["without_lobster_trace.pkg"] + self._test_runner.cmd_args.kind = "act" + + self._test_runner.cmd_args.out = OUT_FILE + completed_process = self._test_runner.run_tool_test() + + out_file = self._data_directory / OUT_FILE + self._test_runner.declare_output_file(out_file) + + asserter = LobsterPkgAsserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutNumAndFileDeprecated(1, OUT_FILE, "lobster-act-trace", 3) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_valid_file_without_lobster_trace_no_schema(self): + # lobster-trace: req.Pkg_File_Item + # lobster-trace: UseCases.PKG_Items_Extraction + OUT_FILE = "without_lobster_trace_no_schema.lobster" + self._test_runner.declare_input_file(self._data_directory / + "without_lobster_trace.pkg") + self._test_runner.cmd_args.files = ["without_lobster_trace.pkg"] self._test_runner.cmd_args.out = OUT_FILE completed_process = self._test_runner.run_tool_test() @@ -209,6 +326,27 @@ def test_valid_file_without_testcase_tag(self): self._test_runner.declare_input_file(self._data_directory / "without_testcase_tag.pkg") self._test_runner.cmd_args.files = ["without_testcase_tag.pkg"] + self._test_runner.cmd_args.kind = "act" + + self._test_runner.cmd_args.out = OUT_FILE + completed_process = self._test_runner.run_tool_test() + + out_file = self._data_directory / OUT_FILE + self._test_runner.declare_output_file(out_file) + + asserter = LobsterPkgAsserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutNumAndFileDeprecated(1, OUT_FILE, "lobster-act-trace", 3) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_valid_file_without_testcase_tag_no_schema(self): + # lobster-trace: req.Pkg_File_Item + # lobster-trace: UseCases.PKG_Items_Extraction + OUT_FILE = "without_testcase_tag_no_schema.lobster" + self._test_runner.declare_input_file(self._data_directory / + "without_testcase_tag.pkg") + self._test_runner.cmd_args.files = ["without_testcase_tag.pkg"] self._test_runner.cmd_args.out = OUT_FILE completed_process = self._test_runner.run_tool_test() diff --git a/tests_system/lobster_python/data/basic_no_schema.lobster b/tests_system/lobster_python/data/basic_no_schema.lobster new file mode 100644 index 000000000..a70113503 --- /dev/null +++ b/tests_system/lobster_python/data/basic_no_schema.lobster @@ -0,0 +1,53 @@ +{ + "data": [ + { + "tag": "itm basic.trlc_reference", + "location": { + "kind": "file", + "file": "basic.py", + "line": 4, + "column": null + }, + "name": "basic.trlc_reference", + "messages": [], + "just_up": [ + "helper function" + ], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm basic.Example.helper_function", + "location": { + "kind": "file", + "file": "basic.py", + "line": 13, + "column": null + }, + "name": "basic.Example.helper_function", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm basic.Example.nor", + "location": { + "kind": "file", + "file": "basic.py", + "line": 17, + "column": null + }, + "name": "basic.Example.nor", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.req_nor" + ] + } + ], + "generator": "lobster_python", + "version": 5 +} diff --git a/tests_system/lobster_python/data/hello_world.lobster b/tests_system/lobster_python/data/hello_world.lobster new file mode 100644 index 000000000..4cf915bd7 --- /dev/null +++ b/tests_system/lobster_python/data/hello_world.lobster @@ -0,0 +1,23 @@ +{ + "data": [ + { + "tag": "python hello_world.main", + "location": { + "kind": "file", + "file": "hello_world.py", + "line": 4, + "column": null + }, + "name": "hello_world.main", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "language": "Python", + "kind": "Function" + } + ], + "generator": "lobster_python", + "version": 3, + "schema": "lobster-imp-trace" +} diff --git a/tests_system/lobster_python/data/hello_world.py b/tests_system/lobster_python/data/hello_world.py new file mode 100644 index 000000000..121766470 --- /dev/null +++ b/tests_system/lobster_python/data/hello_world.py @@ -0,0 +1,11 @@ +# hello_world.py +# A simple Python program to print "Hello World" + +def main(): + """Main function to print Hello World.""" + print("Hello World") + + +# Run the program only if executed directly +if __name__ == "__main__": + main() diff --git a/tests_system/lobster_python/data/hello_world_no_schema.lobster b/tests_system/lobster_python/data/hello_world_no_schema.lobster new file mode 100644 index 000000000..c9e203942 --- /dev/null +++ b/tests_system/lobster_python/data/hello_world_no_schema.lobster @@ -0,0 +1,20 @@ +{ + "data": [ + { + "tag": "itm hello_world.main", + "location": { + "kind": "file", + "file": "hello_world.py", + "line": 4, + "column": null + }, + "name": "hello_world.main", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster_python", + "version": 5 +} diff --git a/tests_system/lobster_python/data/multiple_identical_function_names_no_schema.lobster b/tests_system/lobster_python/data/multiple_identical_function_names_no_schema.lobster new file mode 100644 index 000000000..0133b5cf7 --- /dev/null +++ b/tests_system/lobster_python/data/multiple_identical_function_names_no_schema.lobster @@ -0,0 +1,90 @@ +{ + "data": [ + { + "tag": "itm multiple_identical_function_names.get_requirements", + "location": { + "kind": "file", + "file": "multiple_identical_function_names.py", + "line": 5, + "column": null + }, + "name": "multiple_identical_function_names.get_requirements", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm multiple_identical_function_names.set_requirements", + "location": { + "kind": "file", + "file": "multiple_identical_function_names.py", + "line": 8, + "column": null + }, + "name": "multiple_identical_function_names.set_requirements", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm multiple_identical_function_names.get_requirements-1", + "location": { + "kind": "file", + "file": "multiple_identical_function_names.py", + "line": 13, + "column": null + }, + "name": "multiple_identical_function_names.get_requirements-1", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm multiple_identical_function_names.display_requirements", + "location": { + "kind": "file", + "file": "multiple_identical_function_names.py", + "line": 17, + "column": null + }, + "name": "multiple_identical_function_names.display_requirements", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm multiple_identical_function_names.set_requirements-1", + "location": { + "kind": "file", + "file": "multiple_identical_function_names.py", + "line": 21, + "column": null + }, + "name": "multiple_identical_function_names.set_requirements-1", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm multiple_identical_function_names.get_requirements-2", + "location": { + "kind": "file", + "file": "multiple_identical_function_names.py", + "line": 26, + "column": null + }, + "name": "multiple_identical_function_names.get_requirements-2", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster_python", + "version": 5 +} diff --git a/tests_system/lobster_python/lobster_python_asserter.py b/tests_system/lobster_python/lobster_python_asserter.py index 88a0751ed..8e502f015 100644 --- a/tests_system/lobster_python/lobster_python_asserter.py +++ b/tests_system/lobster_python/lobster_python_asserter.py @@ -7,8 +7,21 @@ __unittest = True -class LobsterPythonTestAsserter(Asserter): +class LobsterPythonAsserter(Asserter): def assertStdOutNumAndFile(self, num_items: int, out_file: str): self.assertStdOutText( f"Written output for {num_items} items to {out_file}\n" ) + + def assertStdOutNumAndFileDeprecated( + self, + num_items: int, + out_file: str, + schema: str, + version: int): + self.assertStdOutText( + f"Lobster file version {version} " + f"containing 'schema' = '{schema}' is deprecated, " + f"please migrate to version 5\n" + f"Written output for {num_items} items to {out_file}\n" + ) diff --git a/tests_system/lobster_python/lobster_python_test_runner.py b/tests_system/lobster_python/lobster_python_test_runner.py index c96a7ff74..14b360079 100644 --- a/tests_system/lobster_python/lobster_python_test_runner.py +++ b/tests_system/lobster_python/lobster_python_test_runner.py @@ -14,6 +14,7 @@ class CmdArgs: only_tagged_functions: bool = False parse_decorator: Optional[List[str]] = None parse_versioned_decorator: Optional[List[str]] = None + kind: Optional[str] = None def as_list(self) -> List[str]: """Returns the command line arguments as a list for lobster-python""" @@ -45,6 +46,8 @@ def as_list(self) -> List[str]: # Positional file/dir arguments come last if self.files: cmd_args.extend(self.files) + if self.kind: + cmd_args.extend(["--kind", self.kind]) return cmd_args diff --git a/tests_system/lobster_python/test_lobster_python.py b/tests_system/lobster_python/test_lobster_python.py new file mode 100644 index 000000000..3fd5786a2 --- /dev/null +++ b/tests_system/lobster_python/test_lobster_python.py @@ -0,0 +1,71 @@ +from pathlib import Path +import shutil +import unittest + +from tests_system.lobster_python.\ + lobster_python_system_test_case_base import LobsterPythonSystemTestCaseBase +from tests_system.lobster_python.\ + lobster_python_asserter import LobsterPythonAsserter as Asserter + + +class LobsterPythonSystemTest(LobsterPythonSystemTestCaseBase): + + def setUp(self): + super().setUp() + self._test_runner = self.create_test_runner() + + def test_file_from_current_directory(self): + """ + Tests hello_world.py in the current directory. + Output written with schema imp and version 3. + """ + + OUT_FILE = "hello_world.lobster" + IN_FILE = "hello_world.py" + + in_file = self._data_directory / IN_FILE + self._test_runner.copy_file_to_working_directory(in_file) + + out_file = self._data_directory / OUT_FILE + self._test_runner.declare_output_file(out_file) + + self._test_runner.cmd_args.files.append(IN_FILE) + self._test_runner.cmd_args.out = OUT_FILE + + self._test_runner.cmd_args.kind = "imp" + + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutNumAndFileDeprecated(1, OUT_FILE, "lobster-imp-trace", 3) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_file_from_current_directory_no_schema(self): + """ + Tests hello_world.py in the current directory. + Output written without schema and version 5. + """ + + OUT_FILE = "hello_world_no_schema.lobster" + IN_FILE = "hello_world.py" + + in_file = self._data_directory / IN_FILE + self._test_runner.copy_file_to_working_directory(in_file) + + out_file = self._data_directory / OUT_FILE + self._test_runner.declare_output_file(out_file) + + self._test_runner.cmd_args.files.append(IN_FILE) + self._test_runner.cmd_args.out = OUT_FILE + + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutNumAndFile(1, OUT_FILE) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + +if __name__ == "__main__": + unittest.main() diff --git a/tests_system/lobster_python/test_multiple_identical_function_names.py b/tests_system/lobster_python/test_multiple_identical_function_names.py index 44dbfd51b..fe8ac75c6 100644 --- a/tests_system/lobster_python/test_multiple_identical_function_names.py +++ b/tests_system/lobster_python/test_multiple_identical_function_names.py @@ -5,7 +5,7 @@ LobsterPythonSystemTestCaseBase, ) from tests_system.lobster_python.\ - lobster_python_asserter import LobsterPythonTestAsserter as Asserter + lobster_python_asserter import LobsterPythonAsserter as Asserter class MultipleIdenticalFunctionNamesPython(LobsterPythonSystemTestCaseBase): @@ -19,6 +19,26 @@ def test_multiple_identical_function_names(self): self._data_directory / "multiple_identical_function_names.py" ) + self._test_runner.cmd_args.files = ["multiple_identical_function_names.py"] + self._test_runner.cmd_args.single = True + self._test_runner.cmd_args.out = OUT_FILE + self._test_runner.cmd_args.kind = "imp" + + self._test_runner.declare_output_file(self._data_directory / OUT_FILE) + + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutNumAndFileDeprecated(6, OUT_FILE, "lobster-imp-trace", 3) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_multiple_identical_function_names_no_schema(self): + OUT_FILE = "multiple_identical_function_names_no_schema.lobster" + self._test_runner.declare_input_file( + self._data_directory / "multiple_identical_function_names.py" + ) + self._test_runner.cmd_args.files = ["multiple_identical_function_names.py"] self._test_runner.cmd_args.single = True self._test_runner.cmd_args.out = OUT_FILE diff --git a/tests_system/lobster_python/test_valid_cases.py b/tests_system/lobster_python/test_valid_cases.py index 0f6cd12ba..90d6355c0 100644 --- a/tests_system/lobster_python/test_valid_cases.py +++ b/tests_system/lobster_python/test_valid_cases.py @@ -5,7 +5,7 @@ LobsterPythonSystemTestCaseBase, ) from tests_system.lobster_python.\ - lobster_python_asserter import LobsterPythonTestAsserter as Asserter + lobster_python_asserter import LobsterPythonAsserter as Asserter class ValidCasesPython(LobsterPythonSystemTestCaseBase): @@ -19,6 +19,26 @@ def test_valid_python(self): self._test_runner.declare_input_file(self._data_directory / "basic.py") + self._test_runner.cmd_args.files = ["basic.py"] + self._test_runner.cmd_args.single = True + self._test_runner.cmd_args.out = OUT_FILE + self._test_runner.cmd_args.kind = "imp" + + self._test_runner.declare_output_file(self._data_directory / OUT_FILE) + + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutNumAndFileDeprecated(3, OUT_FILE, "lobster-imp-trace", 3) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_valid_python_no_schema(self): + """Simple Python file and verifies the generated lobster output.""" + OUT_FILE = "basic_no_schema.lobster" + + self._test_runner.declare_input_file(self._data_directory / "basic.py") + self._test_runner.cmd_args.files = ["basic.py"] self._test_runner.cmd_args.single = True self._test_runner.cmd_args.out = OUT_FILE diff --git a/tests_system/lobster_report/data/code_linear_no_schema.lobster b/tests_system/lobster_report/data/code_linear_no_schema.lobster new file mode 100644 index 000000000..875b83896 --- /dev/null +++ b/tests_system/lobster_report/data/code_linear_no_schema.lobster @@ -0,0 +1,101 @@ +{ + "data": [ + { + "tag": "python simple_book_system.SimpleBookSystem.search_books", + "location": { + "kind": "file", + "file": "simple_book_system.py", + "line": 24, + "column": null + }, + "name": "simple_book_system.SimpleBookSystem.search_books", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req software_example.search_books" + ], + "language": "Python", + "kind": "Method" + }, + { + "tag": "python simple_book_system.SimpleBookSystem.track_progress", + "location": { + "kind": "file", + "file": "simple_book_system.py", + "line": 41, + "column": null + }, + "name": "simple_book_system.SimpleBookSystem.track_progress", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req software_example.reading_tracker" + ], + "language": "Python", + "kind": "Method" + }, + { + "tag": "python simple_book_system.SimpleBookSystem.organize_library", + "location": { + "kind": "file", + "file": "simple_book_system.py", + "line": 59, + "column": null + }, + "name": "simple_book_system.SimpleBookSystem.organize_library", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req software_example.library_manager" + ], + "language": "Python", + "kind": "Method" + }, + { + "tag": "python simple_book_system.SimpleBookSystem.add_review", + "location": { + "kind": "file", + "file": "simple_book_system.py", + "line": 74, + "column": null + }, + "name": "simple_book_system.SimpleBookSystem.add_review", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req software_example.book_reviews" + ], + "language": "Python", + "kind": "Method" + }, + { + "tag": "python simple_book_system.SimpleBookSystem.show_reviews", + "location": { + "kind": "file", + "file": "simple_book_system.py", + "line": 90, + "column": null + }, + "name": "simple_book_system.SimpleBookSystem.show_reviews", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req software_example.book_reviews" + ], + "language": "Python", + "kind": "Method" + } + ], + "generator": "lobster_python", + "version": 5 +} diff --git a/tests_system/lobster_report/data/codebeamer_funny_impl_no_schema.lobster b/tests_system/lobster_report/data/codebeamer_funny_impl_no_schema.lobster new file mode 100644 index 000000000..8f70cc6d5 --- /dev/null +++ b/tests_system/lobster_report/data/codebeamer_funny_impl_no_schema.lobster @@ -0,0 +1,82 @@ +{ + "data": [ + { + "tag": "python codebeamer_funny_impl.translate_dog_barking", + "location": { + "kind": "file", + "file": "codebeamer_funny_impl.py", + "line": 6, + "column": null + }, + "name": "codebeamer_funny_impl.translate_dog_barking", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req 1@100" + ], + "language": "Python", + "kind": "Function" + }, + { + "tag": "python codebeamer_funny_impl.organize_cloud_shapes", + "location": { + "kind": "file", + "file": "codebeamer_funny_impl.py", + "line": 11, + "column": null + }, + "name": "codebeamer_funny_impl.organize_cloud_shapes", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req 2@200" + ], + "language": "Python", + "kind": "Function" + }, + { + "tag": "python codebeamer_funny_impl.schedule_cat_meetings", + "location": { + "kind": "file", + "file": "codebeamer_funny_impl.py", + "line": 16, + "column": null + }, + "name": "codebeamer_funny_impl.schedule_cat_meetings", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req 3@300" + ], + "language": "Python", + "kind": "Function" + }, + { + "tag": "python codebeamer_funny_impl.calibrate_sandwich_perfection", + "location": { + "kind": "file", + "file": "codebeamer_funny_impl.py", + "line": 21, + "column": null + }, + "name": "codebeamer_funny_impl.calibrate_sandwich_perfection", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req 4@400" + ], + "language": "Python", + "kind": "Function" + } + ], + "generator": "lobster_python", + "version": 5 +} diff --git a/tests_system/lobster_report/data/codebeamer_items_no_schema.lobster b/tests_system/lobster_report/data/codebeamer_items_no_schema.lobster new file mode 100644 index 000000000..0ae64d6b1 --- /dev/null +++ b/tests_system/lobster_report/data/codebeamer_items_no_schema.lobster @@ -0,0 +1,86 @@ +{ + "data": [ + { + "tag": "req 1@100", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 10000, + "item": 1, + "version": 100, + "name": "Requirement 1: Dynamic name" + }, + "name": "Requirement 1: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "codebeamer", + "kind": "codebeamer item", + "text": null, + "status": "Status 1" + }, + { + "tag": "req 2@200", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 20000, + "item": 2, + "version": 200, + "name": "Requirement 2: Dynamic name" + }, + "name": "Requirement 2: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "codebeamer", + "kind": "codebeamer item", + "text": null, + "status": "Status 2" + }, + { + "tag": "req 3@300", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 30000, + "item": 3, + "version": 300, + "name": "Requirement 3: Dynamic name" + }, + "name": "Requirement 3: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "codebeamer", + "kind": "codebeamer item", + "text": null, + "status": "Status 3" + }, + { + "tag": "req 4@400", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 40000, + "item": 4, + "version": 400, + "name": "Requirement 4: Dynamic name" + }, + "name": "Requirement 4: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "codebeamer", + "kind": "codebeamer item", + "text": null, + "status": "Status 4" + } + ], + "generator": "lobster_codebeamer", + "version": 5 +} diff --git a/tests_system/lobster_report/data/codebeamer_links_policy_no_schema.yaml b/tests_system/lobster_report/data/codebeamer_links_policy_no_schema.yaml new file mode 100644 index 000000000..4eeb085c3 --- /dev/null +++ b/tests_system/lobster_report/data/codebeamer_links_policy_no_schema.yaml @@ -0,0 +1,15 @@ +Requirements: !LevelDefinition + name: Requirements + source: + - file: codebeamer_items_no_schema.lobster + needs_tracing_down: true + breakdown_requirements: + - - Code + +Code: !LevelDefinition + name: Code + source: + - file: codebeamer_funny_impl_no_schema.lobster + needs_tracing_up: true + traces: + - Requirements diff --git a/tests_system/lobster_report/data/invalid_input_no_schema.yaml b/tests_system/lobster_report/data/invalid_input_no_schema.yaml new file mode 100644 index 000000000..6bffc1e5d --- /dev/null +++ b/tests_system/lobster_report/data/invalid_input_no_schema.yaml @@ -0,0 +1,4 @@ +Code: !LevelDefinition + name: Code + source: + - file: python_invalid_input_no_schema.lobster diff --git a/tests_system/lobster_report/data/invalid_json_no_schema.yaml b/tests_system/lobster_report/data/invalid_json_no_schema.yaml new file mode 100644 index 000000000..4879b3ed7 --- /dev/null +++ b/tests_system/lobster_report/data/invalid_json_no_schema.yaml @@ -0,0 +1,4 @@ +Requirements: !LevelDefinition + name: Requirements + source: + - file: trlc_invalid_json_no_schema.lobster diff --git a/tests_system/lobster_report/data/invalid_schema.yaml b/tests_system/lobster_report/data/invalid_schema.yaml new file mode 100644 index 000000000..d1c11dbb5 --- /dev/null +++ b/tests_system/lobster_report/data/invalid_schema.yaml @@ -0,0 +1,15 @@ +Requirements: !LevelDefinition + name: Requirements + source: + - file: trlc_zero_items.lobster + needs_tracing_down: true + breakdown_requirements: + - - Code + +Code: !LevelDefinition + name: Code + source: + - file: python_invalid_schema.lobster + needs_tracing_up: true + traces: + - Requirements diff --git a/tests_system/lobster_report/data/invalid_version.yaml b/tests_system/lobster_report/data/invalid_version.yaml new file mode 100644 index 000000000..e917bcf1e --- /dev/null +++ b/tests_system/lobster_report/data/invalid_version.yaml @@ -0,0 +1,15 @@ +Requirements: !LevelDefinition + name: Requirements + source: + - file: trlc_zero_items.lobster + needs_tracing_down: true + breakdown_requirements: + - - Code + +Code: !LevelDefinition + name: Code + source: + - file: python_invalid_version.lobster + needs_tracing_up: true + traces: + - Requirements diff --git a/tests_system/lobster_report/data/json_not_dict_no_schema.yaml b/tests_system/lobster_report/data/json_not_dict_no_schema.yaml new file mode 100644 index 000000000..089d7431e --- /dev/null +++ b/tests_system/lobster_report/data/json_not_dict_no_schema.yaml @@ -0,0 +1,4 @@ +Requirements: !LevelDefinition + name: Requirements + source: + - file: trlc_json_not_dict_no_schema.lobster diff --git a/tests_system/lobster_report/data/just_policy_no_schema.yaml b/tests_system/lobster_report/data/just_policy_no_schema.yaml new file mode 100644 index 000000000..bc73f3272 --- /dev/null +++ b/tests_system/lobster_report/data/just_policy_no_schema.yaml @@ -0,0 +1,26 @@ +usecases: !LevelDefinition + name: usecases + source: + - file: just_usecases_no_schema.lobster + needs_tracing_down: true + breakdown_requirements: + - - System Requirements + +System Requirements: !LevelDefinition + name: System Requirements + source: + - file: just_system_requirements_no_schema.lobster + needs_tracing_up: true + traces: + - usecases + needs_tracing_down: true + breakdown_requirements: + - - Software Requirements + +Software Requirements: !LevelDefinition + name: Software Requirements + source: + - file: just_software_requirements_no_schema.lobster + needs_tracing_up: true + traces: + - System Requirements diff --git a/tests_system/lobster_report/data/just_report_yaml_no_schema.lobster b/tests_system/lobster_report/data/just_report_yaml_no_schema.lobster new file mode 100644 index 000000000..99d2adffd --- /dev/null +++ b/tests_system/lobster_report/data/just_report_yaml_no_schema.lobster @@ -0,0 +1,447 @@ +{ + "schema": "lobster-report", + "version": 2, + "generator": "lobster_report", + "levels": [ + { + "name": "usecases", + "items": [ + { + "tag": "req complex_just_example.lost_sock_scenario", + "location": { + "kind": "file", + "file": "just_requirements.trlc", + "line": 4, + "column": 22 + }, + "name": "complex_just_example.lost_sock_scenario", + "messages": [ + "missing reference to System Requirements" + ], + "just_up": [ + "Not applicable up reference" + ], + "just_down": [], + "just_global": [], + "tracing_status": "MISSING" + }, + { + "tag": "req complex_just_example.monday_motivation_scenario", + "location": { + "kind": "file", + "file": "just_requirements.trlc", + "line": 9, + "column": 22 + }, + "name": "complex_just_example.monday_motivation_scenario", + "messages": [], + "just_up": [], + "just_down": [ + "Not applicable down reference" + ], + "just_global": [], + "ref_up": [], + "ref_down": [ + "req complex_just_example.monday_mood" + ], + "tracing_status": "JUSTIFIED" + }, + { + "tag": "req complex_just_example.pizza_waiting_scenario", + "location": { + "kind": "file", + "file": "just_requirements.trlc", + "line": 14, + "column": 22 + }, + "name": "complex_just_example.pizza_waiting_scenario", + "messages": [], + "just_up": [], + "just_down": [ + "Not applicable down reference" + ], + "just_global": [], + "tracing_status": "JUSTIFIED" + }, + { + "tag": "req complex_just_example.cat_communication_scenario", + "location": { + "kind": "file", + "file": "just_requirements.trlc", + "line": 19, + "column": 22 + }, + "name": "complex_just_example.cat_communication_scenario", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [ + "Not applicable up and down reference" + ], + "tracing_status": "JUSTIFIED" + }, + { + "tag": "req complex_just_example.remote_hunting_scenario", + "location": { + "kind": "file", + "file": "just_requirements.trlc", + "line": 24, + "column": 22 + }, + "name": "complex_just_example.remote_hunting_scenario", + "messages": [], + "just_up": [ + "Not applicable up reference" + ], + "just_down": [ + "Not applicable down reference" + ], + "just_global": [], + "tracing_status": "JUSTIFIED" + }, + { + "tag": "req complex_just_example.sadness_relief_scenario", + "location": { + "kind": "file", + "file": "just_requirements.trlc", + "line": 30, + "column": 22 + }, + "name": "complex_just_example.sadness_relief_scenario", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "req complex_just_example.joke_generator" + ], + "tracing_status": "OK" + }, + { + "tag": "req complex_just_example.midnight_snack_temptation_scenario", + "location": { + "kind": "file", + "file": "just_requirements.trlc", + "line": 34, + "column": 22 + }, + "name": "complex_just_example.midnight_snack_temptation_scenario", + "messages": [ + "missing reference to System Requirements" + ], + "just_up": [], + "just_down": [], + "just_global": [], + "tracing_status": "MISSING" + } + ], + "coverage": 71.42857142857143 + }, + { + "name": "System Requirements", + "items": [ + { + "tag": "req complex_just_example.sock_finder", + "location": { + "kind": "file", + "file": "just_requirements.trlc", + "line": 38, + "column": 33 + }, + "name": "complex_just_example.sock_finder", + "messages": [ + "missing reference to Software Requirements" + ], + "just_up": [ + "Not applicable up reference" + ], + "just_down": [], + "just_global": [], + "tracing_status": "PARTIAL" + }, + { + "tag": "req complex_just_example.monday_mood", + "location": { + "kind": "file", + "file": "just_requirements.trlc", + "line": 43, + "column": 33 + }, + "name": "complex_just_example.monday_mood", + "messages": [], + "just_up": [], + "just_down": [ + "Not applicable down reference" + ], + "just_global": [], + "ref_up": [ + "req complex_just_example.monday_motivation_scenario" + ], + "ref_down": [], + "tracing_status": "JUSTIFIED" + }, + { + "tag": "req complex_just_example.pizza_detector", + "location": { + "kind": "file", + "file": "just_requirements.trlc", + "line": 49, + "column": 33 + }, + "name": "complex_just_example.pizza_detector", + "messages": [ + "missing up reference" + ], + "just_up": [], + "just_down": [ + "Not applicable down reference" + ], + "just_global": [], + "tracing_status": "PARTIAL" + }, + { + "tag": "req complex_just_example.cat_translator", + "location": { + "kind": "file", + "file": "just_requirements.trlc", + "line": 54, + "column": 33 + }, + "name": "complex_just_example.cat_translator", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [ + "Not applicable up and down reference" + ], + "tracing_status": "JUSTIFIED" + }, + { + "tag": "req complex_just_example.remote_locator", + "location": { + "kind": "file", + "file": "just_requirements.trlc", + "line": 59, + "column": 33 + }, + "name": "complex_just_example.remote_locator", + "messages": [], + "just_up": [ + "Not applicable up reference" + ], + "just_down": [ + "Not applicable down reference" + ], + "just_global": [], + "tracing_status": "JUSTIFIED" + }, + { + "tag": "req complex_just_example.joke_generator", + "location": { + "kind": "file", + "file": "just_requirements.trlc", + "line": 65, + "column": 33 + }, + "name": "complex_just_example.joke_generator", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req complex_just_example.sadness_relief_scenario" + ], + "ref_down": [ + "req complex_just_example.pun_database" + ], + "tracing_status": "OK" + }, + { + "tag": "req complex_just_example.cookie_guard", + "location": { + "kind": "file", + "file": "just_requirements.trlc", + "line": 70, + "column": 33 + }, + "name": "complex_just_example.cookie_guard", + "messages": [ + "missing up reference", + "missing reference to Software Requirements" + ], + "just_up": [], + "just_down": [], + "just_global": [], + "tracing_status": "MISSING" + } + ], + "coverage": 57.142857142857146 + }, + { + "name": "Software Requirements", + "items": [ + { + "tag": "req complex_just_example.sock_scanner", + "location": { + "kind": "file", + "file": "just_requirements.trlc", + "line": 74, + "column": 35 + }, + "name": "complex_just_example.sock_scanner", + "messages": [], + "just_up": [ + "Not applicable up reference" + ], + "just_down": [], + "just_global": [], + "tracing_status": "JUSTIFIED" + }, + { + "tag": "req complex_just_example.mood_analyzer", + "location": { + "kind": "file", + "file": "just_requirements.trlc", + "line": 79, + "column": 35 + }, + "name": "complex_just_example.mood_analyzer", + "messages": [ + "missing up reference" + ], + "just_up": [], + "just_down": [ + "Not applicable down reference" + ], + "just_global": [], + "tracing_status": "MISSING" + }, + { + "tag": "req complex_just_example.pizza_radar", + "location": { + "kind": "file", + "file": "just_requirements.trlc", + "line": 84, + "column": 35 + }, + "name": "complex_just_example.pizza_radar", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [ + "Not applicable up and down reference" + ], + "tracing_status": "JUSTIFIED" + }, + { + "tag": "req complex_just_example.meow_processor", + "location": { + "kind": "file", + "file": "just_requirements.trlc", + "line": 89, + "column": 35 + }, + "name": "complex_just_example.meow_processor", + "messages": [], + "just_up": [ + "Not applicable up reference" + ], + "just_down": [ + "Not applicable down reference" + ], + "just_global": [], + "tracing_status": "JUSTIFIED" + }, + { + "tag": "req complex_just_example.pun_database", + "location": { + "kind": "file", + "file": "just_requirements.trlc", + "line": 95, + "column": 35 + }, + "name": "complex_just_example.pun_database", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req complex_just_example.joke_generator" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "req complex_just_example.cushion_explorer", + "location": { + "kind": "file", + "file": "just_requirements.trlc", + "line": 100, + "column": 35 + }, + "name": "complex_just_example.cushion_explorer", + "messages": [ + "missing up reference" + ], + "just_up": [], + "just_down": [], + "just_global": [], + "tracing_status": "MISSING" + } + ], + "coverage": 66.66666666666667 + } + ], + "policy": { + "usecases": { + "name": "usecases", + "traces": [], + "source": [ + { + "file": "just_usecases_no_schema.lobster" + } + ], + "needs_tracing_up": false, + "needs_tracing_down": true, + "breakdown_requirements": [ + [ + "System Requirements" + ] + ] + }, + "System Requirements": { + "name": "System Requirements", + "traces": [ + "usecases" + ], + "source": [ + { + "file": "just_system_requirements_no_schema.lobster" + } + ], + "needs_tracing_up": true, + "needs_tracing_down": true, + "breakdown_requirements": [ + [ + "Software Requirements" + ] + ] + }, + "Software Requirements": { + "name": "Software Requirements", + "traces": [ + "System Requirements" + ], + "source": [ + { + "file": "just_software_requirements_no_schema.lobster" + } + ], + "needs_tracing_up": true, + "needs_tracing_down": false, + "breakdown_requirements": [] + } + }, + "matrix": [] +} diff --git a/tests_system/lobster_report/data/just_requirements_no_schema.lobster b/tests_system/lobster_report/data/just_requirements_no_schema.lobster new file mode 100644 index 000000000..cf9b20122 --- /dev/null +++ b/tests_system/lobster_report/data/just_requirements_no_schema.lobster @@ -0,0 +1,188 @@ +{ + "data": [ + { + "tag": "req example.vehicle", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 3, + "column": 13 + }, + "name": "example.vehicle", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "requirement", + "text": "This is a requirement for vehicle", + "status": null + }, + { + "tag": "req example.engine", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 7, + "column": 13 + }, + "name": "example.engine", + "messages": [], + "just_up": [ + "Not applicable everywhere" + ], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "requirement", + "text": "The vehicle shall have an efficient engine system", + "status": null + }, + { + "tag": "req example.safety_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 12, + "column": 13 + }, + "name": "example.safety_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "requirement", + "text": "The vehicle shall include comprehensive safety features", + "status": null + }, + { + "tag": "req example.braking_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 16, + "column": 13 + }, + "name": "example.braking_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "requirement", + "text": "The vehicle shall have responsive braking capability", + "status": null + }, + { + "tag": "req example.electrical_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 20, + "column": 13 + }, + "name": "example.electrical_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "requirement", + "text": "The vehicle shall have reliable electrical components", + "status": null + }, + { + "tag": "req example.fuel_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 24, + "column": 13 + }, + "name": "example.fuel_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "requirement", + "text": "The vehicle shall have efficient fuel delivery", + "status": null + }, + { + "tag": "req example.transmission_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 28, + "column": 13 + }, + "name": "example.transmission_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "requirement", + "text": "The vehicle shall have a smooth gear transmission system", + "status": null + }, + { + "tag": "req example.steering_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 32, + "column": 13 + }, + "name": "example.steering_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "requirement", + "text": "The vehicle shall have precise steering control", + "status": null + }, + { + "tag": "req example.lighting_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 36, + "column": 13 + }, + "name": "example.lighting_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "requirement", + "text": "The vehicle shall have functional headlights and taillights", + "status": null + }, + { + "tag": "req example.climate_control", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 40, + "column": 13 + }, + "name": "example.climate_control", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "requirement", + "text": "The vehicle shall maintain comfortable cabin temperature", + "status": null + } + ], + "generator": "lobster-trlc", + "version": 5 +} diff --git a/tests_system/lobster_report/data/just_software_requirements_no_schema.lobster b/tests_system/lobster_report/data/just_software_requirements_no_schema.lobster new file mode 100644 index 000000000..69cd1459b --- /dev/null +++ b/tests_system/lobster_report/data/just_software_requirements_no_schema.lobster @@ -0,0 +1,127 @@ +{ + "data": [ + { + "tag": "req complex_just_example.sock_scanner", + "location": { + "kind": "file", + "file": "just_requirements.trlc", + "line": 74, + "column": 35 + }, + "name": "complex_just_example.sock_scanner", + "messages": [], + "just_up": [ + "Not applicable up reference" + ], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "software_requirement", + "text": "The software shall scan washing machines and dryers for sock presence", + "status": null + }, + { + "tag": "req complex_just_example.mood_analyzer", + "location": { + "kind": "file", + "file": "just_requirements.trlc", + "line": 79, + "column": 35 + }, + "name": "complex_just_example.mood_analyzer", + "messages": [], + "just_up": [], + "just_down": [ + "Not applicable down reference" + ], + "just_global": [], + "framework": "TRLC", + "kind": "software_requirement", + "text": "The software shall analyze user facial expressions and deploy happiness algorithms", + "status": null + }, + { + "tag": "req complex_just_example.pizza_radar", + "location": { + "kind": "file", + "file": "just_requirements.trlc", + "line": 84, + "column": 35 + }, + "name": "complex_just_example.pizza_radar", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [ + "Not applicable up and down reference" + ], + "framework": "TRLC", + "kind": "software_requirement", + "text": "The software shall monitor GPS coordinates of pizza delivery vehicles", + "status": null + }, + { + "tag": "req complex_just_example.meow_processor", + "location": { + "kind": "file", + "file": "just_requirements.trlc", + "line": 89, + "column": 35 + }, + "name": "complex_just_example.meow_processor", + "messages": [], + "just_up": [ + "Not applicable up reference" + ], + "just_down": [ + "Not applicable down reference" + ], + "just_global": [], + "framework": "TRLC", + "kind": "software_requirement", + "text": "The software shall process cat vocalizations using advanced feline linguistics", + "status": null + }, + { + "tag": "req complex_just_example.pun_database", + "location": { + "kind": "file", + "file": "just_requirements.trlc", + "line": 95, + "column": 35 + }, + "name": "complex_just_example.pun_database", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req complex_just_example.joke_generator" + ], + "framework": "TRLC", + "kind": "software_requirement", + "text": "The software shall maintain a database of dad jokes sorted by cringe level", + "status": null + }, + { + "tag": "req complex_just_example.cushion_explorer", + "location": { + "kind": "file", + "file": "just_requirements.trlc", + "line": 100, + "column": 35 + }, + "name": "complex_just_example.cushion_explorer", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "software_requirement", + "text": "The software shall map couch cushion topography for remote detection", + "status": null + } + ], + "generator": "lobster-trlc", + "version": 5 +} diff --git a/tests_system/lobster_report/data/just_system_requirements_no_schema.lobster b/tests_system/lobster_report/data/just_system_requirements_no_schema.lobster new file mode 100644 index 000000000..d46b41e64 --- /dev/null +++ b/tests_system/lobster_report/data/just_system_requirements_no_schema.lobster @@ -0,0 +1,150 @@ +{ + "data": [ + { + "tag": "req complex_just_example.sock_finder", + "location": { + "kind": "file", + "file": "just_requirements.trlc", + "line": 38, + "column": 33 + }, + "name": "complex_just_example.sock_finder", + "messages": [], + "just_up": [ + "Not applicable up reference" + ], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "system_requirement", + "text": "The system shall locate missing socks from the laundry dimension", + "status": null + }, + { + "tag": "req complex_just_example.monday_mood", + "location": { + "kind": "file", + "file": "just_requirements.trlc", + "line": 43, + "column": 33 + }, + "name": "complex_just_example.monday_mood", + "messages": [], + "just_up": [], + "just_down": [ + "Not applicable down reference" + ], + "just_global": [], + "refs": [ + "req complex_just_example.monday_motivation_scenario" + ], + "framework": "TRLC", + "kind": "system_requirement", + "text": "The system shall automatically improve user mood on Monday mornings", + "status": null + }, + { + "tag": "req complex_just_example.pizza_detector", + "location": { + "kind": "file", + "file": "just_requirements.trlc", + "line": 49, + "column": 33 + }, + "name": "complex_just_example.pizza_detector", + "messages": [], + "just_up": [], + "just_down": [ + "Not applicable down reference" + ], + "just_global": [], + "framework": "TRLC", + "kind": "system_requirement", + "text": "The system shall detect when pizza delivery arrives within 5 miles", + "status": null + }, + { + "tag": "req complex_just_example.cat_translator", + "location": { + "kind": "file", + "file": "just_requirements.trlc", + "line": 54, + "column": 33 + }, + "name": "complex_just_example.cat_translator", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [ + "Not applicable up and down reference" + ], + "framework": "TRLC", + "kind": "system_requirement", + "text": "The system shall translate cat meows into human language", + "status": null + }, + { + "tag": "req complex_just_example.remote_locator", + "location": { + "kind": "file", + "file": "just_requirements.trlc", + "line": 59, + "column": 33 + }, + "name": "complex_just_example.remote_locator", + "messages": [], + "just_up": [ + "Not applicable up reference" + ], + "just_down": [ + "Not applicable down reference" + ], + "just_global": [], + "framework": "TRLC", + "kind": "system_requirement", + "text": "The system shall find TV remotes hiding in couch cushions", + "status": null + }, + { + "tag": "req complex_just_example.joke_generator", + "location": { + "kind": "file", + "file": "just_requirements.trlc", + "line": 65, + "column": 33 + }, + "name": "complex_just_example.joke_generator", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req complex_just_example.sadness_relief_scenario" + ], + "framework": "TRLC", + "kind": "system_requirement", + "text": "The system shall tell dad jokes when users are feeling sad", + "status": null + }, + { + "tag": "req complex_just_example.cookie_guard", + "location": { + "kind": "file", + "file": "just_requirements.trlc", + "line": 70, + "column": 33 + }, + "name": "complex_just_example.cookie_guard", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "system_requirement", + "text": "The system shall protect cookies from midnight snack attacks", + "status": null + } + ], + "generator": "lobster-trlc", + "version": 5 +} diff --git a/tests_system/lobster_report/data/just_usecases_no_schema.lobster b/tests_system/lobster_report/data/just_usecases_no_schema.lobster new file mode 100644 index 000000000..3f7125245 --- /dev/null +++ b/tests_system/lobster_report/data/just_usecases_no_schema.lobster @@ -0,0 +1,144 @@ +{ + "data": [ + { + "tag": "req complex_just_example.lost_sock_scenario", + "location": { + "kind": "file", + "file": "just_requirements.trlc", + "line": 4, + "column": 22 + }, + "name": "complex_just_example.lost_sock_scenario", + "messages": [], + "just_up": [ + "Not applicable up reference" + ], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "usecase", + "text": "User loses a sock during laundry and needs to find it quickly", + "status": null + }, + { + "tag": "req complex_just_example.monday_motivation_scenario", + "location": { + "kind": "file", + "file": "just_requirements.trlc", + "line": 9, + "column": 22 + }, + "name": "complex_just_example.monday_motivation_scenario", + "messages": [], + "just_up": [], + "just_down": [ + "Not applicable down reference" + ], + "just_global": [], + "framework": "TRLC", + "kind": "usecase", + "text": "User wakes up feeling unmotivated on Monday morning", + "status": null + }, + { + "tag": "req complex_just_example.pizza_waiting_scenario", + "location": { + "kind": "file", + "file": "just_requirements.trlc", + "line": 14, + "column": 22 + }, + "name": "complex_just_example.pizza_waiting_scenario", + "messages": [], + "just_up": [], + "just_down": [ + "Not applicable down reference" + ], + "just_global": [], + "framework": "TRLC", + "kind": "usecase", + "text": "User orders pizza and anxiously waits for delivery", + "status": null + }, + { + "tag": "req complex_just_example.cat_communication_scenario", + "location": { + "kind": "file", + "file": "just_requirements.trlc", + "line": 19, + "column": 22 + }, + "name": "complex_just_example.cat_communication_scenario", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [ + "Not applicable up and down reference" + ], + "framework": "TRLC", + "kind": "usecase", + "text": "User tries to understand what their cat wants", + "status": null + }, + { + "tag": "req complex_just_example.remote_hunting_scenario", + "location": { + "kind": "file", + "file": "just_requirements.trlc", + "line": 24, + "column": 22 + }, + "name": "complex_just_example.remote_hunting_scenario", + "messages": [], + "just_up": [ + "Not applicable up reference" + ], + "just_down": [ + "Not applicable down reference" + ], + "just_global": [], + "framework": "TRLC", + "kind": "usecase", + "text": "User wants to watch TV but cannot find the remote control", + "status": null + }, + { + "tag": "req complex_just_example.sadness_relief_scenario", + "location": { + "kind": "file", + "file": "just_requirements.trlc", + "line": 30, + "column": 22 + }, + "name": "complex_just_example.sadness_relief_scenario", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "usecase", + "text": "User feels sad and needs cheering up", + "status": null + }, + { + "tag": "req complex_just_example.midnight_snack_temptation_scenario", + "location": { + "kind": "file", + "file": "just_requirements.trlc", + "line": 34, + "column": 22 + }, + "name": "complex_just_example.midnight_snack_temptation_scenario", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "usecase", + "text": "User is tempted to eat unhealthy snacks late at night", + "status": null + } + ], + "generator": "lobster-trlc", + "version": 5 +} diff --git a/tests_system/lobster_report/data/linear_policy_no_schema.yaml b/tests_system/lobster_report/data/linear_policy_no_schema.yaml new file mode 100644 index 000000000..5bb3c05e9 --- /dev/null +++ b/tests_system/lobster_report/data/linear_policy_no_schema.yaml @@ -0,0 +1,26 @@ +System Requirements: !LevelDefinition + name: System Requirements + source: + - file: linear_system_requirements_no_schema.lobster + needs_tracing_down: true + breakdown_requirements: + - - Software Requirements + +Software Requirements: !LevelDefinition + name: Software Requirements + source: + - file: linear_software_requirements_no_schema.lobster + needs_tracing_up: true + traces: + - System Requirements + needs_tracing_down: true + breakdown_requirements: + - - Code + +Code: !LevelDefinition + name: Code + source: + - file: code_linear_no_schema.lobster + needs_tracing_up: true + traces: + - Software Requirements diff --git a/tests_system/lobster_report/data/linear_software_requirements_no_schema.lobster b/tests_system/lobster_report/data/linear_software_requirements_no_schema.lobster new file mode 100644 index 000000000..4a5c86f9a --- /dev/null +++ b/tests_system/lobster_report/data/linear_software_requirements_no_schema.lobster @@ -0,0 +1,90 @@ +{ + "data": [ + { + "tag": "req software_example.search_books", + "location": { + "kind": "file", + "file": "linear_requirements.trlc", + "line": 20, + "column": 30 + }, + "name": "software_example.search_books", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req software_example.finder" + ], + "framework": "TRLC", + "kind": "software_requirement", + "text": "The software shall implement book search functionality", + "status": null + }, + { + "tag": "req software_example.reading_tracker", + "location": { + "kind": "file", + "file": "linear_requirements.trlc", + "line": 25, + "column": 30 + }, + "name": "software_example.reading_tracker", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req software_example.tracker" + ], + "framework": "TRLC", + "kind": "software_requirement", + "text": "The software shall track reading progress and statistics", + "status": null + }, + { + "tag": "req software_example.library_manager", + "location": { + "kind": "file", + "file": "linear_requirements.trlc", + "line": 30, + "column": 30 + }, + "name": "software_example.library_manager", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req software_example.organizer" + ], + "framework": "TRLC", + "kind": "software_requirement", + "text": "The software shall organize and categorize books", + "status": null + }, + { + "tag": "req software_example.book_reviews", + "location": { + "kind": "file", + "file": "linear_requirements.trlc", + "line": 35, + "column": 30 + }, + "name": "software_example.book_reviews", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req software_example.reviews" + ], + "framework": "TRLC", + "kind": "software_requirement", + "text": "The software shall collect and display book reviews", + "status": null + } + ], + "generator": "lobster-trlc", + "version": 5 +} diff --git a/tests_system/lobster_report/data/linear_system_requirements_no_schema.lobster b/tests_system/lobster_report/data/linear_system_requirements_no_schema.lobster new file mode 100644 index 000000000..9c4b74ae6 --- /dev/null +++ b/tests_system/lobster_report/data/linear_system_requirements_no_schema.lobster @@ -0,0 +1,78 @@ +{ + "data": [ + { + "tag": "req software_example.finder", + "location": { + "kind": "file", + "file": "linear_requirements.trlc", + "line": 4, + "column": 28 + }, + "name": "software_example.finder", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "system_requirement", + "text": "The system shall find books that people actually want to read", + "status": null + }, + { + "tag": "req software_example.tracker", + "location": { + "kind": "file", + "file": "linear_requirements.trlc", + "line": 8, + "column": 28 + }, + "name": "software_example.tracker", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "system_requirement", + "text": "The system shall count pages read without making people feel guilty", + "status": null + }, + { + "tag": "req software_example.organizer", + "location": { + "kind": "file", + "file": "linear_requirements.trlc", + "line": 12, + "column": 28 + }, + "name": "software_example.organizer", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "system_requirement", + "text": "The system shall arrange books so they can be found again", + "status": null + }, + { + "tag": "req software_example.reviews", + "location": { + "kind": "file", + "file": "linear_requirements.trlc", + "line": 16, + "column": 28 + }, + "name": "software_example.reviews", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "system_requirement", + "text": "The system shall gather opinions about books from real humans", + "status": null + } + ], + "generator": "lobster-trlc", + "version": 5 +} diff --git a/tests_system/lobster_report/data/lobster.report b/tests_system/lobster_report/data/lobster.report new file mode 100644 index 000000000..a094eb2c7 --- /dev/null +++ b/tests_system/lobster_report/data/lobster.report @@ -0,0 +1,496 @@ +{ + "schema": "lobster-report", + "version": 2, + "generator": "lobster_report", + "levels": [ + { + "name": "Requirements", + "kind": "requirements", + "items": [ + { + "tag": "req example.vehicle", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 3, + "column": 13 + }, + "name": "example.vehicle", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python vehicle_implementation.StupidVehicle.vehicle_exists" + ], + "tracing_status": "OK", + "framework": "TRLC", + "kind": "requirement", + "text": "This is a requirement for vehicle", + "status": null + }, + { + "tag": "req example.engine", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 7, + "column": 13 + }, + "name": "example.engine", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python vehicle_implementation.StupidVehicle.run_engine" + ], + "tracing_status": "OK", + "framework": "TRLC", + "kind": "requirement", + "text": "The vehicle shall have an efficient engine system", + "status": null + }, + { + "tag": "req example.safety_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 11, + "column": 13 + }, + "name": "example.safety_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python vehicle_implementation.StupidVehicle.activate_safety_system" + ], + "tracing_status": "OK", + "framework": "TRLC", + "kind": "requirement", + "text": "The vehicle shall include comprehensive safety features", + "status": null + }, + { + "tag": "req example.braking_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 15, + "column": 13 + }, + "name": "example.braking_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python vehicle_implementation.StupidVehicle.apply_brakes" + ], + "tracing_status": "OK", + "framework": "TRLC", + "kind": "requirement", + "text": "The vehicle shall have responsive braking capability", + "status": null + }, + { + "tag": "req example.electrical_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 19, + "column": 13 + }, + "name": "example.electrical_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python vehicle_implementation.StupidVehicle.check_electrical_system" + ], + "tracing_status": "OK", + "framework": "TRLC", + "kind": "requirement", + "text": "The vehicle shall have reliable electrical components", + "status": null + }, + { + "tag": "req example.fuel_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 23, + "column": 13 + }, + "name": "example.fuel_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python vehicle_implementation.StupidVehicle.operate_fuel_system" + ], + "tracing_status": "OK", + "framework": "TRLC", + "kind": "requirement", + "text": "The vehicle shall have efficient fuel delivery", + "status": null + }, + { + "tag": "req example.transmission_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 27, + "column": 13 + }, + "name": "example.transmission_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python vehicle_implementation.StupidVehicle.operate_transmission_system" + ], + "tracing_status": "OK", + "framework": "TRLC", + "kind": "requirement", + "text": "The vehicle shall have a smooth gear transmission system", + "status": null + }, + { + "tag": "req example.steering_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 31, + "column": 13 + }, + "name": "example.steering_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python vehicle_implementation.StupidVehicle.control_steering_system" + ], + "tracing_status": "OK", + "framework": "TRLC", + "kind": "requirement", + "text": "The vehicle shall have precise steering control", + "status": null + }, + { + "tag": "req example.lighting_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 35, + "column": 13 + }, + "name": "example.lighting_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python vehicle_implementation.StupidVehicle.operate_lighting_system" + ], + "tracing_status": "OK", + "framework": "TRLC", + "kind": "requirement", + "text": "The vehicle shall have functional headlights and taillights", + "status": null + }, + { + "tag": "req example.climate_control", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 39, + "column": 13 + }, + "name": "example.climate_control", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python vehicle_implementation.StupidVehicle.control_climate_system" + ], + "tracing_status": "OK", + "framework": "TRLC", + "kind": "requirement", + "text": "The vehicle shall maintain comfortable cabin temperature", + "status": null + } + ], + "coverage": 100.0 + }, + { + "name": "Code", + "kind": "implementation", + "items": [ + { + "tag": "python vehicle_implementation.StupidVehicle.vehicle_exists", + "location": { + "kind": "file", + "file": ".\\vehicle_implementation.py", + "line": 24, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.vehicle_exists", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.vehicle" + ], + "ref_down": [], + "tracing_status": "OK", + "language": "Python", + "kind": "Method" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.run_engine", + "location": { + "kind": "file", + "file": ".\\vehicle_implementation.py", + "line": 30, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.run_engine", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.engine" + ], + "ref_down": [], + "tracing_status": "OK", + "language": "Python", + "kind": "Method" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.activate_safety_system", + "location": { + "kind": "file", + "file": ".\\vehicle_implementation.py", + "line": 43, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.activate_safety_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.safety_system" + ], + "ref_down": [], + "tracing_status": "OK", + "language": "Python", + "kind": "Method" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.apply_brakes", + "location": { + "kind": "file", + "file": ".\\vehicle_implementation.py", + "line": 63, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.apply_brakes", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.braking_system" + ], + "ref_down": [], + "tracing_status": "OK", + "language": "Python", + "kind": "Method" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.check_electrical_system", + "location": { + "kind": "file", + "file": ".\\vehicle_implementation.py", + "line": 84, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.check_electrical_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.electrical_system" + ], + "ref_down": [], + "tracing_status": "OK", + "language": "Python", + "kind": "Method" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.operate_fuel_system", + "location": { + "kind": "file", + "file": ".\\vehicle_implementation.py", + "line": 101, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.operate_fuel_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.fuel_system" + ], + "ref_down": [], + "tracing_status": "OK", + "language": "Python", + "kind": "Method" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.operate_transmission_system", + "location": { + "kind": "file", + "file": ".\\vehicle_implementation.py", + "line": 115, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.operate_transmission_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.transmission_system" + ], + "ref_down": [], + "tracing_status": "OK", + "language": "Python", + "kind": "Method" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.control_steering_system", + "location": { + "kind": "file", + "file": ".\\vehicle_implementation.py", + "line": 131, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.control_steering_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.steering_system" + ], + "ref_down": [], + "tracing_status": "OK", + "language": "Python", + "kind": "Method" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.operate_lighting_system", + "location": { + "kind": "file", + "file": ".\\vehicle_implementation.py", + "line": 150, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.operate_lighting_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.lighting_system" + ], + "ref_down": [], + "tracing_status": "OK", + "language": "Python", + "kind": "Method" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.control_climate_system", + "location": { + "kind": "file", + "file": ".\\vehicle_implementation.py", + "line": 176, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.control_climate_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.climate_control" + ], + "ref_down": [], + "tracing_status": "OK", + "language": "Python", + "kind": "Method" + } + ], + "coverage": 100.0 + } + ], + "policy": { + "Requirements": { + "name": "Requirements", + "kind": "requirements", + "traces": [], + "source": [ + { + "file": "trlc_ok.lobster" + } + ], + "needs_tracing_up": false, + "needs_tracing_down": true, + "breakdown_requirements": [ + [ + "Code" + ] + ] + }, + "Code": { + "name": "Code", + "kind": "implementation", + "traces": [ + "Requirements" + ], + "source": [ + { + "file": "python_ok.lobster" + } + ], + "needs_tracing_up": true, + "needs_tracing_down": false, + "breakdown_requirements": [] + } + }, + "matrix": [] +} diff --git a/tests_system/lobster_report/data/lobster_justified_no_schema.yaml b/tests_system/lobster_report/data/lobster_justified_no_schema.yaml new file mode 100644 index 000000000..ff09b5b0a --- /dev/null +++ b/tests_system/lobster_report/data/lobster_justified_no_schema.yaml @@ -0,0 +1,15 @@ +Requirements: !LevelDefinition + name: Requirements + source: + - file: trlc_justified_no_schema.lobster + needs_tracing_down: true + breakdown_requirements: + - - Code + +Code: !LevelDefinition + name: Code + source: + - file: python_justified_no_schema.lobster + needs_tracing_up: true + traces: + - Requirements diff --git a/tests_system/lobster_report/data/lobster_missing_no_schema.yaml b/tests_system/lobster_report/data/lobster_missing_no_schema.yaml new file mode 100644 index 000000000..b53e91a1d --- /dev/null +++ b/tests_system/lobster_report/data/lobster_missing_no_schema.yaml @@ -0,0 +1,15 @@ +Requirements: !LevelDefinition + name: Requirements + source: + - file: trlc_missing_no_schema.lobster + needs_tracing_down: true + breakdown_requirements: + - - Code + +Code: !LevelDefinition + name: Code + source: + - file: python_missing_no_schema.lobster + needs_tracing_up: true + traces: + - Requirements diff --git a/tests_system/lobster_report/data/lobster_mixed_no_schema.yaml b/tests_system/lobster_report/data/lobster_mixed_no_schema.yaml new file mode 100644 index 000000000..4d7c36978 --- /dev/null +++ b/tests_system/lobster_report/data/lobster_mixed_no_schema.yaml @@ -0,0 +1,15 @@ +Requirements: !LevelDefinition + name: Requirements + source: + - file: trlc_mixed_no_schema.lobster + needs_tracing_down: true + breakdown_requirements: + - - Code + +Code: !LevelDefinition + name: Code + source: + - file: python_mixed_no_schema.lobster + needs_tracing_up: true + traces: + - Requirements diff --git a/tests_system/lobster_report/data/lobster_ok_de.yaml b/tests_system/lobster_report/data/lobster_ok_de.yaml new file mode 100644 index 000000000..15ffa7551 --- /dev/null +++ b/tests_system/lobster_report/data/lobster_ok_de.yaml @@ -0,0 +1,26 @@ +Anforderungen: !LevelDefinition + name: Anforderungen + traces: [] + source: + - file: trlc_ok.lobster + needs_tracing_up: false + needs_tracing_down: true + breakdown_requirements: + - - Implementierung + raw_trace_requirements: [] + serialize_needs_tracing_up: true + serialize_needs_tracing_down: true + serialize_breakdown_requirements: true +Implementierung: !LevelDefinition + name: Implementierung + traces: + - Anforderungen + source: + - file: python_ok.lobster + needs_tracing_up: true + needs_tracing_down: false + breakdown_requirements: [] + raw_trace_requirements: [] + serialize_needs_tracing_up: true + serialize_needs_tracing_down: true + serialize_breakdown_requirements: true diff --git a/tests_system/lobster_report/data/lobster_ok_no_schema.yaml b/tests_system/lobster_report/data/lobster_ok_no_schema.yaml new file mode 100644 index 000000000..304d15194 --- /dev/null +++ b/tests_system/lobster_report/data/lobster_ok_no_schema.yaml @@ -0,0 +1,15 @@ +Requirements: !LevelDefinition + name: Requirements + source: + - file: trlc_ok_no_schema.lobster + needs_tracing_down: true + breakdown_requirements: + - - Code + +Code: !LevelDefinition + name: Code + source: + - file: python_ok_no_schema.lobster + needs_tracing_up: true + traces: + - Requirements diff --git a/tests_system/lobster_report/data/lobster_ok_yaml.report b/tests_system/lobster_report/data/lobster_ok_yaml.report new file mode 100644 index 000000000..0131017d8 --- /dev/null +++ b/tests_system/lobster_report/data/lobster_ok_yaml.report @@ -0,0 +1,374 @@ +{ + "schema": "lobster-report", + "version": 2, + "generator": "lobster_report", + "levels": [ + { + "name": "System Requirements", + "items": [ + { + "tag": "req software_example.finder", + "location": { + "kind": "file", + "file": "linear_requirements.trlc", + "line": 4, + "column": 28 + }, + "name": "software_example.finder", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "req software_example.search_books" + ], + "tracing_status": "OK", + "framework": "TRLC", + "kind": "system_requirement", + "text": "The system shall find books that people actually want to read", + "status": null + }, + { + "tag": "req software_example.tracker", + "location": { + "kind": "file", + "file": "linear_requirements.trlc", + "line": 8, + "column": 28 + }, + "name": "software_example.tracker", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "req software_example.reading_tracker" + ], + "tracing_status": "OK", + "framework": "TRLC", + "kind": "system_requirement", + "text": "The system shall count pages read without making people feel guilty", + "status": null + }, + { + "tag": "req software_example.organizer", + "location": { + "kind": "file", + "file": "linear_requirements.trlc", + "line": 12, + "column": 28 + }, + "name": "software_example.organizer", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "req software_example.library_manager" + ], + "tracing_status": "OK", + "framework": "TRLC", + "kind": "system_requirement", + "text": "The system shall arrange books so they can be found again", + "status": null + }, + { + "tag": "req software_example.reviews", + "location": { + "kind": "file", + "file": "linear_requirements.trlc", + "line": 16, + "column": 28 + }, + "name": "software_example.reviews", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "req software_example.book_reviews" + ], + "tracing_status": "OK", + "framework": "TRLC", + "kind": "system_requirement", + "text": "The system shall gather opinions about books from real humans", + "status": null + } + ], + "coverage": 100.0 + }, + { + "name": "Software Requirements", + "items": [ + { + "tag": "req software_example.search_books", + "location": { + "kind": "file", + "file": "linear_requirements.trlc", + "line": 20, + "column": 30 + }, + "name": "software_example.search_books", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req software_example.finder" + ], + "ref_down": [ + "python simple_book_system.SimpleBookSystem.search_books" + ], + "tracing_status": "OK", + "framework": "TRLC", + "kind": "software_requirement", + "text": "The software shall implement book search functionality", + "status": null + }, + { + "tag": "req software_example.reading_tracker", + "location": { + "kind": "file", + "file": "linear_requirements.trlc", + "line": 25, + "column": 30 + }, + "name": "software_example.reading_tracker", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req software_example.tracker" + ], + "ref_down": [ + "python simple_book_system.SimpleBookSystem.track_progress" + ], + "tracing_status": "OK", + "framework": "TRLC", + "kind": "software_requirement", + "text": "The software shall track reading progress and statistics", + "status": null + }, + { + "tag": "req software_example.library_manager", + "location": { + "kind": "file", + "file": "linear_requirements.trlc", + "line": 30, + "column": 30 + }, + "name": "software_example.library_manager", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req software_example.organizer" + ], + "ref_down": [ + "python simple_book_system.SimpleBookSystem.organize_library" + ], + "tracing_status": "OK", + "framework": "TRLC", + "kind": "software_requirement", + "text": "The software shall organize and categorize books", + "status": null + }, + { + "tag": "req software_example.book_reviews", + "location": { + "kind": "file", + "file": "linear_requirements.trlc", + "line": 35, + "column": 30 + }, + "name": "software_example.book_reviews", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req software_example.reviews" + ], + "ref_down": [ + "python simple_book_system.SimpleBookSystem.add_review", + "python simple_book_system.SimpleBookSystem.show_reviews" + ], + "tracing_status": "OK", + "framework": "TRLC", + "kind": "software_requirement", + "text": "The software shall collect and display book reviews", + "status": null + } + ], + "coverage": 100.0 + }, + { + "name": "Code", + "items": [ + { + "tag": "python simple_book_system.SimpleBookSystem.search_books", + "location": { + "kind": "file", + "file": "simple_book_system.py", + "line": 24, + "column": null + }, + "name": "simple_book_system.SimpleBookSystem.search_books", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req software_example.search_books" + ], + "ref_down": [], + "tracing_status": "OK", + "language": "Python", + "kind": "Method" + }, + { + "tag": "python simple_book_system.SimpleBookSystem.track_progress", + "location": { + "kind": "file", + "file": "simple_book_system.py", + "line": 41, + "column": null + }, + "name": "simple_book_system.SimpleBookSystem.track_progress", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req software_example.reading_tracker" + ], + "ref_down": [], + "tracing_status": "OK", + "language": "Python", + "kind": "Method" + }, + { + "tag": "python simple_book_system.SimpleBookSystem.organize_library", + "location": { + "kind": "file", + "file": "simple_book_system.py", + "line": 59, + "column": null + }, + "name": "simple_book_system.SimpleBookSystem.organize_library", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req software_example.library_manager" + ], + "ref_down": [], + "tracing_status": "OK", + "language": "Python", + "kind": "Method" + }, + { + "tag": "python simple_book_system.SimpleBookSystem.add_review", + "location": { + "kind": "file", + "file": "simple_book_system.py", + "line": 74, + "column": null + }, + "name": "simple_book_system.SimpleBookSystem.add_review", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req software_example.book_reviews" + ], + "ref_down": [], + "tracing_status": "OK", + "language": "Python", + "kind": "Method" + }, + { + "tag": "python simple_book_system.SimpleBookSystem.show_reviews", + "location": { + "kind": "file", + "file": "simple_book_system.py", + "line": 90, + "column": null + }, + "name": "simple_book_system.SimpleBookSystem.show_reviews", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req software_example.book_reviews" + ], + "ref_down": [], + "tracing_status": "OK", + "language": "Python", + "kind": "Method" + } + ], + "coverage": 100.0 + } + ], + "policy": { + "System Requirements": { + "name": "System Requirements", + "traces": [], + "source": [ + { + "file": "linear_system_requirements.lobster" + } + ], + "needs_tracing_up": false, + "needs_tracing_down": true, + "breakdown_requirements": [ + [ + "Software Requirements" + ] + ] + }, + "Software Requirements": { + "name": "Software Requirements", + "traces": [ + "System Requirements" + ], + "source": [ + { + "file": "linear_software_requirements.lobster" + } + ], + "needs_tracing_up": true, + "needs_tracing_down": true, + "breakdown_requirements": [ + [ + "Code" + ] + ] + }, + "Code": { + "name": "Code", + "traces": [ + "Software Requirements" + ], + "source": [ + { + "file": "code_linear.lobster" + } + ], + "needs_tracing_up": true, + "needs_tracing_down": false, + "breakdown_requirements": [] + } + }, + "matrix": [] +} diff --git a/tests_system/lobster_report/data/lobster_zero_items_no_schema.yaml b/tests_system/lobster_report/data/lobster_zero_items_no_schema.yaml new file mode 100644 index 000000000..b89829e2e --- /dev/null +++ b/tests_system/lobster_report/data/lobster_zero_items_no_schema.yaml @@ -0,0 +1,15 @@ +Requirements: !LevelDefinition + name: Requirements + source: + - file: trlc_zero_items_no_schema.lobster + needs_tracing_down: true + breakdown_requirements: + - - Code + +Code: !LevelDefinition + name: Code + source: + - file: python_zero_items_no_schema.lobster + needs_tracing_up: true + traces: + - Requirements diff --git a/tests_system/lobster_report/data/message_trace_coverage_no_schema.yaml b/tests_system/lobster_report/data/message_trace_coverage_no_schema.yaml new file mode 100644 index 000000000..01306a142 --- /dev/null +++ b/tests_system/lobster_report/data/message_trace_coverage_no_schema.yaml @@ -0,0 +1,15 @@ +Requirements: !LevelDefinition + name: Requirements + source: + - file: trlc_message_trace_coverage_no_schema.lobster + needs_tracing_down: true + breakdown_requirements: + - - Code + +Code: !LevelDefinition + name: Code + source: + - file: python_message_trace_coverage_no_schema.lobster + needs_tracing_up: true + traces: + - Requirements diff --git a/tests_system/lobster_report/data/missing_schema.yaml b/tests_system/lobster_report/data/missing_schema.yaml new file mode 100644 index 000000000..79fd6a19b --- /dev/null +++ b/tests_system/lobster_report/data/missing_schema.yaml @@ -0,0 +1,4 @@ +Requirements: !LevelDefinition + name: Requirements + source: + - file: trlc_missing_schema.lobster diff --git a/tests_system/lobster_report/data/missing_version_no_schema.yaml b/tests_system/lobster_report/data/missing_version_no_schema.yaml new file mode 100644 index 000000000..5b19a3cfa --- /dev/null +++ b/tests_system/lobster_report/data/missing_version_no_schema.yaml @@ -0,0 +1,4 @@ +Requirements: !LevelDefinition + name: Requirements + source: + - file: trlc_missing_version_no_schema.lobster diff --git a/tests_system/lobster_report/data/multiple_traces_code_no_schema.lobster b/tests_system/lobster_report/data/multiple_traces_code_no_schema.lobster new file mode 100644 index 000000000..e0e349825 --- /dev/null +++ b/tests_system/lobster_report/data/multiple_traces_code_no_schema.lobster @@ -0,0 +1,239 @@ +{ + "data": [ + { + "tag": "python vehicle_implementation.StupidVehicle.vehicle_exists", + "location": { + "kind": "file", + "file": "vehicle_implementation.py", + "line": 24, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.vehicle_exists", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.vehicle" + ], + "language": "Python", + "kind": "Method" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.run_engine", + "location": { + "kind": "file", + "file": "vehicle_implementation.py", + "line": 30, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.run_engine", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.engine" + ], + "language": "Python", + "kind": "Method" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.activate_safety_system", + "location": { + "kind": "file", + "file": "vehicle_implementation.py", + "line": 43, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.activate_safety_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.safety_system" + ], + "language": "Python", + "kind": "Method" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.apply_brakes", + "location": { + "kind": "file", + "file": "vehicle_implementation.py", + "line": 63, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.apply_brakes", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.braking_system" + ], + "language": "Python", + "kind": "Method" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.check_electrical_system", + "location": { + "kind": "file", + "file": "vehicle_implementation.py", + "line": 84, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.check_electrical_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.electrical_system" + ], + "language": "Python", + "kind": "Method" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.operate_fuel_system", + "location": { + "kind": "file", + "file": "vehicle_implementation.py", + "line": 101, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.operate_fuel_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.fuel_system" + ], + "language": "Python", + "kind": "Method" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.operate_transmission_system", + "location": { + "kind": "file", + "file": "vehicle_implementation.py", + "line": 115, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.operate_transmission_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.transmission_system" + ], + "language": "Python", + "kind": "Method" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.control_steering_system", + "location": { + "kind": "file", + "file": "vehicle_implementation.py", + "line": 131, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.control_steering_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.steering_system" + ], + "language": "Python", + "kind": "Method" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.operate_lighting_system", + "location": { + "kind": "file", + "file": "vehicle_implementation.py", + "line": 150, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.operate_lighting_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.lighting_system" + ], + "language": "Python", + "kind": "Method" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.control_climate_system", + "location": { + "kind": "file", + "file": "vehicle_implementation.py", + "line": 176, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.control_climate_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.climate_control" + ], + "language": "Python", + "kind": "Method" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.comprehensive_system_check", + "location": { + "kind": "file", + "file": "vehicle_implementation.py", + "line": 203, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.comprehensive_system_check", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.engine", + "req example.electrical_system", + "req example.fuel_system", + "req example.safety_system" + ], + "language": "Python", + "kind": "Method" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.run_vehicle_diagnostics", + "location": { + "kind": "file", + "file": "vehicle_implementation.py", + "line": 225, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.run_vehicle_diagnostics", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.vehicle", + "req example.engine", + "req example.safety_system" + ], + "language": "Python", + "kind": "Method" + } + ], + "generator": "lobster_python", + "version": 5 +} diff --git a/tests_system/lobster_report/data/multiple_traces_just_no_schema.yaml b/tests_system/lobster_report/data/multiple_traces_just_no_schema.yaml new file mode 100644 index 000000000..8a5797b19 --- /dev/null +++ b/tests_system/lobster_report/data/multiple_traces_just_no_schema.yaml @@ -0,0 +1,24 @@ +Requirements: !LevelDefinition + name: Requirements + source: + - file: just_requirements_no_schema.lobster + needs_tracing_down: true + breakdown_requirements: + - - Code + - - Test + +Code: !LevelDefinition + name: Code + source: + - file: multiple_traces_code_no_schema.lobster + needs_tracing_up: true + traces: + - Requirements + +Test: !LevelDefinition + name: Test + source: + - file: multiple_traces_test_no_schema.lobster + needs_tracing_up: true + traces: + - Requirements diff --git a/tests_system/lobster_report/data/multiple_traces_test_no_schema.lobster b/tests_system/lobster_report/data/multiple_traces_test_no_schema.lobster new file mode 100644 index 000000000..7d75eec31 --- /dev/null +++ b/tests_system/lobster_report/data/multiple_traces_test_no_schema.lobster @@ -0,0 +1,323 @@ +{ + "data": [ + { + "tag": "pyunit test_vehicle_implementation.TestStupidVehicle.test_vehicle_exists:25", + "location": { + "kind": "file", + "file": "test_vehicle_implementation.py", + "line": 25, + "column": null + }, + "name": "test_vehicle_implementation.TestStupidVehicle.test_vehicle_exists:25", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.vehicle" + ], + "framework": "PyUnit", + "kind": "Test", + "status": null + }, + { + "tag": "pyunit test_vehicle_implementation.TestStupidVehicle.test_engine_functionality:31", + "location": { + "kind": "file", + "file": "test_vehicle_implementation.py", + "line": 31, + "column": null + }, + "name": "test_vehicle_implementation.TestStupidVehicle.test_engine_functionality:31", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.engine" + ], + "framework": "PyUnit", + "kind": "Test", + "status": null + }, + { + "tag": "pyunit test_vehicle_implementation.TestStupidVehicle.test_safety_system_activation:45", + "location": { + "kind": "file", + "file": "test_vehicle_implementation.py", + "line": 45, + "column": null + }, + "name": "test_vehicle_implementation.TestStupidVehicle.test_safety_system_activation:45", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.safety_system" + ], + "framework": "PyUnit", + "kind": "Test", + "status": null + }, + { + "tag": "pyunit test_vehicle_implementation.TestStupidVehicle.test_braking_system:51", + "location": { + "kind": "file", + "file": "test_vehicle_implementation.py", + "line": 51, + "column": null + }, + "name": "test_vehicle_implementation.TestStupidVehicle.test_braking_system:51", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.braking_system" + ], + "framework": "PyUnit", + "kind": "Test", + "status": null + }, + { + "tag": "pyunit test_vehicle_implementation.TestStupidVehicle.test_electrical_system:65", + "location": { + "kind": "file", + "file": "test_vehicle_implementation.py", + "line": 65, + "column": null + }, + "name": "test_vehicle_implementation.TestStupidVehicle.test_electrical_system:65", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.electrical_system" + ], + "framework": "PyUnit", + "kind": "Test", + "status": null + }, + { + "tag": "pyunit test_vehicle_implementation.TestStupidVehicle.test_fuel_system_operation:77", + "location": { + "kind": "file", + "file": "test_vehicle_implementation.py", + "line": 77, + "column": null + }, + "name": "test_vehicle_implementation.TestStupidVehicle.test_fuel_system_operation:77", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.fuel_system" + ], + "framework": "PyUnit", + "kind": "Test", + "status": null + }, + { + "tag": "pyunit test_vehicle_implementation.TestStupidVehicle.test_transmission_system:90", + "location": { + "kind": "file", + "file": "test_vehicle_implementation.py", + "line": 90, + "column": null + }, + "name": "test_vehicle_implementation.TestStupidVehicle.test_transmission_system:90", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.transmission_system" + ], + "framework": "PyUnit", + "kind": "Test", + "status": null + }, + { + "tag": "pyunit test_vehicle_implementation.TestStupidVehicle.test_steering_system:102", + "location": { + "kind": "file", + "file": "test_vehicle_implementation.py", + "line": 102, + "column": null + }, + "name": "test_vehicle_implementation.TestStupidVehicle.test_steering_system:102", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.steering_system" + ], + "framework": "PyUnit", + "kind": "Test", + "status": null + }, + { + "tag": "pyunit test_vehicle_implementation.TestStupidVehicle.test_lighting_system:114", + "location": { + "kind": "file", + "file": "test_vehicle_implementation.py", + "line": 114, + "column": null + }, + "name": "test_vehicle_implementation.TestStupidVehicle.test_lighting_system:114", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.lighting_system" + ], + "framework": "PyUnit", + "kind": "Test", + "status": null + }, + { + "tag": "pyunit test_vehicle_implementation.TestStupidVehicle.test_climate_control:123", + "location": { + "kind": "file", + "file": "test_vehicle_implementation.py", + "line": 123, + "column": null + }, + "name": "test_vehicle_implementation.TestStupidVehicle.test_climate_control:123", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.climate_control" + ], + "framework": "PyUnit", + "kind": "Test", + "status": null + }, + { + "tag": "pyunit test_vehicle_implementation.TestStupidVehicle.test_comprehensive_system_check:135", + "location": { + "kind": "file", + "file": "test_vehicle_implementation.py", + "line": 135, + "column": null + }, + "name": "test_vehicle_implementation.TestStupidVehicle.test_comprehensive_system_check:135", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.engine", + "req example.electrical_system", + "req example.fuel_system", + "req example.safety_system" + ], + "framework": "PyUnit", + "kind": "Test", + "status": null + }, + { + "tag": "pyunit test_vehicle_implementation.TestStupidVehicle.test_full_vehicle_diagnostics:150", + "location": { + "kind": "file", + "file": "test_vehicle_implementation.py", + "line": 150, + "column": null + }, + "name": "test_vehicle_implementation.TestStupidVehicle.test_full_vehicle_diagnostics:150", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.vehicle", + "req example.engine", + "req example.safety_system", + "req example.braking_system", + "req example.electrical_system", + "req example.fuel_system", + "req example.transmission_system", + "req example.steering_system", + "req example.lighting_system", + "req example.climate_control" + ], + "framework": "PyUnit", + "kind": "Test", + "status": null + }, + { + "tag": "pyunit test_vehicle_implementation.TestVehicleIntegration.test_engine_fuel_integration:172", + "location": { + "kind": "file", + "file": "test_vehicle_implementation.py", + "line": 172, + "column": null + }, + "name": "test_vehicle_implementation.TestVehicleIntegration.test_engine_fuel_integration:172", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.engine", + "req example.fuel_system" + ], + "framework": "PyUnit", + "kind": "Test", + "status": null + }, + { + "tag": "pyunit test_vehicle_implementation.TestVehicleIntegration.test_safety_electrical_integration:185", + "location": { + "kind": "file", + "file": "test_vehicle_implementation.py", + "line": 185, + "column": null + }, + "name": "test_vehicle_implementation.TestVehicleIntegration.test_safety_electrical_integration:185", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.safety_system", + "req example.electrical_system" + ], + "framework": "PyUnit", + "kind": "Test", + "status": null + }, + { + "tag": "pyunit test_vehicle_implementation.TestVehicleIntegration.test_mobility_systems_integration:196", + "location": { + "kind": "file", + "file": "test_vehicle_implementation.py", + "line": 196, + "column": null + }, + "name": "test_vehicle_implementation.TestVehicleIntegration.test_mobility_systems_integration:196", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.engine", + "req example.transmission_system", + "req example.steering_system", + "req example.braking_system" + ], + "framework": "PyUnit", + "kind": "Test", + "status": null + } + ], + "generator": "lobster_python", + "version": 5 +} diff --git a/tests_system/lobster_report/data/octopus_policy_no_schema.yaml b/tests_system/lobster_report/data/octopus_policy_no_schema.yaml new file mode 100644 index 000000000..ded459a85 --- /dev/null +++ b/tests_system/lobster_report/data/octopus_policy_no_schema.yaml @@ -0,0 +1,27 @@ +Requirements: !LevelDefinition + name: Requirements + source: + - file: octopus_system_no_schema.lobster + - file: octopus_software_no_schema.lobster + needs_tracing_down: true + breakdown_requirements: + - - Code + - - test + +Code: !LevelDefinition + name: Code + source: + - file: tentacle_commander_code_no_schema.lobster + - file: tentacle_toolkit_code_no_schema.lobster + needs_tracing_up: true + traces: + - Requirements + +test: !LevelDefinition + name: test + source: + - file: tentacle_commander_test_no_schema.lobster + - file: tentacle_toolkit_test_no_schema.lobster + needs_tracing_up: true + traces: + - Requirements diff --git a/tests_system/lobster_report/data/octopus_software_no_schema.lobster b/tests_system/lobster_report/data/octopus_software_no_schema.lobster new file mode 100644 index 000000000..b3270b780 --- /dev/null +++ b/tests_system/lobster_report/data/octopus_software_no_schema.lobster @@ -0,0 +1,90 @@ +{ + "data": [ + { + "tag": "req octopus_example.tentacle_motor_control", + "location": { + "kind": "file", + "file": "octopus_requirements.trlc", + "line": 20, + "column": 30 + }, + "name": "octopus_example.tentacle_motor_control", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req octopus_example.tentacle_coordination" + ], + "framework": "TRLC", + "kind": "software_requirement", + "text": "The software shall implement motor control algorithms for independent tentacle movement", + "status": null + }, + { + "tag": "req octopus_example.chromatophore_processor", + "location": { + "kind": "file", + "file": "octopus_requirements.trlc", + "line": 25, + "column": 30 + }, + "name": "octopus_example.chromatophore_processor", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req octopus_example.color_camouflage" + ], + "framework": "TRLC", + "kind": "software_requirement", + "text": "The software shall process color-changing commands to chromatophore cells in real-time", + "status": null + }, + { + "tag": "req octopus_example.ink_sac_trigger", + "location": { + "kind": "file", + "file": "octopus_requirements.trlc", + "line": 30, + "column": 30 + }, + "name": "octopus_example.ink_sac_trigger", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req octopus_example.ink_defense" + ], + "framework": "TRLC", + "kind": "software_requirement", + "text": "The software shall trigger ink sac release with precise timing and volume control", + "status": null + }, + { + "tag": "req octopus_example.vision_processing_unit", + "location": { + "kind": "file", + "file": "octopus_requirements.trlc", + "line": 35, + "column": 30 + }, + "name": "octopus_example.vision_processing_unit", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req octopus_example.prey_detection" + ], + "framework": "TRLC", + "kind": "software_requirement", + "text": "The software shall process multiple camera feeds for 360-degree underwater vision", + "status": null + } + ], + "generator": "lobster-trlc", + "version": 5 +} diff --git a/tests_system/lobster_report/data/octopus_system_no_schema.lobster b/tests_system/lobster_report/data/octopus_system_no_schema.lobster new file mode 100644 index 000000000..1f17ec963 --- /dev/null +++ b/tests_system/lobster_report/data/octopus_system_no_schema.lobster @@ -0,0 +1,78 @@ +{ + "data": [ + { + "tag": "req octopus_example.tentacle_coordination", + "location": { + "kind": "file", + "file": "octopus_requirements1.trlc", + "line": 4, + "column": 28 + }, + "name": "octopus_example.tentacle_coordination", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC1", + "kind": "system_requirement1", + "text": "The system shall coordinate all eight tentacles simultaneously without getting tangled", + "status": null + }, + { + "tag": "req octopus_example.color_camouflage", + "location": { + "kind": "file", + "file": "octopus_requirements2.trlc", + "line": 8, + "column": 29 + }, + "name": "octopus_example.color_camouflage", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC2", + "kind": "system_requirement2", + "text": "The system shall change colors instantly to blend with coral reefs and escape predators", + "status": null + }, + { + "tag": "req octopus_example.ink_defense", + "location": { + "kind": "file", + "file": "octopus_requirements3.trlc", + "line": 12, + "column": 30 + }, + "name": "octopus_example.ink_defense", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC3", + "kind": "system_requirement3", + "text": "The system shall deploy ink clouds as defensive countermeasure when threatened", + "status": null + }, + { + "tag": "req octopus_example.prey_detection", + "location": { + "kind": "file", + "file": "octopus_requirements4.trlc", + "line": 16, + "column": 40 + }, + "name": "octopus_example.prey_detection", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC4", + "kind": "system_requirement4", + "text": "The system shall detect and track multiple prey items using advanced underwater vision", + "status": null + } + ], + "generator": "lobster-trlc", + "version": 5 +} diff --git a/tests_system/lobster_report/data/pizza_code_no_schema.lobster b/tests_system/lobster_report/data/pizza_code_no_schema.lobster new file mode 100644 index 000000000..343d89416 --- /dev/null +++ b/tests_system/lobster_report/data/pizza_code_no_schema.lobster @@ -0,0 +1,266 @@ +{ + "data": [ + { + "tag": "python pizza_implementation.OvenController.start_cooking", + "location": { + "kind": "file", + "file": "pizza_implementation.py", + "line": 37, + "column": null + }, + "name": "pizza_implementation.OvenController.start_cooking", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req pizza_example.oven_controller", + "req pizza_example.oven" + ], + "language": "Python", + "kind": "Method" + }, + { + "tag": "python pizza_implementation.OvenController.check_cooking_status", + "location": { + "kind": "file", + "file": "pizza_implementation.py", + "line": 45, + "column": null + }, + "name": "pizza_implementation.OvenController.check_cooking_status", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req pizza_example.oven_controller", + "req pizza_example.oven" + ], + "language": "Python", + "kind": "Method" + }, + { + "tag": "python pizza_implementation.RouteOptimizer.calculate_route", + "location": { + "kind": "file", + "file": "pizza_implementation.py", + "line": 66, + "column": null + }, + "name": "pizza_implementation.RouteOptimizer.calculate_route", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req pizza_example.route_planner", + "req pizza_example.delivery" + ], + "language": "Python", + "kind": "Method" + }, + { + "tag": "python pizza_implementation.OrderProcessor.create_customer", + "location": { + "kind": "file", + "file": "pizza_implementation.py", + "line": 95, + "column": null + }, + "name": "pizza_implementation.OrderProcessor.create_customer", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req pizza_example.order_processor", + "req pizza_example.ordering" + ], + "language": "Python", + "kind": "Method" + }, + { + "tag": "python pizza_implementation.OrderProcessor.place_order", + "location": { + "kind": "file", + "file": "pizza_implementation.py", + "line": 105, + "column": null + }, + "name": "pizza_implementation.OrderProcessor.place_order", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req pizza_example.order_processor", + "req pizza_example.ordering" + ], + "language": "Python", + "kind": "Method" + }, + { + "tag": "python pizza_implementation.PaymentGateway.process_payment", + "location": { + "kind": "file", + "file": "pizza_implementation.py", + "line": 122, + "column": null + }, + "name": "pizza_implementation.PaymentGateway.process_payment", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req pizza_example.payment_gateway", + "req pizza_example.payment" + ], + "language": "Python", + "kind": "Method" + }, + { + "tag": "python pizza_implementation.DeliveryTracker.start_delivery", + "location": { + "kind": "file", + "file": "pizza_implementation.py", + "line": 150, + "column": null + }, + "name": "pizza_implementation.DeliveryTracker.start_delivery", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req pizza_example.gps_tracker", + "req pizza_example.tracking" + ], + "language": "Python", + "kind": "Method" + }, + { + "tag": "python pizza_implementation.InventoryManager.use_ingredients", + "location": { + "kind": "file", + "file": "pizza_implementation.py", + "line": 177, + "column": null + }, + "name": "pizza_implementation.InventoryManager.use_ingredients", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req pizza_example.stock_manager", + "req pizza_example.inventory" + ], + "language": "Python", + "kind": "Method" + }, + { + "tag": "python pizza_implementation.InventoryManager.check_for_alerts", + "location": { + "kind": "file", + "file": "pizza_implementation.py", + "line": 195, + "column": null + }, + "name": "pizza_implementation.InventoryManager.check_for_alerts", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req pizza_example.stock_manager", + "req pizza_example.inventory" + ], + "language": "Python", + "kind": "Method" + }, + { + "tag": "python pizza_implementation.NotificationSystem.send_sms", + "location": { + "kind": "file", + "file": "pizza_implementation.py", + "line": 213, + "column": null + }, + "name": "pizza_implementation.NotificationSystem.send_sms", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req pizza_example.notification_system", + "req pizza_example.communication" + ], + "language": "Python", + "kind": "Method" + }, + { + "tag": "python pizza_implementation.NotificationSystem.notify_order_status", + "location": { + "kind": "file", + "file": "pizza_implementation.py", + "line": 226, + "column": null + }, + "name": "pizza_implementation.NotificationSystem.notify_order_status", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req pizza_example.notification_system", + "req pizza_example.communication" + ], + "language": "Python", + "kind": "Method" + }, + { + "tag": "python pizza_implementation.RecipeDatabase.get_recipe", + "location": { + "kind": "file", + "file": "pizza_implementation.py", + "line": 258, + "column": null + }, + "name": "pizza_implementation.RecipeDatabase.get_recipe", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req pizza_example.recipe_database", + "req pizza_example.quality" + ], + "language": "Python", + "kind": "Method" + }, + { + "tag": "python pizza_implementation.RecipeDatabase.validate_quality", + "location": { + "kind": "file", + "file": "pizza_implementation.py", + "line": 264, + "column": null + }, + "name": "pizza_implementation.RecipeDatabase.validate_quality", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req pizza_example.recipe_database", + "req pizza_example.quality" + ], + "language": "Python", + "kind": "Method" + } + ], + "generator": "lobster_python", + "version": 5 +} diff --git a/tests_system/lobster_report/data/pizza_component_tests_no_schema.lobster b/tests_system/lobster_report/data/pizza_component_tests_no_schema.lobster new file mode 100644 index 000000000..11f3ff1db --- /dev/null +++ b/tests_system/lobster_report/data/pizza_component_tests_no_schema.lobster @@ -0,0 +1,183 @@ +{ + "data": [ + { + "tag": "pyunit test_pizza_components.TestOrderProcessingComponent.test_complete_order_creation_workflow:26", + "location": { + "kind": "file", + "file": "test_pizza_components.py", + "line": 26, + "column": null + }, + "name": "test_pizza_components.TestOrderProcessingComponent.test_complete_order_creation_workflow:26", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req pizza_example.order_processor", + "req pizza_example.payment_gateway", + "req pizza_example.ordering", + "req pizza_example.payment" + ], + "framework": "PyUnit", + "kind": "Test", + "status": null + }, + { + "tag": "pyunit test_pizza_components.TestCookingComponent.test_recipe_to_cooking_workflow:62", + "location": { + "kind": "file", + "file": "test_pizza_components.py", + "line": 62, + "column": null + }, + "name": "test_pizza_components.TestCookingComponent.test_recipe_to_cooking_workflow:62", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req pizza_example.recipe_database", + "req pizza_example.oven_controller", + "req pizza_example.stock_manager", + "req pizza_example.quality", + "req pizza_example.oven", + "req pizza_example.inventory" + ], + "framework": "PyUnit", + "kind": "Test", + "status": null + }, + { + "tag": "pyunit test_pizza_components.TestDeliveryComponent.test_delivery_tracking_workflow:102", + "location": { + "kind": "file", + "file": "test_pizza_components.py", + "line": 102, + "column": null + }, + "name": "test_pizza_components.TestDeliveryComponent.test_delivery_tracking_workflow:102", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req pizza_example.gps_tracker", + "req pizza_example.route_planner", + "req pizza_example.notification_system", + "req pizza_example.tracking", + "req pizza_example.delivery", + "req pizza_example.communication" + ], + "framework": "PyUnit", + "kind": "Test", + "status": null + }, + { + "tag": "pyunit test_pizza_components.TestInventoryAlertComponent.test_low_stock_alert_workflow:142", + "location": { + "kind": "file", + "file": "test_pizza_components.py", + "line": 142, + "column": null + }, + "name": "test_pizza_components.TestInventoryAlertComponent.test_low_stock_alert_workflow:142", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req pizza_example.stock_manager", + "req pizza_example.notification_system", + "req pizza_example.inventory", + "req pizza_example.communication" + ], + "framework": "PyUnit", + "kind": "Test", + "status": null + }, + { + "tag": "pyunit test_pizza_components.TestQualityControlComponent.test_quality_validation_workflow:173", + "location": { + "kind": "file", + "file": "test_pizza_components.py", + "line": 173, + "column": null + }, + "name": "test_pizza_components.TestQualityControlComponent.test_quality_validation_workflow:173", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req pizza_example.recipe_database", + "req pizza_example.oven_controller", + "req pizza_example.quality", + "req pizza_example.oven" + ], + "framework": "PyUnit", + "kind": "Test", + "status": null + }, + { + "tag": "pyunit test_pizza_components.TestEndToEndOrderComponent.test_complete_pizza_order_system:205", + "location": { + "kind": "file", + "file": "test_pizza_components.py", + "line": 205, + "column": null + }, + "name": "test_pizza_components.TestEndToEndOrderComponent.test_complete_pizza_order_system:205", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req pizza_example.order_processor", + "req pizza_example.payment_gateway", + "req pizza_example.stock_manager", + "req pizza_example.recipe_database", + "req pizza_example.oven_controller", + "req pizza_example.notification_system", + "req pizza_example.gps_tracker", + "req pizza_example.route_planner", + "req pizza_example.ordering", + "req pizza_example.payment", + "req pizza_example.inventory", + "req pizza_example.quality", + "req pizza_example.oven", + "req pizza_example.communication", + "req pizza_example.tracking", + "req pizza_example.delivery" + ], + "framework": "PyUnit", + "kind": "Test", + "status": null + }, + { + "tag": "pyunit test_pizza_components.TestErrorHandlingComponent.test_payment_failure_workflow:278", + "location": { + "kind": "file", + "file": "test_pizza_components.py", + "line": 278, + "column": null + }, + "name": "test_pizza_components.TestErrorHandlingComponent.test_payment_failure_workflow:278", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req pizza_example.order_processor", + "req pizza_example.payment_gateway", + "req pizza_example.ordering", + "req pizza_example.payment" + ], + "framework": "PyUnit", + "kind": "Test", + "status": null + } + ], + "generator": "lobster_python", + "version": 5 +} diff --git a/tests_system/lobster_report/data/pizza_policy_no_schema.yaml b/tests_system/lobster_report/data/pizza_policy_no_schema.yaml new file mode 100644 index 000000000..149bd1842 --- /dev/null +++ b/tests_system/lobster_report/data/pizza_policy_no_schema.yaml @@ -0,0 +1,42 @@ +System Requirements: !LevelDefinition + name: System Requirements + source: + - file: pizza_system_requirements_no_schema.lobster + needs_tracing_down: true + breakdown_requirements: + - - Component Tests + +Software Requirements: !LevelDefinition + name: Software Requirements + source: + - file: pizza_software_requirements_no_schema.lobster + needs_tracing_down: true + breakdown_requirements: + - - Component Tests + - Unit Tests + +Code: !LevelDefinition + name: Code + source: + - file: pizza_code_no_schema.lobster + needs_tracing_up: true + traces: + - System Requirements + - Software Requirements + +Component Tests: !LevelDefinition + name: Component Tests + source: + - file: pizza_component_tests_no_schema.lobster + needs_tracing_up: true + traces: + - System Requirements + - Software Requirements + +Unit Tests: !LevelDefinition + name: Unit Tests + source: + - file: pizza_unit_tests_no_schema.lobster + needs_tracing_up: true + traces: + - Software Requirements diff --git a/tests_system/lobster_report/data/pizza_software_requirements_no_schema.lobster b/tests_system/lobster_report/data/pizza_software_requirements_no_schema.lobster new file mode 100644 index 000000000..b22cf0c89 --- /dev/null +++ b/tests_system/lobster_report/data/pizza_software_requirements_no_schema.lobster @@ -0,0 +1,150 @@ +{ + "data": [ + { + "tag": "req pizza_example.oven_controller", + "location": { + "kind": "file", + "file": "pizza_software_requirements.trlc", + "line": 4, + "column": 30 + }, + "name": "pizza_example.oven_controller", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "software_requirement", + "text": "The software shall control oven temperature and cooking timer", + "status": null + }, + { + "tag": "req pizza_example.route_planner", + "location": { + "kind": "file", + "file": "pizza_software_requirements.trlc", + "line": 8, + "column": 30 + }, + "name": "pizza_example.route_planner", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "software_requirement", + "text": "The software shall calculate fastest delivery routes", + "status": null + }, + { + "tag": "req pizza_example.order_processor", + "location": { + "kind": "file", + "file": "pizza_software_requirements.trlc", + "line": 12, + "column": 30 + }, + "name": "pizza_example.order_processor", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "software_requirement", + "text": "The software shall manage pizza orders and customer details", + "status": null + }, + { + "tag": "req pizza_example.payment_gateway", + "location": { + "kind": "file", + "file": "pizza_software_requirements.trlc", + "line": 16, + "column": 30 + }, + "name": "pizza_example.payment_gateway", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "software_requirement", + "text": "The software shall handle credit card transactions securely", + "status": null + }, + { + "tag": "req pizza_example.gps_tracker", + "location": { + "kind": "file", + "file": "pizza_software_requirements.trlc", + "line": 20, + "column": 30 + }, + "name": "pizza_example.gps_tracker", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "software_requirement", + "text": "The software shall provide real-time delivery location updates", + "status": null + }, + { + "tag": "req pizza_example.stock_manager", + "location": { + "kind": "file", + "file": "pizza_software_requirements.trlc", + "line": 24, + "column": 30 + }, + "name": "pizza_example.stock_manager", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "software_requirement", + "text": "The software shall monitor ingredient levels and send alerts", + "status": null + }, + { + "tag": "req pizza_example.notification_system", + "location": { + "kind": "file", + "file": "pizza_software_requirements.trlc", + "line": 28, + "column": 30 + }, + "name": "pizza_example.notification_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "software_requirement", + "text": "The software shall send SMS and email updates to customers", + "status": null + }, + { + "tag": "req pizza_example.recipe_database", + "location": { + "kind": "file", + "file": "pizza_software_requirements.trlc", + "line": 32, + "column": 30 + }, + "name": "pizza_example.recipe_database", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "software_requirement", + "text": "The software shall store pizza recipes and quality standards", + "status": null + } + ], + "generator": "lobster-trlc", + "version": 5 +} diff --git a/tests_system/lobster_report/data/pizza_system_requirements_no_schema.lobster b/tests_system/lobster_report/data/pizza_system_requirements_no_schema.lobster new file mode 100644 index 000000000..2c2ab7751 --- /dev/null +++ b/tests_system/lobster_report/data/pizza_system_requirements_no_schema.lobster @@ -0,0 +1,150 @@ +{ + "data": [ + { + "tag": "req pizza_example.oven", + "location": { + "kind": "file", + "file": "pizza_system_requirements.trlc", + "line": 4, + "column": 28 + }, + "name": "pizza_example.oven", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "system_requirement", + "text": "The system shall heat pizzas to perfect crispy goodness", + "status": null + }, + { + "tag": "req pizza_example.delivery", + "location": { + "kind": "file", + "file": "pizza_system_requirements.trlc", + "line": 8, + "column": 28 + }, + "name": "pizza_example.delivery", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "system_requirement", + "text": "The system shall transport pizzas while they are still hot", + "status": null + }, + { + "tag": "req pizza_example.ordering", + "location": { + "kind": "file", + "file": "pizza_system_requirements.trlc", + "line": 12, + "column": 28 + }, + "name": "pizza_example.ordering", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "system_requirement", + "text": "The system shall accept pizza orders from hungry customers", + "status": null + }, + { + "tag": "req pizza_example.payment", + "location": { + "kind": "file", + "file": "pizza_system_requirements.trlc", + "line": 16, + "column": 28 + }, + "name": "pizza_example.payment", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "system_requirement", + "text": "The system shall process money without stealing tips", + "status": null + }, + { + "tag": "req pizza_example.tracking", + "location": { + "kind": "file", + "file": "pizza_system_requirements.trlc", + "line": 20, + "column": 28 + }, + "name": "pizza_example.tracking", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "system_requirement", + "text": "The system shall show where the pizza is on its journey", + "status": null + }, + { + "tag": "req pizza_example.inventory", + "location": { + "kind": "file", + "file": "pizza_system_requirements.trlc", + "line": 24, + "column": 28 + }, + "name": "pizza_example.inventory", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "system_requirement", + "text": "The system shall keep track of cheese and pepperoni supplies", + "status": null + }, + { + "tag": "req pizza_example.communication", + "location": { + "kind": "file", + "file": "pizza_system_requirements.trlc", + "line": 28, + "column": 28 + }, + "name": "pizza_example.communication", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "system_requirement", + "text": "The system shall notify customers when pizza arrives", + "status": null + }, + { + "tag": "req pizza_example.quality", + "location": { + "kind": "file", + "file": "pizza_system_requirements.trlc", + "line": 32, + "column": 28 + }, + "name": "pizza_example.quality", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "system_requirement", + "text": "The system shall ensure pizzas taste better than cardboard", + "status": null + } + ], + "generator": "lobster-trlc", + "version": 5 +} diff --git a/tests_system/lobster_report/data/pizza_unit_tests_no_schema.lobster b/tests_system/lobster_report/data/pizza_unit_tests_no_schema.lobster new file mode 100644 index 000000000..5d36f230f --- /dev/null +++ b/tests_system/lobster_report/data/pizza_unit_tests_no_schema.lobster @@ -0,0 +1,166 @@ +{ + "data": [ + { + "tag": "pyunit test_pizza_implementation.TestOvenController.test_start_cooking:18", + "location": { + "kind": "file", + "file": "test_pizza_implementation.py", + "line": 18, + "column": null + }, + "name": "test_pizza_implementation.TestOvenController.test_start_cooking:18", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req pizza_example.oven_controller" + ], + "framework": "PyUnit", + "kind": "Test", + "status": null + }, + { + "tag": "pyunit test_pizza_implementation.TestOrderProcessor.test_create_customer:33", + "location": { + "kind": "file", + "file": "test_pizza_implementation.py", + "line": 33, + "column": null + }, + "name": "test_pizza_implementation.TestOrderProcessor.test_create_customer:33", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req pizza_example.order_processor" + ], + "framework": "PyUnit", + "kind": "Test", + "status": null + }, + { + "tag": "pyunit test_pizza_implementation.TestOrderProcessor.test_place_order:43", + "location": { + "kind": "file", + "file": "test_pizza_implementation.py", + "line": 43, + "column": null + }, + "name": "test_pizza_implementation.TestOrderProcessor.test_place_order:43", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req pizza_example.order_processor" + ], + "framework": "PyUnit", + "kind": "Test", + "status": null + }, + { + "tag": "pyunit test_pizza_implementation.TestPaymentGateway.test_process_payment_valid:57", + "location": { + "kind": "file", + "file": "test_pizza_implementation.py", + "line": 57, + "column": null + }, + "name": "test_pizza_implementation.TestPaymentGateway.test_process_payment_valid:57", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req pizza_example.payment_gateway" + ], + "framework": "PyUnit", + "kind": "Test", + "status": null + }, + { + "tag": "pyunit test_pizza_implementation.TestInventoryManager.test_use_ingredients:71", + "location": { + "kind": "file", + "file": "test_pizza_implementation.py", + "line": 71, + "column": null + }, + "name": "test_pizza_implementation.TestInventoryManager.test_use_ingredients:71", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req pizza_example.stock_manager" + ], + "framework": "PyUnit", + "kind": "Test", + "status": null + }, + { + "tag": "pyunit test_pizza_implementation.TestNotificationSystem.test_send_sms:86", + "location": { + "kind": "file", + "file": "test_pizza_implementation.py", + "line": 86, + "column": null + }, + "name": "test_pizza_implementation.TestNotificationSystem.test_send_sms:86", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req pizza_example.notification_system" + ], + "framework": "PyUnit", + "kind": "Test", + "status": null + }, + { + "tag": "pyunit test_pizza_implementation.TestRecipeDatabase.test_get_recipe:100", + "location": { + "kind": "file", + "file": "test_pizza_implementation.py", + "line": 100, + "column": null + }, + "name": "test_pizza_implementation.TestRecipeDatabase.test_get_recipe:100", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req pizza_example.recipe_database" + ], + "framework": "PyUnit", + "kind": "Test", + "status": null + }, + { + "tag": "pyunit test_pizza_implementation.TestRouteOptimizer.test_calculate_route_empty:114", + "location": { + "kind": "file", + "file": "test_pizza_implementation.py", + "line": 114, + "column": null + }, + "name": "test_pizza_implementation.TestRouteOptimizer.test_calculate_route_empty:114", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req pizza_example.route_planner" + ], + "framework": "PyUnit", + "kind": "Test", + "status": null + } + ], + "generator": "lobster_python", + "version": 5 +} diff --git a/tests_system/lobster_report/data/python_invalid_input_no_schema.lobster b/tests_system/lobster_report/data/python_invalid_input_no_schema.lobster new file mode 100644 index 000000000..8d8d271ba --- /dev/null +++ b/tests_system/lobster_report/data/python_invalid_input_no_schema.lobster @@ -0,0 +1,24 @@ +{ + "data": [ + { + "tag": "python software.Example", + "location": { + "file": ".\\software.py", + "line": 1, + "column": null + }, + "name": "software.Example", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.adas_100" + ], + "language": "Python", + "kind": "Function" + } + ], + "generator": "lobster_python", + "version": 5 +} diff --git a/tests_system/lobster_report/data/python_justified_no_schema.lobster b/tests_system/lobster_report/data/python_justified_no_schema.lobster new file mode 100644 index 000000000..9fb193a65 --- /dev/null +++ b/tests_system/lobster_report/data/python_justified_no_schema.lobster @@ -0,0 +1,22 @@ +{ + "data": [ + { + "tag": "python software.Example", + "location": { + "kind": "file", + "file": ".\\software.py", + "line": 1, + "column": null + }, + "name": "software.Example", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "language": "Python", + "kind": "Function" + } + ], + "generator": "lobster_python", + "version": 5 +} diff --git a/tests_system/lobster_report/data/python_message_trace_coverage_no_schema.lobster b/tests_system/lobster_report/data/python_message_trace_coverage_no_schema.lobster new file mode 100644 index 000000000..dbec29f94 --- /dev/null +++ b/tests_system/lobster_report/data/python_message_trace_coverage_no_schema.lobster @@ -0,0 +1,25 @@ +{ + "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", + "version": 5 +} diff --git a/tests_system/lobster_report/data/python_missing_no_schema.lobster b/tests_system/lobster_report/data/python_missing_no_schema.lobster new file mode 100644 index 000000000..9fb193a65 --- /dev/null +++ b/tests_system/lobster_report/data/python_missing_no_schema.lobster @@ -0,0 +1,22 @@ +{ + "data": [ + { + "tag": "python software.Example", + "location": { + "kind": "file", + "file": ".\\software.py", + "line": 1, + "column": null + }, + "name": "software.Example", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "language": "Python", + "kind": "Function" + } + ], + "generator": "lobster_python", + "version": 5 +} diff --git a/tests_system/lobster_report/data/python_mixed_no_schema.lobster b/tests_system/lobster_report/data/python_mixed_no_schema.lobster new file mode 100644 index 000000000..6b7ef4b64 --- /dev/null +++ b/tests_system/lobster_report/data/python_mixed_no_schema.lobster @@ -0,0 +1,25 @@ +{ + "data": [ + { + "tag": "python software.Example", + "location": { + "kind": "file", + "file": ".\\software.py", + "line": 1, + "column": null + }, + "name": "software.Example", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.adas_100_A" + ], + "language": "Python", + "kind": "Function" + } + ], + "generator": "lobster_python", + "version": 5 +} diff --git a/tests_system/lobster_report/data/python_ok_no_schema.lobster b/tests_system/lobster_report/data/python_ok_no_schema.lobster new file mode 100644 index 000000000..d5e3c6c8f --- /dev/null +++ b/tests_system/lobster_report/data/python_ok_no_schema.lobster @@ -0,0 +1,196 @@ +{ + "data": [ + { + "tag": "python vehicle_implementation.StupidVehicle.vehicle_exists", + "location": { + "kind": "file", + "file": ".\\vehicle_implementation.py", + "line": 24, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.vehicle_exists", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.vehicle" + ], + "language": "Python", + "kind": "Method" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.run_engine", + "location": { + "kind": "file", + "file": ".\\vehicle_implementation.py", + "line": 30, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.run_engine", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.engine" + ], + "language": "Python", + "kind": "Method" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.activate_safety_system", + "location": { + "kind": "file", + "file": ".\\vehicle_implementation.py", + "line": 43, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.activate_safety_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.safety_system" + ], + "language": "Python", + "kind": "Method" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.apply_brakes", + "location": { + "kind": "file", + "file": ".\\vehicle_implementation.py", + "line": 63, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.apply_brakes", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.braking_system" + ], + "language": "Python", + "kind": "Method" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.check_electrical_system", + "location": { + "kind": "file", + "file": ".\\vehicle_implementation.py", + "line": 84, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.check_electrical_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.electrical_system" + ], + "language": "Python", + "kind": "Method" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.operate_fuel_system", + "location": { + "kind": "file", + "file": ".\\vehicle_implementation.py", + "line": 101, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.operate_fuel_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.fuel_system" + ], + "language": "Python", + "kind": "Method" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.operate_transmission_system", + "location": { + "kind": "file", + "file": ".\\vehicle_implementation.py", + "line": 115, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.operate_transmission_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.transmission_system" + ], + "language": "Python", + "kind": "Method" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.control_steering_system", + "location": { + "kind": "file", + "file": ".\\vehicle_implementation.py", + "line": 131, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.control_steering_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.steering_system" + ], + "language": "Python", + "kind": "Method" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.operate_lighting_system", + "location": { + "kind": "file", + "file": ".\\vehicle_implementation.py", + "line": 150, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.operate_lighting_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.lighting_system" + ], + "language": "Python", + "kind": "Method" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.control_climate_system", + "location": { + "kind": "file", + "file": ".\\vehicle_implementation.py", + "line": 176, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.control_climate_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.climate_control" + ], + "language": "Python", + "kind": "Method" + } + ], + "generator": "lobster_python", + "version": 5 +} diff --git a/tests_system/lobster_report/data/python_unknown_tracing_target_no_schema.lobster b/tests_system/lobster_report/data/python_unknown_tracing_target_no_schema.lobster new file mode 100644 index 000000000..771aa77ec --- /dev/null +++ b/tests_system/lobster_report/data/python_unknown_tracing_target_no_schema.lobster @@ -0,0 +1,25 @@ +{ + "data": [ + { + "tag": "python software.Example", + "location": { + "kind": "file", + "file": ".\\software.py", + "line": 1, + "column": null + }, + "name": "software.Example", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req example.adas_100" + ], + "language": "Python", + "kind": "Function" + } + ], + "generator": "lobster_python", + "version": 5 +} diff --git a/tests_system/lobster_report/data/python_unversioned_trace_dest_no_schema.lobster b/tests_system/lobster_report/data/python_unversioned_trace_dest_no_schema.lobster new file mode 100644 index 000000000..4018ca293 --- /dev/null +++ b/tests_system/lobster_report/data/python_unversioned_trace_dest_no_schema.lobster @@ -0,0 +1,25 @@ +{ + "data": [ + { + "tag": "python software.Example", + "location": { + "kind": "file", + "file": ".\\software.py", + "line": 1, + "column": null + }, + "name": "software.Example", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "python software.Example@1.0" + ], + "language": "Python", + "kind": "Function" + } + ], + "generator": "lobster_python", + "version": 5 +} diff --git a/tests_system/lobster_report/data/python_ver_mismatch_trace_dest_no_schema.lobster b/tests_system/lobster_report/data/python_ver_mismatch_trace_dest_no_schema.lobster new file mode 100644 index 000000000..310ff21f7 --- /dev/null +++ b/tests_system/lobster_report/data/python_ver_mismatch_trace_dest_no_schema.lobster @@ -0,0 +1,25 @@ +{ + "data": [ + { + "tag": "python software.Example@2", + "location": { + "kind": "file", + "file": ".\\software.py", + "line": 1, + "column": null + }, + "name": "software.Example", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "python software.Example@1" + ], + "language": "Python", + "kind": "Function" + } + ], + "generator": "lobster_python", + "version": 5 +} diff --git a/tests_system/lobster_report/data/python_zero_items_no_schema.lobster b/tests_system/lobster_report/data/python_zero_items_no_schema.lobster new file mode 100644 index 000000000..0649da5b9 --- /dev/null +++ b/tests_system/lobster_report/data/python_zero_items_no_schema.lobster @@ -0,0 +1,5 @@ +{ + "data": [], + "generator": "manual_empty", + "version": 5 +} diff --git a/tests_system/lobster_report/data/report_codebeamer_links_yaml_no_schema.lobster b/tests_system/lobster_report/data/report_codebeamer_links_yaml_no_schema.lobster new file mode 100644 index 000000000..f14a9561a --- /dev/null +++ b/tests_system/lobster_report/data/report_codebeamer_links_yaml_no_schema.lobster @@ -0,0 +1,212 @@ +{ + "schema": "lobster-report", + "version": 2, + "generator": "lobster_report", + "levels": [ + { + "name": "Requirements", + "items": [ + { + "tag": "req 1@100", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 10000, + "item": 1, + "version": 100, + "name": "Requirement 1: Dynamic name" + }, + "name": "Requirement 1: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python codebeamer_funny_impl.translate_dog_barking" + ], + "tracing_status": "OK" + }, + { + "tag": "req 2@200", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 20000, + "item": 2, + "version": 200, + "name": "Requirement 2: Dynamic name" + }, + "name": "Requirement 2: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python codebeamer_funny_impl.organize_cloud_shapes" + ], + "tracing_status": "OK" + }, + { + "tag": "req 3@300", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 30000, + "item": 3, + "version": 300, + "name": "Requirement 3: Dynamic name" + }, + "name": "Requirement 3: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python codebeamer_funny_impl.schedule_cat_meetings" + ], + "tracing_status": "OK" + }, + { + "tag": "req 4@400", + "location": { + "kind": "codebeamer", + "cb_root": "https://localhost:8999", + "tracker": 40000, + "item": 4, + "version": 400, + "name": "Requirement 4: Dynamic name" + }, + "name": "Requirement 4: Dynamic name", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python codebeamer_funny_impl.calibrate_sandwich_perfection" + ], + "tracing_status": "OK" + } + ], + "coverage": 100.0 + }, + { + "name": "Code", + "items": [ + { + "tag": "python codebeamer_funny_impl.translate_dog_barking", + "location": { + "kind": "file", + "file": "codebeamer_funny_impl.py", + "line": 6, + "column": null + }, + "name": "codebeamer_funny_impl.translate_dog_barking", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req 1@100" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python codebeamer_funny_impl.organize_cloud_shapes", + "location": { + "kind": "file", + "file": "codebeamer_funny_impl.py", + "line": 11, + "column": null + }, + "name": "codebeamer_funny_impl.organize_cloud_shapes", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req 2@200" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python codebeamer_funny_impl.schedule_cat_meetings", + "location": { + "kind": "file", + "file": "codebeamer_funny_impl.py", + "line": 16, + "column": null + }, + "name": "codebeamer_funny_impl.schedule_cat_meetings", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req 3@300" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python codebeamer_funny_impl.calibrate_sandwich_perfection", + "location": { + "kind": "file", + "file": "codebeamer_funny_impl.py", + "line": 21, + "column": null + }, + "name": "codebeamer_funny_impl.calibrate_sandwich_perfection", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req 4@400" + ], + "ref_down": [], + "tracing_status": "OK" + } + ], + "coverage": 100.0 + } + ], + "policy": { + "Requirements": { + "name": "Requirements", + "traces": [], + "source": [ + { + "file": "codebeamer_items_no_schema.lobster" + } + ], + "needs_tracing_up": false, + "needs_tracing_down": true, + "breakdown_requirements": [ + [ + "Code" + ] + ] + }, + "Code": { + "name": "Code", + "traces": [ + "Requirements" + ], + "source": [ + { + "file": "codebeamer_funny_impl_no_schema.lobster" + } + ], + "needs_tracing_up": true, + "needs_tracing_down": false, + "breakdown_requirements": [] + } + }, + "matrix": [] +} diff --git a/tests_system/lobster_report/data/report_justified_yaml_no_schema.lobster b/tests_system/lobster_report/data/report_justified_yaml_no_schema.lobster new file mode 100644 index 000000000..54805a189 --- /dev/null +++ b/tests_system/lobster_report/data/report_justified_yaml_no_schema.lobster @@ -0,0 +1,86 @@ +{ + "schema": "lobster-report", + "version": 2, + "generator": "lobster_report", + "levels": [ + { + "name": "Requirements", + "items": [ + { + "tag": "req example.adas_100_A", + "location": { + "kind": "file", + "file": "./demo.trlc", + "line": 3, + "column": 13 + }, + "name": "example.adas_100_A", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [ + "not linked" + ], + "tracing_status": "JUSTIFIED" + } + ], + "coverage": 100.0 + }, + { + "name": "Code", + "items": [ + { + "tag": "python software.Example", + "location": { + "kind": "file", + "file": "./software.py", + "line": 1, + "column": null + }, + "name": "software.Example", + "messages": [ + "missing up reference" + ], + "just_up": [], + "just_down": [], + "just_global": [], + "tracing_status": "MISSING" + } + ], + "coverage": 0.0 + } + ], + "policy": { + "Requirements": { + "name": "Requirements", + "traces": [], + "source": [ + { + "file": "trlc_justified_no_schema.lobster" + } + ], + "needs_tracing_up": false, + "needs_tracing_down": true, + "breakdown_requirements": [ + [ + "Code" + ] + ] + }, + "Code": { + "name": "Code", + "traces": [ + "Requirements" + ], + "source": [ + { + "file": "python_justified_no_schema.lobster" + } + ], + "needs_tracing_up": true, + "needs_tracing_down": false, + "breakdown_requirements": [] + } + }, + "matrix": [] +} diff --git a/tests_system/lobster_report/data/report_linear_yaml_no_schema.lobster b/tests_system/lobster_report/data/report_linear_yaml_no_schema.lobster new file mode 100644 index 000000000..7e19c9d97 --- /dev/null +++ b/tests_system/lobster_report/data/report_linear_yaml_no_schema.lobster @@ -0,0 +1,332 @@ +{ + "schema": "lobster-report", + "version": 2, + "generator": "lobster_report", + "levels": [ + { + "name": "System Requirements", + "items": [ + { + "tag": "req software_example.finder", + "location": { + "kind": "file", + "file": "linear_requirements.trlc", + "line": 4, + "column": 28 + }, + "name": "software_example.finder", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "req software_example.search_books" + ], + "tracing_status": "OK" + }, + { + "tag": "req software_example.tracker", + "location": { + "kind": "file", + "file": "linear_requirements.trlc", + "line": 8, + "column": 28 + }, + "name": "software_example.tracker", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "req software_example.reading_tracker" + ], + "tracing_status": "OK" + }, + { + "tag": "req software_example.organizer", + "location": { + "kind": "file", + "file": "linear_requirements.trlc", + "line": 12, + "column": 28 + }, + "name": "software_example.organizer", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "req software_example.library_manager" + ], + "tracing_status": "OK" + }, + { + "tag": "req software_example.reviews", + "location": { + "kind": "file", + "file": "linear_requirements.trlc", + "line": 16, + "column": 28 + }, + "name": "software_example.reviews", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "req software_example.book_reviews" + ], + "tracing_status": "OK" + } + ], + "coverage": 100.0 + }, + { + "name": "Software Requirements", + "items": [ + { + "tag": "req software_example.search_books", + "location": { + "kind": "file", + "file": "linear_requirements.trlc", + "line": 20, + "column": 30 + }, + "name": "software_example.search_books", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req software_example.finder" + ], + "ref_down": [ + "python simple_book_system.SimpleBookSystem.search_books" + ], + "tracing_status": "OK" + }, + { + "tag": "req software_example.reading_tracker", + "location": { + "kind": "file", + "file": "linear_requirements.trlc", + "line": 25, + "column": 30 + }, + "name": "software_example.reading_tracker", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req software_example.tracker" + ], + "ref_down": [ + "python simple_book_system.SimpleBookSystem.track_progress" + ], + "tracing_status": "OK" + }, + { + "tag": "req software_example.library_manager", + "location": { + "kind": "file", + "file": "linear_requirements.trlc", + "line": 30, + "column": 30 + }, + "name": "software_example.library_manager", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req software_example.organizer" + ], + "ref_down": [ + "python simple_book_system.SimpleBookSystem.organize_library" + ], + "tracing_status": "OK" + }, + { + "tag": "req software_example.book_reviews", + "location": { + "kind": "file", + "file": "linear_requirements.trlc", + "line": 35, + "column": 30 + }, + "name": "software_example.book_reviews", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req software_example.reviews" + ], + "ref_down": [ + "python simple_book_system.SimpleBookSystem.add_review", + "python simple_book_system.SimpleBookSystem.show_reviews" + ], + "tracing_status": "OK" + } + ], + "coverage": 100.0 + }, + { + "name": "Code", + "items": [ + { + "tag": "python simple_book_system.SimpleBookSystem.search_books", + "location": { + "kind": "file", + "file": "simple_book_system.py", + "line": 24, + "column": null + }, + "name": "simple_book_system.SimpleBookSystem.search_books", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req software_example.search_books" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python simple_book_system.SimpleBookSystem.track_progress", + "location": { + "kind": "file", + "file": "simple_book_system.py", + "line": 41, + "column": null + }, + "name": "simple_book_system.SimpleBookSystem.track_progress", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req software_example.reading_tracker" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python simple_book_system.SimpleBookSystem.organize_library", + "location": { + "kind": "file", + "file": "simple_book_system.py", + "line": 59, + "column": null + }, + "name": "simple_book_system.SimpleBookSystem.organize_library", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req software_example.library_manager" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python simple_book_system.SimpleBookSystem.add_review", + "location": { + "kind": "file", + "file": "simple_book_system.py", + "line": 74, + "column": null + }, + "name": "simple_book_system.SimpleBookSystem.add_review", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req software_example.book_reviews" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python simple_book_system.SimpleBookSystem.show_reviews", + "location": { + "kind": "file", + "file": "simple_book_system.py", + "line": 90, + "column": null + }, + "name": "simple_book_system.SimpleBookSystem.show_reviews", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req software_example.book_reviews" + ], + "ref_down": [], + "tracing_status": "OK" + } + ], + "coverage": 100.0 + } + ], + "policy": { + "System Requirements": { + "name": "System Requirements", + "traces": [], + "source": [ + { + "file": "linear_system_requirements_no_schema.lobster" + } + ], + "needs_tracing_up": false, + "needs_tracing_down": true, + "breakdown_requirements": [ + [ + "Software Requirements" + ] + ] + }, + "Software Requirements": { + "name": "Software Requirements", + "traces": [ + "System Requirements" + ], + "source": [ + { + "file": "linear_software_requirements_no_schema.lobster" + } + ], + "needs_tracing_up": true, + "needs_tracing_down": true, + "breakdown_requirements": [ + [ + "Code" + ] + ] + }, + "Code": { + "name": "Code", + "traces": [ + "Software Requirements" + ], + "source": [ + { + "file": "code_linear_no_schema.lobster" + } + ], + "needs_tracing_up": true, + "needs_tracing_down": false, + "breakdown_requirements": [] + } + }, + "matrix": [] +} diff --git a/tests_system/lobster_report/data/report_message_trace_coverage_yaml_no_schema.lobster b/tests_system/lobster_report/data/report_message_trace_coverage_yaml_no_schema.lobster new file mode 100644 index 000000000..2cf5a8f58 --- /dev/null +++ b/tests_system/lobster_report/data/report_message_trace_coverage_yaml_no_schema.lobster @@ -0,0 +1,92 @@ +{ + "schema": "lobster-report", + "version": 2, + "generator": "lobster_report", + "levels": [ + { + "name": "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" + } + ], + "coverage": 100.0 + }, + { + "name": "Code", + "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" + } + ], + "coverage": 0.0 + } + ], + "policy": { + "Requirements": { + "name": "Requirements", + "traces": [], + "source": [ + { + "file": "trlc_message_trace_coverage_no_schema.lobster" + } + ], + "needs_tracing_up": false, + "needs_tracing_down": true, + "breakdown_requirements": [ + [ + "Code" + ] + ] + }, + "Code": { + "name": "Code", + "traces": [ + "Requirements" + ], + "source": [ + { + "file": "python_message_trace_coverage_no_schema.lobster" + } + ], + "needs_tracing_up": true, + "needs_tracing_down": false, + "breakdown_requirements": [] + } + }, + "matrix": [] +} diff --git a/tests_system/lobster_report/data/report_missing_yaml_no_schema.lobster b/tests_system/lobster_report/data/report_missing_yaml_no_schema.lobster new file mode 100644 index 000000000..62522aa4c --- /dev/null +++ b/tests_system/lobster_report/data/report_missing_yaml_no_schema.lobster @@ -0,0 +1,86 @@ +{ + "schema": "lobster-report", + "version": 2, + "generator": "lobster_report", + "levels": [ + { + "name": "Requirements", + "items": [ + { + "tag": "req example.adas_100_A", + "location": { + "kind": "file", + "file": "./demo.trlc", + "line": 3, + "column": 13 + }, + "name": "example.adas_100_A", + "messages": [ + "missing reference to Code" + ], + "just_up": [], + "just_down": [], + "just_global": [], + "tracing_status": "MISSING" + } + ], + "coverage": 0.0 + }, + { + "name": "Code", + "items": [ + { + "tag": "python software.Example", + "location": { + "kind": "file", + "file": "./software.py", + "line": 1, + "column": null + }, + "name": "software.Example", + "messages": [ + "missing up reference" + ], + "just_up": [], + "just_down": [], + "just_global": [], + "tracing_status": "MISSING" + } + ], + "coverage": 0.0 + } + ], + "policy": { + "Requirements": { + "name": "Requirements", + "traces": [], + "source": [ + { + "file": "trlc_missing_no_schema.lobster" + } + ], + "needs_tracing_up": false, + "needs_tracing_down": true, + "breakdown_requirements": [ + [ + "Code" + ] + ] + }, + "Code": { + "name": "Code", + "traces": [ + "Requirements" + ], + "source": [ + { + "file": "python_missing_no_schema.lobster" + } + ], + "needs_tracing_up": true, + "needs_tracing_down": false, + "breakdown_requirements": [] + } + }, + "matrix": [] +} diff --git a/tests_system/lobster_report/data/report_mixed_yaml_no_schema.lobster b/tests_system/lobster_report/data/report_mixed_yaml_no_schema.lobster new file mode 100644 index 000000000..3c8892749 --- /dev/null +++ b/tests_system/lobster_report/data/report_mixed_yaml_no_schema.lobster @@ -0,0 +1,107 @@ +{ + "schema": "lobster-report", + "version": 2, + "generator": "lobster_report", + "levels": [ + { + "name": "Requirements", + "items": [ + { + "tag": "req example.adas_100_A", + "location": { + "kind": "file", + "file": "./demo.trlc", + "line": 3, + "column": 13 + }, + "name": "example.adas_100_A", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python software.Example" + ], + "tracing_status": "OK" + }, + { + "tag": "req example.adas_100_B", + "location": { + "kind": "file", + "file": "./demo.trlc", + "line": 8, + "column": 13 + }, + "name": "example.adas_100_B", + "messages": [ + "missing reference to Code" + ], + "just_up": [], + "just_down": [], + "just_global": [], + "tracing_status": "MISSING" + } + ], + "coverage": 50.0 + }, + { + "name": "Code", + "items": [ + { + "tag": "python software.Example", + "location": { + "kind": "file", + "file": "./software.py", + "line": 1, + "column": null + }, + "name": "software.Example", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.adas_100_A" + ], + "ref_down": [], + "tracing_status": "OK" + } + ], + "coverage": 100.0 + } + ], + "policy": { + "Requirements": { + "name": "Requirements", + "traces": [], + "source": [ + { + "file": "trlc_mixed_no_schema.lobster" + } + ], + "needs_tracing_up": false, + "needs_tracing_down": true, + "breakdown_requirements": [ + [ + "Code" + ] + ] + }, + "Code": { + "name": "Code", + "traces": [ + "Requirements" + ], + "source": [ + { + "file": "python_mixed_no_schema.lobster" + } + ], + "needs_tracing_up": true, + "needs_tracing_down": false, + "breakdown_requirements": [] + } + }, + "matrix": [] +} diff --git a/tests_system/lobster_report/data/report_multiple_traces_just_yaml_no_schema.lobster b/tests_system/lobster_report/data/report_multiple_traces_just_yaml_no_schema.lobster new file mode 100644 index 000000000..fa6fb606f --- /dev/null +++ b/tests_system/lobster_report/data/report_multiple_traces_just_yaml_no_schema.lobster @@ -0,0 +1,841 @@ +{ + "schema": "lobster-report", + "version": 2, + "generator": "lobster_report", + "levels": [ + { + "name": "Requirements", + "items": [ + { + "tag": "req example.vehicle", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 3, + "column": 13 + }, + "name": "example.vehicle", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python vehicle_implementation.StupidVehicle.vehicle_exists", + "python vehicle_implementation.StupidVehicle.run_vehicle_diagnostics", + "pyunit test_vehicle_implementation.TestStupidVehicle.test_vehicle_exists:25", + "pyunit test_vehicle_implementation.TestStupidVehicle.test_full_vehicle_diagnostics:150" + ], + "tracing_status": "OK" + }, + { + "tag": "req example.engine", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 7, + "column": 13 + }, + "name": "example.engine", + "messages": [], + "just_up": [ + "Not applicable everywhere" + ], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python vehicle_implementation.StupidVehicle.run_engine", + "python vehicle_implementation.StupidVehicle.comprehensive_system_check", + "python vehicle_implementation.StupidVehicle.run_vehicle_diagnostics", + "pyunit test_vehicle_implementation.TestStupidVehicle.test_engine_functionality:31", + "pyunit test_vehicle_implementation.TestStupidVehicle.test_comprehensive_system_check:135", + "pyunit test_vehicle_implementation.TestStupidVehicle.test_full_vehicle_diagnostics:150", + "pyunit test_vehicle_implementation.TestVehicleIntegration.test_engine_fuel_integration:172", + "pyunit test_vehicle_implementation.TestVehicleIntegration.test_mobility_systems_integration:196" + ], + "tracing_status": "JUSTIFIED" + }, + { + "tag": "req example.safety_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 12, + "column": 13 + }, + "name": "example.safety_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python vehicle_implementation.StupidVehicle.activate_safety_system", + "python vehicle_implementation.StupidVehicle.comprehensive_system_check", + "python vehicle_implementation.StupidVehicle.run_vehicle_diagnostics", + "pyunit test_vehicle_implementation.TestStupidVehicle.test_safety_system_activation:45", + "pyunit test_vehicle_implementation.TestStupidVehicle.test_comprehensive_system_check:135", + "pyunit test_vehicle_implementation.TestStupidVehicle.test_full_vehicle_diagnostics:150", + "pyunit test_vehicle_implementation.TestVehicleIntegration.test_safety_electrical_integration:185" + ], + "tracing_status": "OK" + }, + { + "tag": "req example.braking_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 16, + "column": 13 + }, + "name": "example.braking_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python vehicle_implementation.StupidVehicle.apply_brakes", + "pyunit test_vehicle_implementation.TestStupidVehicle.test_braking_system:51", + "pyunit test_vehicle_implementation.TestStupidVehicle.test_full_vehicle_diagnostics:150", + "pyunit test_vehicle_implementation.TestVehicleIntegration.test_mobility_systems_integration:196" + ], + "tracing_status": "OK" + }, + { + "tag": "req example.electrical_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 20, + "column": 13 + }, + "name": "example.electrical_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python vehicle_implementation.StupidVehicle.check_electrical_system", + "python vehicle_implementation.StupidVehicle.comprehensive_system_check", + "pyunit test_vehicle_implementation.TestStupidVehicle.test_electrical_system:65", + "pyunit test_vehicle_implementation.TestStupidVehicle.test_comprehensive_system_check:135", + "pyunit test_vehicle_implementation.TestStupidVehicle.test_full_vehicle_diagnostics:150", + "pyunit test_vehicle_implementation.TestVehicleIntegration.test_safety_electrical_integration:185" + ], + "tracing_status": "OK" + }, + { + "tag": "req example.fuel_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 24, + "column": 13 + }, + "name": "example.fuel_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python vehicle_implementation.StupidVehicle.operate_fuel_system", + "python vehicle_implementation.StupidVehicle.comprehensive_system_check", + "pyunit test_vehicle_implementation.TestStupidVehicle.test_fuel_system_operation:77", + "pyunit test_vehicle_implementation.TestStupidVehicle.test_comprehensive_system_check:135", + "pyunit test_vehicle_implementation.TestStupidVehicle.test_full_vehicle_diagnostics:150", + "pyunit test_vehicle_implementation.TestVehicleIntegration.test_engine_fuel_integration:172" + ], + "tracing_status": "OK" + }, + { + "tag": "req example.transmission_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 28, + "column": 13 + }, + "name": "example.transmission_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python vehicle_implementation.StupidVehicle.operate_transmission_system", + "pyunit test_vehicle_implementation.TestStupidVehicle.test_transmission_system:90", + "pyunit test_vehicle_implementation.TestStupidVehicle.test_full_vehicle_diagnostics:150", + "pyunit test_vehicle_implementation.TestVehicleIntegration.test_mobility_systems_integration:196" + ], + "tracing_status": "OK" + }, + { + "tag": "req example.steering_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 32, + "column": 13 + }, + "name": "example.steering_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python vehicle_implementation.StupidVehicle.control_steering_system", + "pyunit test_vehicle_implementation.TestStupidVehicle.test_steering_system:102", + "pyunit test_vehicle_implementation.TestStupidVehicle.test_full_vehicle_diagnostics:150", + "pyunit test_vehicle_implementation.TestVehicleIntegration.test_mobility_systems_integration:196" + ], + "tracing_status": "OK" + }, + { + "tag": "req example.lighting_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 36, + "column": 13 + }, + "name": "example.lighting_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python vehicle_implementation.StupidVehicle.operate_lighting_system", + "pyunit test_vehicle_implementation.TestStupidVehicle.test_lighting_system:114", + "pyunit test_vehicle_implementation.TestStupidVehicle.test_full_vehicle_diagnostics:150" + ], + "tracing_status": "OK" + }, + { + "tag": "req example.climate_control", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 40, + "column": 13 + }, + "name": "example.climate_control", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python vehicle_implementation.StupidVehicle.control_climate_system", + "pyunit test_vehicle_implementation.TestStupidVehicle.test_climate_control:123", + "pyunit test_vehicle_implementation.TestStupidVehicle.test_full_vehicle_diagnostics:150" + ], + "tracing_status": "OK" + } + ], + "coverage": 100.0 + }, + { + "name": "Code", + "items": [ + { + "tag": "python vehicle_implementation.StupidVehicle.vehicle_exists", + "location": { + "kind": "file", + "file": "vehicle_implementation.py", + "line": 24, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.vehicle_exists", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.vehicle" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.run_engine", + "location": { + "kind": "file", + "file": "vehicle_implementation.py", + "line": 30, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.run_engine", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.engine" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.activate_safety_system", + "location": { + "kind": "file", + "file": "vehicle_implementation.py", + "line": 43, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.activate_safety_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.safety_system" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.apply_brakes", + "location": { + "kind": "file", + "file": "vehicle_implementation.py", + "line": 63, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.apply_brakes", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.braking_system" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.check_electrical_system", + "location": { + "kind": "file", + "file": "vehicle_implementation.py", + "line": 84, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.check_electrical_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.electrical_system" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.operate_fuel_system", + "location": { + "kind": "file", + "file": "vehicle_implementation.py", + "line": 101, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.operate_fuel_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.fuel_system" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.operate_transmission_system", + "location": { + "kind": "file", + "file": "vehicle_implementation.py", + "line": 115, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.operate_transmission_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.transmission_system" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.control_steering_system", + "location": { + "kind": "file", + "file": "vehicle_implementation.py", + "line": 131, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.control_steering_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.steering_system" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.operate_lighting_system", + "location": { + "kind": "file", + "file": "vehicle_implementation.py", + "line": 150, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.operate_lighting_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.lighting_system" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.control_climate_system", + "location": { + "kind": "file", + "file": "vehicle_implementation.py", + "line": 176, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.control_climate_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.climate_control" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.comprehensive_system_check", + "location": { + "kind": "file", + "file": "vehicle_implementation.py", + "line": 203, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.comprehensive_system_check", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.safety_system", + "req example.fuel_system", + "req example.electrical_system", + "req example.engine" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.run_vehicle_diagnostics", + "location": { + "kind": "file", + "file": "vehicle_implementation.py", + "line": 225, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.run_vehicle_diagnostics", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.safety_system", + "req example.engine", + "req example.vehicle" + ], + "ref_down": [], + "tracing_status": "OK" + } + ], + "coverage": 100.0 + }, + { + "name": "Test", + "items": [ + { + "tag": "pyunit test_vehicle_implementation.TestStupidVehicle.test_vehicle_exists:25", + "location": { + "kind": "file", + "file": "test_vehicle_implementation.py", + "line": 25, + "column": null + }, + "name": "test_vehicle_implementation.TestStupidVehicle.test_vehicle_exists:25", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.vehicle" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "pyunit test_vehicle_implementation.TestStupidVehicle.test_engine_functionality:31", + "location": { + "kind": "file", + "file": "test_vehicle_implementation.py", + "line": 31, + "column": null + }, + "name": "test_vehicle_implementation.TestStupidVehicle.test_engine_functionality:31", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.engine" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "pyunit test_vehicle_implementation.TestStupidVehicle.test_safety_system_activation:45", + "location": { + "kind": "file", + "file": "test_vehicle_implementation.py", + "line": 45, + "column": null + }, + "name": "test_vehicle_implementation.TestStupidVehicle.test_safety_system_activation:45", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.safety_system" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "pyunit test_vehicle_implementation.TestStupidVehicle.test_braking_system:51", + "location": { + "kind": "file", + "file": "test_vehicle_implementation.py", + "line": 51, + "column": null + }, + "name": "test_vehicle_implementation.TestStupidVehicle.test_braking_system:51", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.braking_system" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "pyunit test_vehicle_implementation.TestStupidVehicle.test_electrical_system:65", + "location": { + "kind": "file", + "file": "test_vehicle_implementation.py", + "line": 65, + "column": null + }, + "name": "test_vehicle_implementation.TestStupidVehicle.test_electrical_system:65", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.electrical_system" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "pyunit test_vehicle_implementation.TestStupidVehicle.test_fuel_system_operation:77", + "location": { + "kind": "file", + "file": "test_vehicle_implementation.py", + "line": 77, + "column": null + }, + "name": "test_vehicle_implementation.TestStupidVehicle.test_fuel_system_operation:77", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.fuel_system" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "pyunit test_vehicle_implementation.TestStupidVehicle.test_transmission_system:90", + "location": { + "kind": "file", + "file": "test_vehicle_implementation.py", + "line": 90, + "column": null + }, + "name": "test_vehicle_implementation.TestStupidVehicle.test_transmission_system:90", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.transmission_system" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "pyunit test_vehicle_implementation.TestStupidVehicle.test_steering_system:102", + "location": { + "kind": "file", + "file": "test_vehicle_implementation.py", + "line": 102, + "column": null + }, + "name": "test_vehicle_implementation.TestStupidVehicle.test_steering_system:102", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.steering_system" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "pyunit test_vehicle_implementation.TestStupidVehicle.test_lighting_system:114", + "location": { + "kind": "file", + "file": "test_vehicle_implementation.py", + "line": 114, + "column": null + }, + "name": "test_vehicle_implementation.TestStupidVehicle.test_lighting_system:114", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.lighting_system" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "pyunit test_vehicle_implementation.TestStupidVehicle.test_climate_control:123", + "location": { + "kind": "file", + "file": "test_vehicle_implementation.py", + "line": 123, + "column": null + }, + "name": "test_vehicle_implementation.TestStupidVehicle.test_climate_control:123", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.climate_control" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "pyunit test_vehicle_implementation.TestStupidVehicle.test_comprehensive_system_check:135", + "location": { + "kind": "file", + "file": "test_vehicle_implementation.py", + "line": 135, + "column": null + }, + "name": "test_vehicle_implementation.TestStupidVehicle.test_comprehensive_system_check:135", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.safety_system", + "req example.fuel_system", + "req example.electrical_system", + "req example.engine" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "pyunit test_vehicle_implementation.TestStupidVehicle.test_full_vehicle_diagnostics:150", + "location": { + "kind": "file", + "file": "test_vehicle_implementation.py", + "line": 150, + "column": null + }, + "name": "test_vehicle_implementation.TestStupidVehicle.test_full_vehicle_diagnostics:150", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.climate_control", + "req example.lighting_system", + "req example.steering_system", + "req example.transmission_system", + "req example.fuel_system", + "req example.electrical_system", + "req example.braking_system", + "req example.safety_system", + "req example.engine", + "req example.vehicle" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "pyunit test_vehicle_implementation.TestVehicleIntegration.test_engine_fuel_integration:172", + "location": { + "kind": "file", + "file": "test_vehicle_implementation.py", + "line": 172, + "column": null + }, + "name": "test_vehicle_implementation.TestVehicleIntegration.test_engine_fuel_integration:172", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.fuel_system", + "req example.engine" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "pyunit test_vehicle_implementation.TestVehicleIntegration.test_safety_electrical_integration:185", + "location": { + "kind": "file", + "file": "test_vehicle_implementation.py", + "line": 185, + "column": null + }, + "name": "test_vehicle_implementation.TestVehicleIntegration.test_safety_electrical_integration:185", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.electrical_system", + "req example.safety_system" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "pyunit test_vehicle_implementation.TestVehicleIntegration.test_mobility_systems_integration:196", + "location": { + "kind": "file", + "file": "test_vehicle_implementation.py", + "line": 196, + "column": null + }, + "name": "test_vehicle_implementation.TestVehicleIntegration.test_mobility_systems_integration:196", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.braking_system", + "req example.steering_system", + "req example.transmission_system", + "req example.engine" + ], + "ref_down": [], + "tracing_status": "OK" + } + ], + "coverage": 100.0 + } + ], + "policy": { + "Requirements": { + "name": "Requirements", + "traces": [], + "source": [ + { + "file": "just_requirements_no_schema.lobster" + } + ], + "needs_tracing_up": false, + "needs_tracing_down": true, + "breakdown_requirements": [ + [ + "Code" + ], + [ + "Test" + ] + ] + }, + "Code": { + "name": "Code", + "traces": [ + "Requirements" + ], + "source": [ + { + "file": "multiple_traces_code_no_schema.lobster" + } + ], + "needs_tracing_up": true, + "needs_tracing_down": false, + "breakdown_requirements": [] + }, + "Test": { + "name": "Test", + "traces": [ + "Requirements" + ], + "source": [ + { + "file": "multiple_traces_test_no_schema.lobster" + } + ], + "needs_tracing_up": true, + "needs_tracing_down": false, + "breakdown_requirements": [] + } + }, + "matrix": [] +} diff --git a/tests_system/lobster_report/data/report_octopus_yaml_no_schema.lobster b/tests_system/lobster_report/data/report_octopus_yaml_no_schema.lobster new file mode 100644 index 000000000..52199655d --- /dev/null +++ b/tests_system/lobster_report/data/report_octopus_yaml_no_schema.lobster @@ -0,0 +1,652 @@ +{ + "schema": "lobster-report", + "version": 2, + "generator": "lobster_report", + "levels": [ + { + "name": "Requirements", + "items": [ + { + "tag": "req octopus_example.tentacle_coordination", + "location": { + "kind": "file", + "file": "octopus_requirements1.trlc", + "line": 4, + "column": 28 + }, + "name": "octopus_example.tentacle_coordination", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "req octopus_example.tentacle_motor_control", + "python tentacle_commander.TentacleCoordinator", + "pyunit test_tentacle_commander.TestTentacleCoordinator.test_move_tentacles:18" + ], + "tracing_status": "OK" + }, + { + "tag": "req octopus_example.color_camouflage", + "location": { + "kind": "file", + "file": "octopus_requirements2.trlc", + "line": 8, + "column": 29 + }, + "name": "octopus_example.color_camouflage", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "req octopus_example.chromatophore_processor", + "python tentacle_commander.ColorCamouflage", + "pyunit test_tentacle_commander.TestColorCamouflage.test_change_color_coral:28", + "pyunit test_tentacle_commander.TestColorCamouflage.test_change_color_sand:33" + ], + "tracing_status": "OK" + }, + { + "tag": "req octopus_example.ink_defense", + "location": { + "kind": "file", + "file": "octopus_requirements3.trlc", + "line": 12, + "column": 30 + }, + "name": "octopus_example.ink_defense", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "req octopus_example.ink_sac_trigger", + "python tentacle_commander.InkDefense", + "pyunit test_tentacle_commander.TestInkDefense.test_deploy_ink:42" + ], + "tracing_status": "OK" + }, + { + "tag": "req octopus_example.prey_detection", + "location": { + "kind": "file", + "file": "octopus_requirements4.trlc", + "line": 16, + "column": 40 + }, + "name": "octopus_example.prey_detection", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "req octopus_example.vision_processing_unit", + "python tentacle_commander.PreyDetection", + "pyunit test_tentacle_commander.TestPreyDetection.test_scan_for_prey:52" + ], + "tracing_status": "OK" + }, + { + "tag": "req octopus_example.tentacle_motor_control", + "location": { + "kind": "file", + "file": "octopus_requirements.trlc", + "line": 20, + "column": 30 + }, + "name": "octopus_example.tentacle_motor_control", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req octopus_example.tentacle_coordination" + ], + "ref_down": [ + "python tentacle_toolkit.MotorController", + "pyunit test_tentacle_toolkit.TestMotorController.test_control_motors:18" + ], + "tracing_status": "OK" + }, + { + "tag": "req octopus_example.chromatophore_processor", + "location": { + "kind": "file", + "file": "octopus_requirements.trlc", + "line": 25, + "column": 30 + }, + "name": "octopus_example.chromatophore_processor", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req octopus_example.color_camouflage" + ], + "ref_down": [ + "python tentacle_toolkit.ColorProcessor", + "pyunit test_tentacle_toolkit.TestColorProcessor.test_process_color_change:28" + ], + "tracing_status": "OK" + }, + { + "tag": "req octopus_example.ink_sac_trigger", + "location": { + "kind": "file", + "file": "octopus_requirements.trlc", + "line": 30, + "column": 30 + }, + "name": "octopus_example.ink_sac_trigger", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req octopus_example.ink_defense" + ], + "ref_down": [ + "python tentacle_toolkit.InkTrigger", + "pyunit test_tentacle_toolkit.TestInkTrigger.test_trigger_ink_release:38" + ], + "tracing_status": "OK" + }, + { + "tag": "req octopus_example.vision_processing_unit", + "location": { + "kind": "file", + "file": "octopus_requirements.trlc", + "line": 35, + "column": 30 + }, + "name": "octopus_example.vision_processing_unit", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req octopus_example.prey_detection" + ], + "ref_down": [ + "python tentacle_toolkit.VisionProcessor", + "pyunit test_tentacle_toolkit.TestVisionProcessor.test_process_vision:48" + ], + "tracing_status": "OK" + } + ], + "coverage": 100.0 + }, + { + "name": "Code", + "items": [ + { + "tag": "python tentacle_commander.TentacleCoordinator", + "location": { + "kind": "file", + "file": "tentacle_commander.py", + "line": 7, + "column": null + }, + "name": "tentacle_commander.TentacleCoordinator", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req octopus_example.tentacle_coordination" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python tentacle_commander.ColorCamouflage", + "location": { + "kind": "file", + "file": "tentacle_commander.py", + "line": 14, + "column": null + }, + "name": "tentacle_commander.ColorCamouflage", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req octopus_example.color_camouflage" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python tentacle_commander.InkDefense", + "location": { + "kind": "file", + "file": "tentacle_commander.py", + "line": 22, + "column": null + }, + "name": "tentacle_commander.InkDefense", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req octopus_example.ink_defense" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python tentacle_commander.PreyDetection", + "location": { + "kind": "file", + "file": "tentacle_commander.py", + "line": 29, + "column": null + }, + "name": "tentacle_commander.PreyDetection", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req octopus_example.prey_detection" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python tentacle_commander.DenSecurity", + "location": { + "kind": "file", + "file": "tentacle_commander.py", + "line": 37, + "column": null + }, + "name": "tentacle_commander.DenSecurity", + "messages": [ + "unknown tracing target req octopus_example.den_security", + "missing up reference" + ], + "just_up": [], + "just_down": [], + "just_global": [], + "tracing_status": "MISSING" + }, + { + "tag": "python tentacle_toolkit.MotorController", + "location": { + "kind": "file", + "file": "tentacle_toolkit.py", + "line": 7, + "column": null + }, + "name": "tentacle_toolkit.MotorController", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req octopus_example.tentacle_motor_control" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python tentacle_toolkit.ColorProcessor", + "location": { + "kind": "file", + "file": "tentacle_toolkit.py", + "line": 14, + "column": null + }, + "name": "tentacle_toolkit.ColorProcessor", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req octopus_example.chromatophore_processor" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python tentacle_toolkit.InkTrigger", + "location": { + "kind": "file", + "file": "tentacle_toolkit.py", + "line": 21, + "column": null + }, + "name": "tentacle_toolkit.InkTrigger", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req octopus_example.ink_sac_trigger" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python tentacle_toolkit.VisionProcessor", + "location": { + "kind": "file", + "file": "tentacle_toolkit.py", + "line": 28, + "column": null + }, + "name": "tentacle_toolkit.VisionProcessor", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req octopus_example.vision_processing_unit" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python tentacle_toolkit.ConstructionPlanner", + "location": { + "kind": "file", + "file": "tentacle_toolkit.py", + "line": 36, + "column": null + }, + "name": "tentacle_toolkit.ConstructionPlanner", + "messages": [ + "unknown tracing target req octopus_example.rock_arrangement_planner", + "missing up reference" + ], + "just_up": [], + "just_down": [], + "just_global": [], + "tracing_status": "MISSING" + } + ], + "coverage": 80.0 + }, + { + "name": "test", + "items": [ + { + "tag": "pyunit test_tentacle_commander.TestTentacleCoordinator.test_move_tentacles:18", + "location": { + "kind": "file", + "file": "test_tentacle_commander.py", + "line": 18, + "column": null + }, + "name": "test_tentacle_commander.TestTentacleCoordinator.test_move_tentacles:18", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req octopus_example.tentacle_coordination" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "pyunit test_tentacle_commander.TestColorCamouflage.test_change_color_coral:28", + "location": { + "kind": "file", + "file": "test_tentacle_commander.py", + "line": 28, + "column": null + }, + "name": "test_tentacle_commander.TestColorCamouflage.test_change_color_coral:28", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req octopus_example.color_camouflage" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "pyunit test_tentacle_commander.TestColorCamouflage.test_change_color_sand:33", + "location": { + "kind": "file", + "file": "test_tentacle_commander.py", + "line": 33, + "column": null + }, + "name": "test_tentacle_commander.TestColorCamouflage.test_change_color_sand:33", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req octopus_example.color_camouflage" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "pyunit test_tentacle_commander.TestInkDefense.test_deploy_ink:42", + "location": { + "kind": "file", + "file": "test_tentacle_commander.py", + "line": 42, + "column": null + }, + "name": "test_tentacle_commander.TestInkDefense.test_deploy_ink:42", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req octopus_example.ink_defense" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "pyunit test_tentacle_commander.TestPreyDetection.test_scan_for_prey:52", + "location": { + "kind": "file", + "file": "test_tentacle_commander.py", + "line": 52, + "column": null + }, + "name": "test_tentacle_commander.TestPreyDetection.test_scan_for_prey:52", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req octopus_example.prey_detection" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "pyunit test_tentacle_commander.TestDenSecurity.test_secure_den:62", + "location": { + "kind": "file", + "file": "test_tentacle_commander.py", + "line": 62, + "column": null + }, + "name": "test_tentacle_commander.TestDenSecurity.test_secure_den:62", + "messages": [ + "unknown tracing target req octopus_example.den_security", + "missing up reference" + ], + "just_up": [], + "just_down": [], + "just_global": [], + "tracing_status": "MISSING" + }, + { + "tag": "pyunit test_tentacle_toolkit.TestMotorController.test_control_motors:18", + "location": { + "kind": "file", + "file": "test_tentacle_toolkit.py", + "line": 18, + "column": null + }, + "name": "test_tentacle_toolkit.TestMotorController.test_control_motors:18", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req octopus_example.tentacle_motor_control" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "pyunit test_tentacle_toolkit.TestColorProcessor.test_process_color_change:28", + "location": { + "kind": "file", + "file": "test_tentacle_toolkit.py", + "line": 28, + "column": null + }, + "name": "test_tentacle_toolkit.TestColorProcessor.test_process_color_change:28", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req octopus_example.chromatophore_processor" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "pyunit test_tentacle_toolkit.TestInkTrigger.test_trigger_ink_release:38", + "location": { + "kind": "file", + "file": "test_tentacle_toolkit.py", + "line": 38, + "column": null + }, + "name": "test_tentacle_toolkit.TestInkTrigger.test_trigger_ink_release:38", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req octopus_example.ink_sac_trigger" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "pyunit test_tentacle_toolkit.TestVisionProcessor.test_process_vision:48", + "location": { + "kind": "file", + "file": "test_tentacle_toolkit.py", + "line": 48, + "column": null + }, + "name": "test_tentacle_toolkit.TestVisionProcessor.test_process_vision:48", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req octopus_example.vision_processing_unit" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "pyunit test_tentacle_toolkit.TestConstructionPlanner.test_plan_construction:58", + "location": { + "kind": "file", + "file": "test_tentacle_toolkit.py", + "line": 58, + "column": null + }, + "name": "test_tentacle_toolkit.TestConstructionPlanner.test_plan_construction:58", + "messages": [ + "unknown tracing target req octopus_example.rock_arrangement_planner", + "missing up reference" + ], + "just_up": [], + "just_down": [], + "just_global": [], + "tracing_status": "MISSING" + } + ], + "coverage": 81.81818181818181 + } + ], + "policy": { + "Requirements": { + "name": "Requirements", + "traces": [], + "source": [ + { + "file": "octopus_system_no_schema.lobster" + }, + { + "file": "octopus_software_no_schema.lobster" + } + ], + "needs_tracing_up": false, + "needs_tracing_down": true, + "breakdown_requirements": [ + [ + "Code" + ], + [ + "test" + ] + ] + }, + "Code": { + "name": "Code", + "traces": [ + "Requirements" + ], + "source": [ + { + "file": "tentacle_commander_code_no_schema.lobster" + }, + { + "file": "tentacle_toolkit_code_no_schema.lobster" + } + ], + "needs_tracing_up": true, + "needs_tracing_down": false, + "breakdown_requirements": [] + }, + "test": { + "name": "test", + "traces": [ + "Requirements" + ], + "source": [ + { + "file": "tentacle_commander_test_no_schema.lobster" + }, + { + "file": "tentacle_toolkit_test_no_schema.lobster" + } + ], + "needs_tracing_up": true, + "needs_tracing_down": false, + "breakdown_requirements": [] + } + }, + "matrix": [] +} diff --git a/tests_system/lobster_report/data/report_ok_no_schema.lobster b/tests_system/lobster_report/data/report_ok_no_schema.lobster new file mode 100644 index 000000000..25213f563 --- /dev/null +++ b/tests_system/lobster_report/data/report_ok_no_schema.lobster @@ -0,0 +1,496 @@ +{ + "schema": "lobster-report", + "version": 2, + "generator": "lobster_report", + "levels": [ + { + "name": "Requirements", + "kind": "requirements", + "items": [ + { + "tag": "req example.vehicle", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 3, + "column": 13 + }, + "name": "example.vehicle", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python vehicle_implementation.StupidVehicle.vehicle_exists" + ], + "tracing_status": "OK", + "framework": "TRLC", + "kind": "requirement", + "text": "This is a requirement for vehicle", + "status": null + }, + { + "tag": "req example.engine", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 7, + "column": 13 + }, + "name": "example.engine", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python vehicle_implementation.StupidVehicle.run_engine" + ], + "tracing_status": "OK", + "framework": "TRLC", + "kind": "requirement", + "text": "The vehicle shall have an efficient engine system", + "status": null + }, + { + "tag": "req example.safety_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 11, + "column": 13 + }, + "name": "example.safety_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python vehicle_implementation.StupidVehicle.activate_safety_system" + ], + "tracing_status": "OK", + "framework": "TRLC", + "kind": "requirement", + "text": "The vehicle shall include comprehensive safety features", + "status": null + }, + { + "tag": "req example.braking_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 15, + "column": 13 + }, + "name": "example.braking_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python vehicle_implementation.StupidVehicle.apply_brakes" + ], + "tracing_status": "OK", + "framework": "TRLC", + "kind": "requirement", + "text": "The vehicle shall have responsive braking capability", + "status": null + }, + { + "tag": "req example.electrical_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 19, + "column": 13 + }, + "name": "example.electrical_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python vehicle_implementation.StupidVehicle.check_electrical_system" + ], + "tracing_status": "OK", + "framework": "TRLC", + "kind": "requirement", + "text": "The vehicle shall have reliable electrical components", + "status": null + }, + { + "tag": "req example.fuel_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 23, + "column": 13 + }, + "name": "example.fuel_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python vehicle_implementation.StupidVehicle.operate_fuel_system" + ], + "tracing_status": "OK", + "framework": "TRLC", + "kind": "requirement", + "text": "The vehicle shall have efficient fuel delivery", + "status": null + }, + { + "tag": "req example.transmission_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 27, + "column": 13 + }, + "name": "example.transmission_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python vehicle_implementation.StupidVehicle.operate_transmission_system" + ], + "tracing_status": "OK", + "framework": "TRLC", + "kind": "requirement", + "text": "The vehicle shall have a smooth gear transmission system", + "status": null + }, + { + "tag": "req example.steering_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 31, + "column": 13 + }, + "name": "example.steering_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python vehicle_implementation.StupidVehicle.control_steering_system" + ], + "tracing_status": "OK", + "framework": "TRLC", + "kind": "requirement", + "text": "The vehicle shall have precise steering control", + "status": null + }, + { + "tag": "req example.lighting_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 35, + "column": 13 + }, + "name": "example.lighting_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python vehicle_implementation.StupidVehicle.operate_lighting_system" + ], + "tracing_status": "OK", + "framework": "TRLC", + "kind": "requirement", + "text": "The vehicle shall have functional headlights and taillights", + "status": null + }, + { + "tag": "req example.climate_control", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 39, + "column": 13 + }, + "name": "example.climate_control", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python vehicle_implementation.StupidVehicle.control_climate_system" + ], + "tracing_status": "OK", + "framework": "TRLC", + "kind": "requirement", + "text": "The vehicle shall maintain comfortable cabin temperature", + "status": null + } + ], + "coverage": 100.0 + }, + { + "name": "Code", + "kind": "implementation", + "items": [ + { + "tag": "python vehicle_implementation.StupidVehicle.vehicle_exists", + "location": { + "kind": "file", + "file": "./vehicle_implementation.py", + "line": 24, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.vehicle_exists", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.vehicle" + ], + "ref_down": [], + "tracing_status": "OK", + "language": "Python", + "kind": "Method" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.run_engine", + "location": { + "kind": "file", + "file": "./vehicle_implementation.py", + "line": 30, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.run_engine", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.engine" + ], + "ref_down": [], + "tracing_status": "OK", + "language": "Python", + "kind": "Method" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.activate_safety_system", + "location": { + "kind": "file", + "file": "./vehicle_implementation.py", + "line": 43, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.activate_safety_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.safety_system" + ], + "ref_down": [], + "tracing_status": "OK", + "language": "Python", + "kind": "Method" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.apply_brakes", + "location": { + "kind": "file", + "file": "./vehicle_implementation.py", + "line": 63, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.apply_brakes", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.braking_system" + ], + "ref_down": [], + "tracing_status": "OK", + "language": "Python", + "kind": "Method" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.check_electrical_system", + "location": { + "kind": "file", + "file": "./vehicle_implementation.py", + "line": 84, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.check_electrical_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.electrical_system" + ], + "ref_down": [], + "tracing_status": "OK", + "language": "Python", + "kind": "Method" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.operate_fuel_system", + "location": { + "kind": "file", + "file": "./vehicle_implementation.py", + "line": 101, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.operate_fuel_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.fuel_system" + ], + "ref_down": [], + "tracing_status": "OK", + "language": "Python", + "kind": "Method" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.operate_transmission_system", + "location": { + "kind": "file", + "file": "./vehicle_implementation.py", + "line": 115, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.operate_transmission_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.transmission_system" + ], + "ref_down": [], + "tracing_status": "OK", + "language": "Python", + "kind": "Method" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.control_steering_system", + "location": { + "kind": "file", + "file": "./vehicle_implementation.py", + "line": 131, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.control_steering_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.steering_system" + ], + "ref_down": [], + "tracing_status": "OK", + "language": "Python", + "kind": "Method" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.operate_lighting_system", + "location": { + "kind": "file", + "file": "./vehicle_implementation.py", + "line": 150, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.operate_lighting_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.lighting_system" + ], + "ref_down": [], + "tracing_status": "OK", + "language": "Python", + "kind": "Method" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.control_climate_system", + "location": { + "kind": "file", + "file": "./vehicle_implementation.py", + "line": 176, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.control_climate_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.climate_control" + ], + "ref_down": [], + "tracing_status": "OK", + "language": "Python", + "kind": "Method" + } + ], + "coverage": 100.0 + } + ], + "policy": { + "Requirements": { + "name": "Requirements", + "kind": "requirements", + "traces": [], + "source": [ + { + "file": "trlc_ok_no_schema.lobster" + } + ], + "needs_tracing_up": false, + "needs_tracing_down": true, + "breakdown_requirements": [ + [ + "Code" + ] + ] + }, + "Code": { + "name": "Code", + "kind": "implementation", + "traces": [ + "Requirements" + ], + "source": [ + { + "file": "python_ok_no_schema.lobster" + } + ], + "needs_tracing_up": true, + "needs_tracing_down": false, + "breakdown_requirements": [] + } + }, + "matrix": [] +} diff --git a/tests_system/lobster_report/data/report_ok_yaml_no_schema.lobster b/tests_system/lobster_report/data/report_ok_yaml_no_schema.lobster new file mode 100644 index 000000000..b1450ca24 --- /dev/null +++ b/tests_system/lobster_report/data/report_ok_yaml_no_schema.lobster @@ -0,0 +1,432 @@ +{ + "schema": "lobster-report", + "version": 2, + "generator": "lobster_report", + "levels": [ + { + "name": "Requirements", + "items": [ + { + "tag": "req example.vehicle", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 3, + "column": 13 + }, + "name": "example.vehicle", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python vehicle_implementation.StupidVehicle.vehicle_exists" + ], + "tracing_status": "OK" + }, + { + "tag": "req example.engine", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 7, + "column": 13 + }, + "name": "example.engine", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python vehicle_implementation.StupidVehicle.run_engine" + ], + "tracing_status": "OK" + }, + { + "tag": "req example.safety_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 11, + "column": 13 + }, + "name": "example.safety_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python vehicle_implementation.StupidVehicle.activate_safety_system" + ], + "tracing_status": "OK" + }, + { + "tag": "req example.braking_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 15, + "column": 13 + }, + "name": "example.braking_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python vehicle_implementation.StupidVehicle.apply_brakes" + ], + "tracing_status": "OK" + }, + { + "tag": "req example.electrical_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 19, + "column": 13 + }, + "name": "example.electrical_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python vehicle_implementation.StupidVehicle.check_electrical_system" + ], + "tracing_status": "OK" + }, + { + "tag": "req example.fuel_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 23, + "column": 13 + }, + "name": "example.fuel_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python vehicle_implementation.StupidVehicle.operate_fuel_system" + ], + "tracing_status": "OK" + }, + { + "tag": "req example.transmission_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 27, + "column": 13 + }, + "name": "example.transmission_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python vehicle_implementation.StupidVehicle.operate_transmission_system" + ], + "tracing_status": "OK" + }, + { + "tag": "req example.steering_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 31, + "column": 13 + }, + "name": "example.steering_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python vehicle_implementation.StupidVehicle.control_steering_system" + ], + "tracing_status": "OK" + }, + { + "tag": "req example.lighting_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 35, + "column": 13 + }, + "name": "example.lighting_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python vehicle_implementation.StupidVehicle.operate_lighting_system" + ], + "tracing_status": "OK" + }, + { + "tag": "req example.climate_control", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 39, + "column": 13 + }, + "name": "example.climate_control", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python vehicle_implementation.StupidVehicle.control_climate_system" + ], + "tracing_status": "OK" + } + ], + "coverage": 100.0 + }, + { + "name": "Code", + "items": [ + { + "tag": "python vehicle_implementation.StupidVehicle.vehicle_exists", + "location": { + "kind": "file", + "file": "./vehicle_implementation.py", + "line": 24, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.vehicle_exists", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.vehicle" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.run_engine", + "location": { + "kind": "file", + "file": "./vehicle_implementation.py", + "line": 30, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.run_engine", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.engine" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.activate_safety_system", + "location": { + "kind": "file", + "file": "./vehicle_implementation.py", + "line": 43, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.activate_safety_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.safety_system" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.apply_brakes", + "location": { + "kind": "file", + "file": "./vehicle_implementation.py", + "line": 63, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.apply_brakes", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.braking_system" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.check_electrical_system", + "location": { + "kind": "file", + "file": "./vehicle_implementation.py", + "line": 84, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.check_electrical_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.electrical_system" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.operate_fuel_system", + "location": { + "kind": "file", + "file": "./vehicle_implementation.py", + "line": 101, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.operate_fuel_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.fuel_system" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.operate_transmission_system", + "location": { + "kind": "file", + "file": "./vehicle_implementation.py", + "line": 115, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.operate_transmission_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.transmission_system" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.control_steering_system", + "location": { + "kind": "file", + "file": "./vehicle_implementation.py", + "line": 131, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.control_steering_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.steering_system" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.operate_lighting_system", + "location": { + "kind": "file", + "file": "./vehicle_implementation.py", + "line": 150, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.operate_lighting_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.lighting_system" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python vehicle_implementation.StupidVehicle.control_climate_system", + "location": { + "kind": "file", + "file": "./vehicle_implementation.py", + "line": 176, + "column": null + }, + "name": "vehicle_implementation.StupidVehicle.control_climate_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req example.climate_control" + ], + "ref_down": [], + "tracing_status": "OK" + } + ], + "coverage": 100.0 + } + ], + "policy": { + "Requirements": { + "name": "Requirements", + "traces": [], + "source": [ + { + "file": "trlc_ok_no_schema.lobster" + } + ], + "needs_tracing_up": false, + "needs_tracing_down": true, + "breakdown_requirements": [ + [ + "Code" + ] + ] + }, + "Code": { + "name": "Code", + "traces": [ + "Requirements" + ], + "source": [ + { + "file": "python_ok_no_schema.lobster" + } + ], + "needs_tracing_up": true, + "needs_tracing_down": false, + "breakdown_requirements": [] + } + }, + "matrix": [] +} diff --git a/tests_system/lobster_report/data/report_pizza_yaml_no_schema.lobster b/tests_system/lobster_report/data/report_pizza_yaml_no_schema.lobster new file mode 100644 index 000000000..5082b3aae --- /dev/null +++ b/tests_system/lobster_report/data/report_pizza_yaml_no_schema.lobster @@ -0,0 +1,1065 @@ +{ + "schema": "lobster-report", + "version": 2, + "generator": "lobster_report", + "levels": [ + { + "name": "System Requirements", + "items": [ + { + "tag": "req pizza_example.oven", + "location": { + "kind": "file", + "file": "pizza_system_requirements.trlc", + "line": 4, + "column": 28 + }, + "name": "pizza_example.oven", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python pizza_implementation.OvenController.start_cooking", + "python pizza_implementation.OvenController.check_cooking_status", + "pyunit test_pizza_components.TestCookingComponent.test_recipe_to_cooking_workflow:62", + "pyunit test_pizza_components.TestQualityControlComponent.test_quality_validation_workflow:173", + "pyunit test_pizza_components.TestEndToEndOrderComponent.test_complete_pizza_order_system:205" + ], + "tracing_status": "OK" + }, + { + "tag": "req pizza_example.delivery", + "location": { + "kind": "file", + "file": "pizza_system_requirements.trlc", + "line": 8, + "column": 28 + }, + "name": "pizza_example.delivery", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python pizza_implementation.RouteOptimizer.calculate_route", + "pyunit test_pizza_components.TestDeliveryComponent.test_delivery_tracking_workflow:102", + "pyunit test_pizza_components.TestEndToEndOrderComponent.test_complete_pizza_order_system:205" + ], + "tracing_status": "OK" + }, + { + "tag": "req pizza_example.ordering", + "location": { + "kind": "file", + "file": "pizza_system_requirements.trlc", + "line": 12, + "column": 28 + }, + "name": "pizza_example.ordering", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python pizza_implementation.OrderProcessor.create_customer", + "python pizza_implementation.OrderProcessor.place_order", + "pyunit test_pizza_components.TestOrderProcessingComponent.test_complete_order_creation_workflow:26", + "pyunit test_pizza_components.TestEndToEndOrderComponent.test_complete_pizza_order_system:205", + "pyunit test_pizza_components.TestErrorHandlingComponent.test_payment_failure_workflow:278" + ], + "tracing_status": "OK" + }, + { + "tag": "req pizza_example.payment", + "location": { + "kind": "file", + "file": "pizza_system_requirements.trlc", + "line": 16, + "column": 28 + }, + "name": "pizza_example.payment", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python pizza_implementation.PaymentGateway.process_payment", + "pyunit test_pizza_components.TestOrderProcessingComponent.test_complete_order_creation_workflow:26", + "pyunit test_pizza_components.TestEndToEndOrderComponent.test_complete_pizza_order_system:205", + "pyunit test_pizza_components.TestErrorHandlingComponent.test_payment_failure_workflow:278" + ], + "tracing_status": "OK" + }, + { + "tag": "req pizza_example.tracking", + "location": { + "kind": "file", + "file": "pizza_system_requirements.trlc", + "line": 20, + "column": 28 + }, + "name": "pizza_example.tracking", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python pizza_implementation.DeliveryTracker.start_delivery", + "pyunit test_pizza_components.TestDeliveryComponent.test_delivery_tracking_workflow:102", + "pyunit test_pizza_components.TestEndToEndOrderComponent.test_complete_pizza_order_system:205" + ], + "tracing_status": "OK" + }, + { + "tag": "req pizza_example.inventory", + "location": { + "kind": "file", + "file": "pizza_system_requirements.trlc", + "line": 24, + "column": 28 + }, + "name": "pizza_example.inventory", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python pizza_implementation.InventoryManager.use_ingredients", + "python pizza_implementation.InventoryManager.check_for_alerts", + "pyunit test_pizza_components.TestCookingComponent.test_recipe_to_cooking_workflow:62", + "pyunit test_pizza_components.TestInventoryAlertComponent.test_low_stock_alert_workflow:142", + "pyunit test_pizza_components.TestEndToEndOrderComponent.test_complete_pizza_order_system:205" + ], + "tracing_status": "OK" + }, + { + "tag": "req pizza_example.communication", + "location": { + "kind": "file", + "file": "pizza_system_requirements.trlc", + "line": 28, + "column": 28 + }, + "name": "pizza_example.communication", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python pizza_implementation.NotificationSystem.send_sms", + "python pizza_implementation.NotificationSystem.notify_order_status", + "pyunit test_pizza_components.TestDeliveryComponent.test_delivery_tracking_workflow:102", + "pyunit test_pizza_components.TestInventoryAlertComponent.test_low_stock_alert_workflow:142", + "pyunit test_pizza_components.TestEndToEndOrderComponent.test_complete_pizza_order_system:205" + ], + "tracing_status": "OK" + }, + { + "tag": "req pizza_example.quality", + "location": { + "kind": "file", + "file": "pizza_system_requirements.trlc", + "line": 32, + "column": 28 + }, + "name": "pizza_example.quality", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python pizza_implementation.RecipeDatabase.get_recipe", + "python pizza_implementation.RecipeDatabase.validate_quality", + "pyunit test_pizza_components.TestCookingComponent.test_recipe_to_cooking_workflow:62", + "pyunit test_pizza_components.TestQualityControlComponent.test_quality_validation_workflow:173", + "pyunit test_pizza_components.TestEndToEndOrderComponent.test_complete_pizza_order_system:205" + ], + "tracing_status": "OK" + } + ], + "coverage": 100.0 + }, + { + "name": "Software Requirements", + "items": [ + { + "tag": "req pizza_example.oven_controller", + "location": { + "kind": "file", + "file": "pizza_software_requirements.trlc", + "line": 4, + "column": 30 + }, + "name": "pizza_example.oven_controller", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python pizza_implementation.OvenController.start_cooking", + "python pizza_implementation.OvenController.check_cooking_status", + "pyunit test_pizza_components.TestCookingComponent.test_recipe_to_cooking_workflow:62", + "pyunit test_pizza_components.TestQualityControlComponent.test_quality_validation_workflow:173", + "pyunit test_pizza_components.TestEndToEndOrderComponent.test_complete_pizza_order_system:205", + "pyunit test_pizza_implementation.TestOvenController.test_start_cooking:18" + ], + "tracing_status": "OK" + }, + { + "tag": "req pizza_example.route_planner", + "location": { + "kind": "file", + "file": "pizza_software_requirements.trlc", + "line": 8, + "column": 30 + }, + "name": "pizza_example.route_planner", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python pizza_implementation.RouteOptimizer.calculate_route", + "pyunit test_pizza_components.TestDeliveryComponent.test_delivery_tracking_workflow:102", + "pyunit test_pizza_components.TestEndToEndOrderComponent.test_complete_pizza_order_system:205", + "pyunit test_pizza_implementation.TestRouteOptimizer.test_calculate_route_empty:114" + ], + "tracing_status": "OK" + }, + { + "tag": "req pizza_example.order_processor", + "location": { + "kind": "file", + "file": "pizza_software_requirements.trlc", + "line": 12, + "column": 30 + }, + "name": "pizza_example.order_processor", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python pizza_implementation.OrderProcessor.create_customer", + "python pizza_implementation.OrderProcessor.place_order", + "pyunit test_pizza_components.TestOrderProcessingComponent.test_complete_order_creation_workflow:26", + "pyunit test_pizza_components.TestEndToEndOrderComponent.test_complete_pizza_order_system:205", + "pyunit test_pizza_components.TestErrorHandlingComponent.test_payment_failure_workflow:278", + "pyunit test_pizza_implementation.TestOrderProcessor.test_create_customer:33", + "pyunit test_pizza_implementation.TestOrderProcessor.test_place_order:43" + ], + "tracing_status": "OK" + }, + { + "tag": "req pizza_example.payment_gateway", + "location": { + "kind": "file", + "file": "pizza_software_requirements.trlc", + "line": 16, + "column": 30 + }, + "name": "pizza_example.payment_gateway", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python pizza_implementation.PaymentGateway.process_payment", + "pyunit test_pizza_components.TestOrderProcessingComponent.test_complete_order_creation_workflow:26", + "pyunit test_pizza_components.TestEndToEndOrderComponent.test_complete_pizza_order_system:205", + "pyunit test_pizza_components.TestErrorHandlingComponent.test_payment_failure_workflow:278", + "pyunit test_pizza_implementation.TestPaymentGateway.test_process_payment_valid:57" + ], + "tracing_status": "OK" + }, + { + "tag": "req pizza_example.gps_tracker", + "location": { + "kind": "file", + "file": "pizza_software_requirements.trlc", + "line": 20, + "column": 30 + }, + "name": "pizza_example.gps_tracker", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python pizza_implementation.DeliveryTracker.start_delivery", + "pyunit test_pizza_components.TestDeliveryComponent.test_delivery_tracking_workflow:102", + "pyunit test_pizza_components.TestEndToEndOrderComponent.test_complete_pizza_order_system:205" + ], + "tracing_status": "OK" + }, + { + "tag": "req pizza_example.stock_manager", + "location": { + "kind": "file", + "file": "pizza_software_requirements.trlc", + "line": 24, + "column": 30 + }, + "name": "pizza_example.stock_manager", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python pizza_implementation.InventoryManager.use_ingredients", + "python pizza_implementation.InventoryManager.check_for_alerts", + "pyunit test_pizza_components.TestCookingComponent.test_recipe_to_cooking_workflow:62", + "pyunit test_pizza_components.TestInventoryAlertComponent.test_low_stock_alert_workflow:142", + "pyunit test_pizza_components.TestEndToEndOrderComponent.test_complete_pizza_order_system:205", + "pyunit test_pizza_implementation.TestInventoryManager.test_use_ingredients:71" + ], + "tracing_status": "OK" + }, + { + "tag": "req pizza_example.notification_system", + "location": { + "kind": "file", + "file": "pizza_software_requirements.trlc", + "line": 28, + "column": 30 + }, + "name": "pizza_example.notification_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python pizza_implementation.NotificationSystem.send_sms", + "python pizza_implementation.NotificationSystem.notify_order_status", + "pyunit test_pizza_components.TestDeliveryComponent.test_delivery_tracking_workflow:102", + "pyunit test_pizza_components.TestInventoryAlertComponent.test_low_stock_alert_workflow:142", + "pyunit test_pizza_components.TestEndToEndOrderComponent.test_complete_pizza_order_system:205", + "pyunit test_pizza_implementation.TestNotificationSystem.test_send_sms:86" + ], + "tracing_status": "OK" + }, + { + "tag": "req pizza_example.recipe_database", + "location": { + "kind": "file", + "file": "pizza_software_requirements.trlc", + "line": 32, + "column": 30 + }, + "name": "pizza_example.recipe_database", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [], + "ref_down": [ + "python pizza_implementation.RecipeDatabase.get_recipe", + "python pizza_implementation.RecipeDatabase.validate_quality", + "pyunit test_pizza_components.TestCookingComponent.test_recipe_to_cooking_workflow:62", + "pyunit test_pizza_components.TestQualityControlComponent.test_quality_validation_workflow:173", + "pyunit test_pizza_components.TestEndToEndOrderComponent.test_complete_pizza_order_system:205", + "pyunit test_pizza_implementation.TestRecipeDatabase.test_get_recipe:100" + ], + "tracing_status": "OK" + } + ], + "coverage": 100.0 + }, + { + "name": "Code", + "items": [ + { + "tag": "python pizza_implementation.OvenController.start_cooking", + "location": { + "kind": "file", + "file": "pizza_implementation.py", + "line": 37, + "column": null + }, + "name": "pizza_implementation.OvenController.start_cooking", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req pizza_example.oven", + "req pizza_example.oven_controller" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python pizza_implementation.OvenController.check_cooking_status", + "location": { + "kind": "file", + "file": "pizza_implementation.py", + "line": 45, + "column": null + }, + "name": "pizza_implementation.OvenController.check_cooking_status", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req pizza_example.oven", + "req pizza_example.oven_controller" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python pizza_implementation.RouteOptimizer.calculate_route", + "location": { + "kind": "file", + "file": "pizza_implementation.py", + "line": 66, + "column": null + }, + "name": "pizza_implementation.RouteOptimizer.calculate_route", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req pizza_example.delivery", + "req pizza_example.route_planner" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python pizza_implementation.OrderProcessor.create_customer", + "location": { + "kind": "file", + "file": "pizza_implementation.py", + "line": 95, + "column": null + }, + "name": "pizza_implementation.OrderProcessor.create_customer", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req pizza_example.ordering", + "req pizza_example.order_processor" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python pizza_implementation.OrderProcessor.place_order", + "location": { + "kind": "file", + "file": "pizza_implementation.py", + "line": 105, + "column": null + }, + "name": "pizza_implementation.OrderProcessor.place_order", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req pizza_example.ordering", + "req pizza_example.order_processor" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python pizza_implementation.PaymentGateway.process_payment", + "location": { + "kind": "file", + "file": "pizza_implementation.py", + "line": 122, + "column": null + }, + "name": "pizza_implementation.PaymentGateway.process_payment", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req pizza_example.payment", + "req pizza_example.payment_gateway" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python pizza_implementation.DeliveryTracker.start_delivery", + "location": { + "kind": "file", + "file": "pizza_implementation.py", + "line": 150, + "column": null + }, + "name": "pizza_implementation.DeliveryTracker.start_delivery", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req pizza_example.tracking", + "req pizza_example.gps_tracker" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python pizza_implementation.InventoryManager.use_ingredients", + "location": { + "kind": "file", + "file": "pizza_implementation.py", + "line": 177, + "column": null + }, + "name": "pizza_implementation.InventoryManager.use_ingredients", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req pizza_example.inventory", + "req pizza_example.stock_manager" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python pizza_implementation.InventoryManager.check_for_alerts", + "location": { + "kind": "file", + "file": "pizza_implementation.py", + "line": 195, + "column": null + }, + "name": "pizza_implementation.InventoryManager.check_for_alerts", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req pizza_example.inventory", + "req pizza_example.stock_manager" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python pizza_implementation.NotificationSystem.send_sms", + "location": { + "kind": "file", + "file": "pizza_implementation.py", + "line": 213, + "column": null + }, + "name": "pizza_implementation.NotificationSystem.send_sms", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req pizza_example.communication", + "req pizza_example.notification_system" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python pizza_implementation.NotificationSystem.notify_order_status", + "location": { + "kind": "file", + "file": "pizza_implementation.py", + "line": 226, + "column": null + }, + "name": "pizza_implementation.NotificationSystem.notify_order_status", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req pizza_example.communication", + "req pizza_example.notification_system" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python pizza_implementation.RecipeDatabase.get_recipe", + "location": { + "kind": "file", + "file": "pizza_implementation.py", + "line": 258, + "column": null + }, + "name": "pizza_implementation.RecipeDatabase.get_recipe", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req pizza_example.quality", + "req pizza_example.recipe_database" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "python pizza_implementation.RecipeDatabase.validate_quality", + "location": { + "kind": "file", + "file": "pizza_implementation.py", + "line": 264, + "column": null + }, + "name": "pizza_implementation.RecipeDatabase.validate_quality", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req pizza_example.quality", + "req pizza_example.recipe_database" + ], + "ref_down": [], + "tracing_status": "OK" + } + ], + "coverage": 100.0 + }, + { + "name": "Component Tests", + "items": [ + { + "tag": "pyunit test_pizza_components.TestOrderProcessingComponent.test_complete_order_creation_workflow:26", + "location": { + "kind": "file", + "file": "test_pizza_components.py", + "line": 26, + "column": null + }, + "name": "test_pizza_components.TestOrderProcessingComponent.test_complete_order_creation_workflow:26", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req pizza_example.payment", + "req pizza_example.ordering", + "req pizza_example.payment_gateway", + "req pizza_example.order_processor" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "pyunit test_pizza_components.TestCookingComponent.test_recipe_to_cooking_workflow:62", + "location": { + "kind": "file", + "file": "test_pizza_components.py", + "line": 62, + "column": null + }, + "name": "test_pizza_components.TestCookingComponent.test_recipe_to_cooking_workflow:62", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req pizza_example.inventory", + "req pizza_example.oven", + "req pizza_example.quality", + "req pizza_example.stock_manager", + "req pizza_example.oven_controller", + "req pizza_example.recipe_database" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "pyunit test_pizza_components.TestDeliveryComponent.test_delivery_tracking_workflow:102", + "location": { + "kind": "file", + "file": "test_pizza_components.py", + "line": 102, + "column": null + }, + "name": "test_pizza_components.TestDeliveryComponent.test_delivery_tracking_workflow:102", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req pizza_example.communication", + "req pizza_example.delivery", + "req pizza_example.tracking", + "req pizza_example.notification_system", + "req pizza_example.route_planner", + "req pizza_example.gps_tracker" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "pyunit test_pizza_components.TestInventoryAlertComponent.test_low_stock_alert_workflow:142", + "location": { + "kind": "file", + "file": "test_pizza_components.py", + "line": 142, + "column": null + }, + "name": "test_pizza_components.TestInventoryAlertComponent.test_low_stock_alert_workflow:142", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req pizza_example.communication", + "req pizza_example.inventory", + "req pizza_example.notification_system", + "req pizza_example.stock_manager" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "pyunit test_pizza_components.TestQualityControlComponent.test_quality_validation_workflow:173", + "location": { + "kind": "file", + "file": "test_pizza_components.py", + "line": 173, + "column": null + }, + "name": "test_pizza_components.TestQualityControlComponent.test_quality_validation_workflow:173", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req pizza_example.oven", + "req pizza_example.quality", + "req pizza_example.oven_controller", + "req pizza_example.recipe_database" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "pyunit test_pizza_components.TestEndToEndOrderComponent.test_complete_pizza_order_system:205", + "location": { + "kind": "file", + "file": "test_pizza_components.py", + "line": 205, + "column": null + }, + "name": "test_pizza_components.TestEndToEndOrderComponent.test_complete_pizza_order_system:205", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req pizza_example.delivery", + "req pizza_example.tracking", + "req pizza_example.communication", + "req pizza_example.oven", + "req pizza_example.quality", + "req pizza_example.inventory", + "req pizza_example.payment", + "req pizza_example.ordering", + "req pizza_example.route_planner", + "req pizza_example.gps_tracker", + "req pizza_example.notification_system", + "req pizza_example.oven_controller", + "req pizza_example.recipe_database", + "req pizza_example.stock_manager", + "req pizza_example.payment_gateway", + "req pizza_example.order_processor" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "pyunit test_pizza_components.TestErrorHandlingComponent.test_payment_failure_workflow:278", + "location": { + "kind": "file", + "file": "test_pizza_components.py", + "line": 278, + "column": null + }, + "name": "test_pizza_components.TestErrorHandlingComponent.test_payment_failure_workflow:278", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req pizza_example.payment", + "req pizza_example.ordering", + "req pizza_example.payment_gateway", + "req pizza_example.order_processor" + ], + "ref_down": [], + "tracing_status": "OK" + } + ], + "coverage": 100.0 + }, + { + "name": "Unit Tests", + "items": [ + { + "tag": "pyunit test_pizza_implementation.TestOvenController.test_start_cooking:18", + "location": { + "kind": "file", + "file": "test_pizza_implementation.py", + "line": 18, + "column": null + }, + "name": "test_pizza_implementation.TestOvenController.test_start_cooking:18", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req pizza_example.oven_controller" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "pyunit test_pizza_implementation.TestOrderProcessor.test_create_customer:33", + "location": { + "kind": "file", + "file": "test_pizza_implementation.py", + "line": 33, + "column": null + }, + "name": "test_pizza_implementation.TestOrderProcessor.test_create_customer:33", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req pizza_example.order_processor" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "pyunit test_pizza_implementation.TestOrderProcessor.test_place_order:43", + "location": { + "kind": "file", + "file": "test_pizza_implementation.py", + "line": 43, + "column": null + }, + "name": "test_pizza_implementation.TestOrderProcessor.test_place_order:43", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req pizza_example.order_processor" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "pyunit test_pizza_implementation.TestPaymentGateway.test_process_payment_valid:57", + "location": { + "kind": "file", + "file": "test_pizza_implementation.py", + "line": 57, + "column": null + }, + "name": "test_pizza_implementation.TestPaymentGateway.test_process_payment_valid:57", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req pizza_example.payment_gateway" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "pyunit test_pizza_implementation.TestInventoryManager.test_use_ingredients:71", + "location": { + "kind": "file", + "file": "test_pizza_implementation.py", + "line": 71, + "column": null + }, + "name": "test_pizza_implementation.TestInventoryManager.test_use_ingredients:71", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req pizza_example.stock_manager" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "pyunit test_pizza_implementation.TestNotificationSystem.test_send_sms:86", + "location": { + "kind": "file", + "file": "test_pizza_implementation.py", + "line": 86, + "column": null + }, + "name": "test_pizza_implementation.TestNotificationSystem.test_send_sms:86", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req pizza_example.notification_system" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "pyunit test_pizza_implementation.TestRecipeDatabase.test_get_recipe:100", + "location": { + "kind": "file", + "file": "test_pizza_implementation.py", + "line": 100, + "column": null + }, + "name": "test_pizza_implementation.TestRecipeDatabase.test_get_recipe:100", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req pizza_example.recipe_database" + ], + "ref_down": [], + "tracing_status": "OK" + }, + { + "tag": "pyunit test_pizza_implementation.TestRouteOptimizer.test_calculate_route_empty:114", + "location": { + "kind": "file", + "file": "test_pizza_implementation.py", + "line": 114, + "column": null + }, + "name": "test_pizza_implementation.TestRouteOptimizer.test_calculate_route_empty:114", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "req pizza_example.route_planner" + ], + "ref_down": [], + "tracing_status": "OK" + } + ], + "coverage": 100.0 + } + ], + "policy": { + "System Requirements": { + "name": "System Requirements", + "traces": [], + "source": [ + { + "file": "pizza_system_requirements_no_schema.lobster" + } + ], + "needs_tracing_up": false, + "needs_tracing_down": true, + "breakdown_requirements": [ + [ + "Component Tests" + ] + ] + }, + "Software Requirements": { + "name": "Software Requirements", + "traces": [], + "source": [ + { + "file": "pizza_software_requirements_no_schema.lobster" + } + ], + "needs_tracing_up": false, + "needs_tracing_down": true, + "breakdown_requirements": [ + [ + "Component Tests", + "Unit Tests" + ] + ] + }, + "Code": { + "name": "Code", + "traces": [ + "System Requirements", + "Software Requirements" + ], + "source": [ + { + "file": "pizza_code_no_schema.lobster" + } + ], + "needs_tracing_up": true, + "needs_tracing_down": false, + "breakdown_requirements": [] + }, + "Component Tests": { + "name": "Component Tests", + "traces": [ + "System Requirements", + "Software Requirements" + ], + "source": [ + { + "file": "pizza_component_tests_no_schema.lobster" + } + ], + "needs_tracing_up": true, + "needs_tracing_down": false, + "breakdown_requirements": [] + }, + "Unit Tests": { + "name": "Unit Tests", + "traces": [ + "Software Requirements" + ], + "source": [ + { + "file": "pizza_unit_tests_no_schema.lobster" + } + ], + "needs_tracing_up": true, + "needs_tracing_down": false, + "breakdown_requirements": [] + } + }, + "matrix": [] +} diff --git a/tests_system/lobster_report/data/report_unknown_tracing_target_yaml_no_schema.lobster b/tests_system/lobster_report/data/report_unknown_tracing_target_yaml_no_schema.lobster new file mode 100644 index 000000000..2f4a28a43 --- /dev/null +++ b/tests_system/lobster_report/data/report_unknown_tracing_target_yaml_no_schema.lobster @@ -0,0 +1,45 @@ +{ + "schema": "lobster-report", + "version": 2, + "generator": "lobster_report", + "levels": [ + { + "name": "Code", + "items": [ + { + "tag": "python software.Example", + "location": { + "kind": "file", + "file": "./software.py", + "line": 1, + "column": null + }, + "name": "software.Example", + "messages": [ + "unknown tracing target req example.adas_100" + ], + "just_up": [], + "just_down": [], + "just_global": [], + "tracing_status": "MISSING" + } + ], + "coverage": 0.0 + } + ], + "policy": { + "Code": { + "name": "Code", + "traces": [], + "source": [ + { + "file": "python_unknown_tracing_target_no_schema.lobster" + } + ], + "needs_tracing_up": false, + "needs_tracing_down": false, + "breakdown_requirements": [] + } + }, + "matrix": [] +} diff --git a/tests_system/lobster_report/data/report_unversioned_trace_dest_yaml_no_schema.lobster b/tests_system/lobster_report/data/report_unversioned_trace_dest_yaml_no_schema.lobster new file mode 100644 index 000000000..ba8bcd2df --- /dev/null +++ b/tests_system/lobster_report/data/report_unversioned_trace_dest_yaml_no_schema.lobster @@ -0,0 +1,51 @@ +{ + "schema": "lobster-report", + "version": 2, + "generator": "lobster_report", + "levels": [ + { + "name": "Code", + "items": [ + { + "tag": "python software.Example", + "location": { + "kind": "file", + "file": "./software.py", + "line": 1, + "column": null + }, + "name": "software.Example", + "messages": [ + "tracing destination python software.Example is unversioned" + ], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "python software.Example@1.0" + ], + "ref_down": [ + "python software.Example" + ], + "tracing_status": "MISSING" + } + ], + "coverage": 0.0 + } + ], + "policy": { + "Code": { + "name": "Code", + "traces": [], + "source": [ + { + "file": "python_unversioned_trace_dest_no_schema.lobster" + } + ], + "needs_tracing_up": false, + "needs_tracing_down": false, + "breakdown_requirements": [] + } + }, + "matrix": [] +} diff --git a/tests_system/lobster_report/data/report_ver_mismatch_trace_dest_yaml_no_schema.lobster b/tests_system/lobster_report/data/report_ver_mismatch_trace_dest_yaml_no_schema.lobster new file mode 100644 index 000000000..856ec8469 --- /dev/null +++ b/tests_system/lobster_report/data/report_ver_mismatch_trace_dest_yaml_no_schema.lobster @@ -0,0 +1,51 @@ +{ + "schema": "lobster-report", + "version": 2, + "generator": "lobster_report", + "levels": [ + { + "name": "Code", + "items": [ + { + "tag": "python software.Example@2", + "location": { + "kind": "file", + "file": "./software.py", + "line": 1, + "column": null + }, + "name": "software.Example", + "messages": [ + "tracing destination python software.Example has version 2 (expected 1)" + ], + "just_up": [], + "just_down": [], + "just_global": [], + "ref_up": [ + "python software.Example@1" + ], + "ref_down": [ + "python software.Example@2" + ], + "tracing_status": "MISSING" + } + ], + "coverage": 0.0 + } + ], + "policy": { + "Code": { + "name": "Code", + "traces": [], + "source": [ + { + "file": "python_ver_mismatch_trace_dest_no_schema.lobster" + } + ], + "needs_tracing_up": false, + "needs_tracing_down": false, + "breakdown_requirements": [] + } + }, + "matrix": [] +} diff --git a/tests_system/lobster_report/data/report_zero_items_yaml_no_schema.lobster b/tests_system/lobster_report/data/report_zero_items_yaml_no_schema.lobster new file mode 100644 index 000000000..940028f70 --- /dev/null +++ b/tests_system/lobster_report/data/report_zero_items_yaml_no_schema.lobster @@ -0,0 +1,50 @@ +{ + "schema": "lobster-report", + "version": 2, + "generator": "lobster_report", + "levels": [ + { + "name": "Requirements", + "items": [], + "coverage": 0.0 + }, + { + "name": "Code", + "items": [], + "coverage": 0.0 + } + ], + "policy": { + "Requirements": { + "name": "Requirements", + "traces": [], + "source": [ + { + "file": "trlc_zero_items_no_schema.lobster" + } + ], + "needs_tracing_up": false, + "needs_tracing_down": true, + "breakdown_requirements": [ + [ + "Code" + ] + ] + }, + "Code": { + "name": "Code", + "traces": [ + "Requirements" + ], + "source": [ + { + "file": "python_zero_items_no_schema.lobster" + } + ], + "needs_tracing_up": true, + "needs_tracing_down": false, + "breakdown_requirements": [] + } + }, + "matrix": [] +} diff --git a/tests_system/lobster_report/data/tentacle_commander_code_no_schema.lobster b/tests_system/lobster_report/data/tentacle_commander_code_no_schema.lobster new file mode 100644 index 000000000..f869ee830 --- /dev/null +++ b/tests_system/lobster_report/data/tentacle_commander_code_no_schema.lobster @@ -0,0 +1,101 @@ +{ + "data": [ + { + "tag": "python tentacle_commander.TentacleCoordinator", + "location": { + "kind": "file", + "file": "tentacle_commander.py", + "line": 7, + "column": null + }, + "name": "tentacle_commander.TentacleCoordinator", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req octopus_example.tentacle_coordination" + ], + "language": "Python", + "kind": "Class" + }, + { + "tag": "python tentacle_commander.ColorCamouflage", + "location": { + "kind": "file", + "file": "tentacle_commander.py", + "line": 14, + "column": null + }, + "name": "tentacle_commander.ColorCamouflage", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req octopus_example.color_camouflage" + ], + "language": "Python", + "kind": "Class" + }, + { + "tag": "python tentacle_commander.InkDefense", + "location": { + "kind": "file", + "file": "tentacle_commander.py", + "line": 22, + "column": null + }, + "name": "tentacle_commander.InkDefense", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req octopus_example.ink_defense" + ], + "language": "Python", + "kind": "Class" + }, + { + "tag": "python tentacle_commander.PreyDetection", + "location": { + "kind": "file", + "file": "tentacle_commander.py", + "line": 29, + "column": null + }, + "name": "tentacle_commander.PreyDetection", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req octopus_example.prey_detection" + ], + "language": "Python", + "kind": "Class" + }, + { + "tag": "python tentacle_commander.DenSecurity", + "location": { + "kind": "file", + "file": "tentacle_commander.py", + "line": 37, + "column": null + }, + "name": "tentacle_commander.DenSecurity", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req octopus_example.den_security" + ], + "language": "Python", + "kind": "Class" + } + ], + "generator": "lobster_python", + "version": 5 +} diff --git a/tests_system/lobster_report/data/tentacle_commander_test_no_schema.lobster b/tests_system/lobster_report/data/tentacle_commander_test_no_schema.lobster new file mode 100644 index 000000000..38af57862 --- /dev/null +++ b/tests_system/lobster_report/data/tentacle_commander_test_no_schema.lobster @@ -0,0 +1,126 @@ +{ + "data": [ + { + "tag": "pyunit test_tentacle_commander.TestTentacleCoordinator.test_move_tentacles:18", + "location": { + "kind": "file", + "file": "test_tentacle_commander.py", + "line": 18, + "column": null + }, + "name": "test_tentacle_commander.TestTentacleCoordinator.test_move_tentacles:18", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req octopus_example.tentacle_coordination" + ], + "framework": "PyUnit", + "kind": "Test", + "status": null + }, + { + "tag": "pyunit test_tentacle_commander.TestColorCamouflage.test_change_color_coral:28", + "location": { + "kind": "file", + "file": "test_tentacle_commander.py", + "line": 28, + "column": null + }, + "name": "test_tentacle_commander.TestColorCamouflage.test_change_color_coral:28", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req octopus_example.color_camouflage" + ], + "framework": "PyUnit", + "kind": "Test", + "status": null + }, + { + "tag": "pyunit test_tentacle_commander.TestColorCamouflage.test_change_color_sand:33", + "location": { + "kind": "file", + "file": "test_tentacle_commander.py", + "line": 33, + "column": null + }, + "name": "test_tentacle_commander.TestColorCamouflage.test_change_color_sand:33", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req octopus_example.color_camouflage" + ], + "framework": "PyUnit", + "kind": "Test", + "status": null + }, + { + "tag": "pyunit test_tentacle_commander.TestInkDefense.test_deploy_ink:42", + "location": { + "kind": "file", + "file": "test_tentacle_commander.py", + "line": 42, + "column": null + }, + "name": "test_tentacle_commander.TestInkDefense.test_deploy_ink:42", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req octopus_example.ink_defense" + ], + "framework": "PyUnit", + "kind": "Test", + "status": null + }, + { + "tag": "pyunit test_tentacle_commander.TestPreyDetection.test_scan_for_prey:52", + "location": { + "kind": "file", + "file": "test_tentacle_commander.py", + "line": 52, + "column": null + }, + "name": "test_tentacle_commander.TestPreyDetection.test_scan_for_prey:52", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req octopus_example.prey_detection" + ], + "framework": "PyUnit", + "kind": "Test", + "status": null + }, + { + "tag": "pyunit test_tentacle_commander.TestDenSecurity.test_secure_den:62", + "location": { + "kind": "file", + "file": "test_tentacle_commander.py", + "line": 62, + "column": null + }, + "name": "test_tentacle_commander.TestDenSecurity.test_secure_den:62", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req octopus_example.den_security" + ], + "framework": "PyUnit", + "kind": "Test", + "status": null + } + ], + "generator": "lobster_python", + "version": 5 +} diff --git a/tests_system/lobster_report/data/tentacle_toolkit_code_no_schema.lobster b/tests_system/lobster_report/data/tentacle_toolkit_code_no_schema.lobster new file mode 100644 index 000000000..d54dcfad7 --- /dev/null +++ b/tests_system/lobster_report/data/tentacle_toolkit_code_no_schema.lobster @@ -0,0 +1,101 @@ +{ + "data": [ + { + "tag": "python tentacle_toolkit.MotorController", + "location": { + "kind": "file", + "file": "tentacle_toolkit.py", + "line": 7, + "column": null + }, + "name": "tentacle_toolkit.MotorController", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req octopus_example.tentacle_motor_control" + ], + "language": "Python", + "kind": "Class" + }, + { + "tag": "python tentacle_toolkit.ColorProcessor", + "location": { + "kind": "file", + "file": "tentacle_toolkit.py", + "line": 14, + "column": null + }, + "name": "tentacle_toolkit.ColorProcessor", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req octopus_example.chromatophore_processor" + ], + "language": "Python", + "kind": "Class" + }, + { + "tag": "python tentacle_toolkit.InkTrigger", + "location": { + "kind": "file", + "file": "tentacle_toolkit.py", + "line": 21, + "column": null + }, + "name": "tentacle_toolkit.InkTrigger", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req octopus_example.ink_sac_trigger" + ], + "language": "Python", + "kind": "Class" + }, + { + "tag": "python tentacle_toolkit.VisionProcessor", + "location": { + "kind": "file", + "file": "tentacle_toolkit.py", + "line": 28, + "column": null + }, + "name": "tentacle_toolkit.VisionProcessor", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req octopus_example.vision_processing_unit" + ], + "language": "Python", + "kind": "Class" + }, + { + "tag": "python tentacle_toolkit.ConstructionPlanner", + "location": { + "kind": "file", + "file": "tentacle_toolkit.py", + "line": 36, + "column": null + }, + "name": "tentacle_toolkit.ConstructionPlanner", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req octopus_example.rock_arrangement_planner" + ], + "language": "Python", + "kind": "Class" + } + ], + "generator": "lobster_python", + "version": 5 +} diff --git a/tests_system/lobster_report/data/tentacle_toolkit_test_no_schema.lobster b/tests_system/lobster_report/data/tentacle_toolkit_test_no_schema.lobster new file mode 100644 index 000000000..06ef716d6 --- /dev/null +++ b/tests_system/lobster_report/data/tentacle_toolkit_test_no_schema.lobster @@ -0,0 +1,106 @@ +{ + "data": [ + { + "tag": "pyunit test_tentacle_toolkit.TestMotorController.test_control_motors:18", + "location": { + "kind": "file", + "file": "test_tentacle_toolkit.py", + "line": 18, + "column": null + }, + "name": "test_tentacle_toolkit.TestMotorController.test_control_motors:18", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req octopus_example.tentacle_motor_control" + ], + "framework": "PyUnit", + "kind": "Test", + "status": null + }, + { + "tag": "pyunit test_tentacle_toolkit.TestColorProcessor.test_process_color_change:28", + "location": { + "kind": "file", + "file": "test_tentacle_toolkit.py", + "line": 28, + "column": null + }, + "name": "test_tentacle_toolkit.TestColorProcessor.test_process_color_change:28", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req octopus_example.chromatophore_processor" + ], + "framework": "PyUnit", + "kind": "Test", + "status": null + }, + { + "tag": "pyunit test_tentacle_toolkit.TestInkTrigger.test_trigger_ink_release:38", + "location": { + "kind": "file", + "file": "test_tentacle_toolkit.py", + "line": 38, + "column": null + }, + "name": "test_tentacle_toolkit.TestInkTrigger.test_trigger_ink_release:38", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req octopus_example.ink_sac_trigger" + ], + "framework": "PyUnit", + "kind": "Test", + "status": null + }, + { + "tag": "pyunit test_tentacle_toolkit.TestVisionProcessor.test_process_vision:48", + "location": { + "kind": "file", + "file": "test_tentacle_toolkit.py", + "line": 48, + "column": null + }, + "name": "test_tentacle_toolkit.TestVisionProcessor.test_process_vision:48", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req octopus_example.vision_processing_unit" + ], + "framework": "PyUnit", + "kind": "Test", + "status": null + }, + { + "tag": "pyunit test_tentacle_toolkit.TestConstructionPlanner.test_plan_construction:58", + "location": { + "kind": "file", + "file": "test_tentacle_toolkit.py", + "line": 58, + "column": null + }, + "name": "test_tentacle_toolkit.TestConstructionPlanner.test_plan_construction:58", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req octopus_example.rock_arrangement_planner" + ], + "framework": "PyUnit", + "kind": "Test", + "status": null + } + ], + "generator": "lobster_python", + "version": 5 +} diff --git a/tests_system/lobster_report/data/trlc_invalid_json_no_schema.lobster b/tests_system/lobster_report/data/trlc_invalid_json_no_schema.lobster new file mode 100644 index 000000000..8a178138c --- /dev/null +++ b/tests_system/lobster_report/data/trlc_invalid_json_no_schema.lobster @@ -0,0 +1,5 @@ +{ + "data": [], + "generator": "manual_empty", + "version": 5 +}, diff --git a/tests_system/lobster_report/data/trlc_json_not_dict_no_schema.lobster b/tests_system/lobster_report/data/trlc_json_not_dict_no_schema.lobster new file mode 100644 index 000000000..c1a93bdca --- /dev/null +++ b/tests_system/lobster_report/data/trlc_json_not_dict_no_schema.lobster @@ -0,0 +1,24 @@ +[{ + "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", + "version": 5 +}] diff --git a/tests_system/lobster_report/data/trlc_justified_no_schema.lobster b/tests_system/lobster_report/data/trlc_justified_no_schema.lobster new file mode 100644 index 000000000..76f2e38c0 --- /dev/null +++ b/tests_system/lobster_report/data/trlc_justified_no_schema.lobster @@ -0,0 +1,26 @@ +{ + "data": [ + { + "tag": "req example.adas_100_A", + "location": { + "kind": "file", + "file": ".\\demo.trlc", + "line": 3, + "column": 13 + }, + "name": "example.adas_100_A", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [ + "not linked" + ], + "framework": "TRLC", + "kind": "Requirement", + "text": "keep the vehicle in lane.", + "status": null + } + ], + "generator": "lobster-trlc", + "version": 5 +} diff --git a/tests_system/lobster_report/data/trlc_message_trace_coverage_no_schema.lobster b/tests_system/lobster_report/data/trlc_message_trace_coverage_no_schema.lobster new file mode 100644 index 000000000..18f665f97 --- /dev/null +++ b/tests_system/lobster_report/data/trlc_message_trace_coverage_no_schema.lobster @@ -0,0 +1,24 @@ +{ + "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", + "version": 5 +} diff --git a/tests_system/lobster_report/data/trlc_missing_no_schema.lobster b/tests_system/lobster_report/data/trlc_missing_no_schema.lobster new file mode 100644 index 000000000..9b64c4cb5 --- /dev/null +++ b/tests_system/lobster_report/data/trlc_missing_no_schema.lobster @@ -0,0 +1,24 @@ +{ + "data": [ + { + "tag": "req example.adas_100_A", + "location": { + "kind": "file", + "file": ".\\demo.trlc", + "line": 3, + "column": 13 + }, + "name": "example.adas_100_A", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "Requirement", + "text": "keep the vehicle in lane.", + "status": null + } + ], + "generator": "lobster-trlc", + "version": 5 +} diff --git a/tests_system/lobster_report/data/trlc_missing_version_no_schema.lobster b/tests_system/lobster_report/data/trlc_missing_version_no_schema.lobster new file mode 100644 index 000000000..cf03ffe48 --- /dev/null +++ b/tests_system/lobster_report/data/trlc_missing_version_no_schema.lobster @@ -0,0 +1,23 @@ +{ + "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" +} diff --git a/tests_system/lobster_report/data/trlc_mixed_no_schema.lobster b/tests_system/lobster_report/data/trlc_mixed_no_schema.lobster new file mode 100644 index 000000000..96328871c --- /dev/null +++ b/tests_system/lobster_report/data/trlc_mixed_no_schema.lobster @@ -0,0 +1,42 @@ +{ + "data": [ + { + "tag": "req example.adas_100_A", + "location": { + "kind": "file", + "file": ".\\demo.trlc", + "line": 3, + "column": 13 + }, + "name": "example.adas_100_A", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "Requirement", + "text": "keep the vehicle in lane for A.", + "status": null + }, + { + "tag": "req example.adas_100_B", + "location": { + "kind": "file", + "file": ".\\demo.trlc", + "line": 8, + "column": 13 + }, + "name": "example.adas_100_B", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "Requirement", + "text": "keep the vehicle in lane for B.", + "status": null + } + ], + "generator": "lobster-trlc", + "version": 5 +} diff --git a/tests_system/lobster_report/data/trlc_ok_no_schema.lobster b/tests_system/lobster_report/data/trlc_ok_no_schema.lobster new file mode 100644 index 000000000..44c27433b --- /dev/null +++ b/tests_system/lobster_report/data/trlc_ok_no_schema.lobster @@ -0,0 +1,186 @@ +{ + "data": [ + { + "tag": "req example.vehicle", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 3, + "column": 13 + }, + "name": "example.vehicle", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "requirement", + "text": "This is a requirement for vehicle", + "status": null + }, + { + "tag": "req example.engine", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 7, + "column": 13 + }, + "name": "example.engine", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "requirement", + "text": "The vehicle shall have an efficient engine system", + "status": null + }, + { + "tag": "req example.safety_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 11, + "column": 13 + }, + "name": "example.safety_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "requirement", + "text": "The vehicle shall include comprehensive safety features", + "status": null + }, + { + "tag": "req example.braking_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 15, + "column": 13 + }, + "name": "example.braking_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "requirement", + "text": "The vehicle shall have responsive braking capability", + "status": null + }, + { + "tag": "req example.electrical_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 19, + "column": 13 + }, + "name": "example.electrical_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "requirement", + "text": "The vehicle shall have reliable electrical components", + "status": null + }, + { + "tag": "req example.fuel_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 23, + "column": 13 + }, + "name": "example.fuel_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "requirement", + "text": "The vehicle shall have efficient fuel delivery", + "status": null + }, + { + "tag": "req example.transmission_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 27, + "column": 13 + }, + "name": "example.transmission_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "requirement", + "text": "The vehicle shall have a smooth gear transmission system", + "status": null + }, + { + "tag": "req example.steering_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 31, + "column": 13 + }, + "name": "example.steering_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "requirement", + "text": "The vehicle shall have precise steering control", + "status": null + }, + { + "tag": "req example.lighting_system", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 35, + "column": 13 + }, + "name": "example.lighting_system", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "requirement", + "text": "The vehicle shall have functional headlights and taillights", + "status": null + }, + { + "tag": "req example.climate_control", + "location": { + "kind": "file", + "file": "demo.trlc", + "line": 39, + "column": 13 + }, + "name": "example.climate_control", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "TRLC", + "kind": "requirement", + "text": "The vehicle shall maintain comfortable cabin temperature", + "status": null + } + ], + "generator": "lobster-trlc", + "version": 5 +} diff --git a/tests_system/lobster_report/data/trlc_zero_items_no_schema.lobster b/tests_system/lobster_report/data/trlc_zero_items_no_schema.lobster new file mode 100644 index 000000000..0649da5b9 --- /dev/null +++ b/tests_system/lobster_report/data/trlc_zero_items_no_schema.lobster @@ -0,0 +1,5 @@ +{ + "data": [], + "generator": "manual_empty", + "version": 5 +} diff --git a/tests_system/lobster_report/data/unknown_tracing_target_no_schema.yaml b/tests_system/lobster_report/data/unknown_tracing_target_no_schema.yaml new file mode 100644 index 000000000..5b2b36f96 --- /dev/null +++ b/tests_system/lobster_report/data/unknown_tracing_target_no_schema.yaml @@ -0,0 +1,4 @@ +Code: !LevelDefinition + name: Code + source: + - file: python_unknown_tracing_target_no_schema.lobster diff --git a/tests_system/lobster_report/data/unversioned_trace_no_schema.yaml b/tests_system/lobster_report/data/unversioned_trace_no_schema.yaml new file mode 100644 index 000000000..63f7a26cc --- /dev/null +++ b/tests_system/lobster_report/data/unversioned_trace_no_schema.yaml @@ -0,0 +1,4 @@ +Code: !LevelDefinition + name: Code + source: + - file: python_unversioned_trace_dest_no_schema.lobster diff --git a/tests_system/lobster_report/data/version_mismatch_trace_no_schema.yaml b/tests_system/lobster_report/data/version_mismatch_trace_no_schema.yaml new file mode 100644 index 000000000..33674a9d4 --- /dev/null +++ b/tests_system/lobster_report/data/version_mismatch_trace_no_schema.yaml @@ -0,0 +1,4 @@ +Code: !LevelDefinition + name: Code + source: + - file: python_ver_mismatch_trace_dest_no_schema.lobster diff --git a/tests_system/lobster_report/data/yamale_linear_policy.yaml b/tests_system/lobster_report/data/yamale_linear_policy.yaml new file mode 100644 index 000000000..fec64e1c2 --- /dev/null +++ b/tests_system/lobster_report/data/yamale_linear_policy.yaml @@ -0,0 +1,26 @@ +System Requirements: + name: System Requirements + source: + - file: linear_system_requirements.lobster + needs_tracing_down: true + breakdown_requirements: + - - Software Requirements + +Software Requirements: + name: Software Requirements + source: + - file: linear_software_requirements.lobster + needs_tracing_up: true + traces: + - System Requirements + needs_tracing_down: true + breakdown_requirements: + - - Code + +Code: + name: Code + source: + - file: code_linear.lobster + needs_tracing_up: true + traces: + - Software Requirements diff --git a/tests_system/lobster_report/test_items_coverage.py b/tests_system/lobster_report/test_items_coverage.py index e47ceee5b..37ee35360 100644 --- a/tests_system/lobster_report/test_items_coverage.py +++ b/tests_system/lobster_report/test_items_coverage.py @@ -28,6 +28,34 @@ def test_zero_items_coverage(self): completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutText( + f"{conf_file}: lobster warning: configuration file format '.conf' " + f"is deprecated, please migrate to '.yaml' format\n" + ) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_zero_items_coverage_yaml_no_schema(self): + # lobster-trace: UseCases.Tracing_Policy_Output_File + # lobster-trace: UseCases.Coverage_calculation_in_Output + # lobster-trace: core_report_req.Zero_Items_Coverage + self._test_runner.declare_input_file(self._data_directory / + "lobster_zero_items_no_schema.yaml") + self._test_runner.declare_input_file(self._data_directory / + "trlc_zero_items_no_schema.lobster") + self._test_runner.declare_input_file(self._data_directory / + "python_zero_items_no_schema.lobster") + + conf_file = "lobster_zero_items_no_schema.yaml" + out_file = "report_zero_items_yaml_no_schema.lobster" + self._test_runner.cmd_args.lobster_config = conf_file + self._test_runner.cmd_args.out = out_file + self._test_runner.declare_output_file(self._data_directory / out_file) + + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) asserter.assertNoStdErrText() asserter.assertNoStdOutText() @@ -45,8 +73,41 @@ def test_items_message_trace_coverage(self): self._test_runner.declare_input_file(self._data_directory / "trlc_message_trace_coverage.lobster") + conf_file = "message_trace_coverage.conf" out_file = "report_message_trace_coverage.lobster" - self._test_runner.cmd_args.lobster_config = "message_trace_coverage.conf" + self._test_runner.cmd_args.lobster_config = conf_file + self._test_runner.cmd_args.out = out_file + self._test_runner.declare_output_file(self._data_directory / out_file) + + completed_process = self._test_runner.run_tool_test() + + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutText( + f"{conf_file}: lobster warning: configuration file format '.conf' " + f"is deprecated, please migrate to '.yaml' format\n" + ) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_items_message_trace_coverage_yaml_no_schema(self): + # lobster-trace: UseCases.Tracing_Policy_Output_File + # lobster-trace: UseCases.Coverage_calculation_in_Output + # lobster-trace: core_report_req.Message_Trace_Coverage + self._test_runner.declare_input_file( + self._data_directory / "message_trace_coverage_no_schema.yaml" + ) + self._test_runner.declare_input_file( + self._data_directory / "python_message_trace_coverage_no_schema.lobster" + ) + self._test_runner.declare_input_file( + self._data_directory / "trlc_message_trace_coverage_no_schema.lobster" + ) + + out_file = "report_message_trace_coverage_yaml_no_schema.lobster" + self._test_runner.cmd_args.lobster_config = ( + "message_trace_coverage_no_schema.yaml" + ) self._test_runner.cmd_args.out = out_file self._test_runner.declare_output_file(self._data_directory / out_file) diff --git a/tests_system/lobster_report/test_json_scanario.py b/tests_system/lobster_report/test_json_scanario.py index 902e57839..a09cad581 100644 --- a/tests_system/lobster_report/test_json_scanario.py +++ b/tests_system/lobster_report/test_json_scanario.py @@ -16,20 +16,42 @@ def test_invalid_json(self): self._test_runner.declare_input_file(self._data_directory / "trlc_invalid_json.lobster") - self._test_runner.cmd_args.lobster_config = "invalid_json.conf" + conf_file = "invalid_json.conf" + self._test_runner.cmd_args.lobster_config = conf_file result = self._test_runner.run_tool_test() asserter = Asserter(self, result, self._test_runner) asserter.assertNoStdErrText() - asserter.assertStdOutText("trlc_invalid_json.lobster:6:2: " + asserter.assertStdOutText( + f"{conf_file}: lobster warning: configuration file format '.conf' " + f"is deprecated, please migrate to '.yaml' format\n" + f"trlc_invalid_json.lobster:6:2: " + f"lobster error: Extra data\n\n" + f"lobster-report: aborting due " + f"to earlier errors.\n" + ) + asserter.assertExitCode(1) + + def test_invalid_json_yaml_no_schema(self): + # lobster-trace: core_report_req.Invalid_JSON_File + self._test_runner.declare_input_file(self._data_directory / + "invalid_json_no_schema.yaml") + self._test_runner.declare_input_file(self._data_directory / + "trlc_invalid_json_no_schema.lobster") + + self._test_runner.cmd_args.lobster_config = "invalid_json_no_schema.yaml" + result = self._test_runner.run_tool_test() + asserter = Asserter(self, result, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutText("trlc_invalid_json_no_schema.lobster:5:2: " "lobster error: Extra data\n\n" "lobster-report: aborting due " "to earlier errors.\n") asserter.assertExitCode(1) - def test_missing_input_file(self): + def test_missing_config_file(self): # lobster-trace: core_report_req.File_Not_Found - missing_file = "non_existent_input.lobster" + missing_file = "non_existent_input.conf" self._test_runner.cmd_args.lobster_config = missing_file result = self._test_runner.run_tool_test() @@ -40,6 +62,39 @@ def test_missing_input_file(self): ) asserter.assertExitCode(1) + def test_missing_config_file_yaml(self): + # lobster-trace: core_report_req.File_Not_Found + missing_file = "non_existent_input.yaml" + self._test_runner.cmd_args.lobster_config = missing_file + + result = self._test_runner.run_tool_test() + asserter = Asserter(self, result, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutText( + "non_existent_input.yaml: lobster error: " + "Failed to validate yaml config file: " + "[Errno 2] No such file or directory: 'non_existent_input.yaml'\n" + "\n" + "lobster-report: aborting due to earlier errors.\n" + ) + asserter.assertExitCode(1) + + def test_unsupported_config_file(self): + # lobster-trace: core_report_req.File_Not_Found + missing_file = "non_existent_input.lobster" + self._test_runner.cmd_args.lobster_config = missing_file + + result = self._test_runner.run_tool_test() + asserter = Asserter(self, result, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutText( + "non_existent_input.lobster: lobster error: configuration file format is " + "unsupported, please use '.yaml' format\n" + "\n" + "lobster-report: aborting due to earlier errors.\n" + ) + asserter.assertExitCode(1) + def test_lobster_exception_dump(self): # lobster-trace: core_report_req.Lobster_Exception_Dump_Invalid_Input self._test_runner.declare_input_file(self._data_directory / @@ -47,7 +102,30 @@ def test_lobster_exception_dump(self): self._test_runner.declare_input_file(self._data_directory / "python_invalid_input.lobster") - self._test_runner.cmd_args.lobster_config = "invalid_input.conf" + conf_file = "invalid_input.conf" + self._test_runner.cmd_args.lobster_config = conf_file + + result = self._test_runner.run_tool_test() + asserter = Asserter(self, result, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutText( + f"{conf_file}: lobster warning: configuration file format '.conf' " + "is deprecated, please migrate to '.yaml' format\n" + "LOBSTER Error: location data does not contain 'kind'\n" + "------------------------------------------------------------\n" + "{'column': None, 'file': '.\\\\software.py', 'line': 1}\n" + "------------------------------------------------------------\n" + ) + asserter.assertExitCode(1) + + def test_lobster_exception_dump_yaml_no_schema(self): + # lobster-trace: core_report_req.Lobster_Exception_Dump_Invalid_Input + self._test_runner.declare_input_file(self._data_directory / + "invalid_input_no_schema.yaml") + self._test_runner.declare_input_file(self._data_directory / + "python_invalid_input_no_schema.lobster") + + self._test_runner.cmd_args.lobster_config = "invalid_input_no_schema.yaml" result = self._test_runner.run_tool_test() asserter = Asserter(self, result, self._test_runner) @@ -67,12 +145,35 @@ def test_invalid_json_not_dict(self): self._test_runner.declare_input_file(self._data_directory / "trlc_json_not_dict.lobster") - self._test_runner.cmd_args.lobster_config = "json_not_dict.conf" + conf_file = "json_not_dict.conf" + self._test_runner.cmd_args.lobster_config = conf_file + + result = self._test_runner.run_tool_test() + asserter = Asserter(self, result, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutText( + f"{conf_file}: lobster warning: configuration file format '.conf' " + f"is deprecated, please migrate to '.yaml' format\n" + f"trlc_json_not_dict.lobster: " + f"lobster error: parsed json is not an object\n\n" + f"lobster-report: aborting due " + f"to earlier errors.\n" + ) + asserter.assertExitCode(1) + + def test_invalid_json_not_dict_yaml_no_schema(self): + # lobster-trace: core_report_req.Invalid_JSON_Not_Dict + self._test_runner.declare_input_file(self._data_directory / + "json_not_dict_no_schema.yaml") + self._test_runner.declare_input_file(self._data_directory / + "trlc_json_not_dict_no_schema.lobster") + + self._test_runner.cmd_args.lobster_config = "json_not_dict_no_schema.yaml" result = self._test_runner.run_tool_test() asserter = Asserter(self, result, self._test_runner) asserter.assertNoStdErrText() - asserter.assertStdOutText("trlc_json_not_dict.lobster: " + asserter.assertStdOutText("trlc_json_not_dict_no_schema.lobster: " "lobster error: parsed json is not an object\n\n" "lobster-report: aborting due " "to earlier errors.\n") diff --git a/tests_system/lobster_report/test_justification.py b/tests_system/lobster_report/test_justification.py index 5f497dc8f..41e36ea66 100644 --- a/tests_system/lobster_report/test_justification.py +++ b/tests_system/lobster_report/test_justification.py @@ -35,6 +35,45 @@ def test_justification_and_coverage(self): self._test_runner.cmd_args.out = out_file self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutText( + f"{conf_file}: lobster warning: configuration file format '.conf' " + f"is deprecated, please migrate to '.yaml' format\n" + ) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_justification_and_coverage_yaml_no_schema(self): + # lobster-trace: UseCases.Tracing_Policy_Output_File + # lobster-trace: UseCases.Coverage_calculation_in_Output + # lobster-trace: core_report_req.Status_Justified_Global + # lobster-trace: core_report_req.Status_Justified_Up + # lobster-trace: core_report_req.Status_Justified_Down + """ + This test checks that the lobster report tool can handle justifications + and coverage changes according to justifications and generate lobster report. + """ + self._test_runner.declare_input_file( + self._data_directory / "just_policy_no_schema.yaml" + ) + self._test_runner.declare_input_file( + self._data_directory / "just_usecases_no_schema.lobster" + ) + self._test_runner.declare_input_file( + self._data_directory / "just_system_requirements_no_schema.lobster" + ) + self._test_runner.declare_input_file( + self._data_directory / "just_software_requirements_no_schema.lobster" + ) + + conf_file = "just_policy_no_schema.yaml" + out_file = "just_report_yaml_no_schema.lobster" + self._test_runner.cmd_args.lobster_config = conf_file + self._test_runner.cmd_args.out = out_file + self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() asserter = Asserter(self, completed_process, self._test_runner) asserter.assertNoStdErrText() diff --git a/tests_system/lobster_report/test_multiple_inputs.py b/tests_system/lobster_report/test_multiple_inputs.py index abdcf9302..b4819736f 100644 --- a/tests_system/lobster_report/test_multiple_inputs.py +++ b/tests_system/lobster_report/test_multiple_inputs.py @@ -40,6 +40,46 @@ def test_extra_input_files_are_ignored_by_policy(self): self._test_runner.cmd_args.out = out_file self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutText( + f"{conf_file}: lobster warning: configuration file format '.conf' " + f"is deprecated, please migrate to '.yaml' format\n" + ) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_extra_input_files_are_ignored_by_policy_yaml_no_schema(self): + # lobster-trace: UseCases.Tracing_Policy_Output_File + # lobster-trace: UseCases.Software_Test_to_Requirement_Mapping_in_output + # lobster-trace: core_report_req.Input_Files_Policy_Based_Processing + """ + This test checks that the lobster report tool can handle multiple input files. + The tool should actually fetch input files provided in the tracing policy + and avoid all extra lobster files + """ + self._test_runner.declare_input_file(self._data_directory / + "multiple_traces_just_no_schema.yaml") + self._test_runner.declare_input_file(self._data_directory / + "just_requirements_no_schema.lobster") + self._test_runner.declare_input_file(self._data_directory / + "multiple_traces_code_no_schema.lobster") + self._test_runner.declare_input_file(self._data_directory / + "multiple_traces_test_no_schema.lobster") + self._test_runner.declare_input_file(self._data_directory / + "report_ok_no_schema.lobster") + self._test_runner.declare_input_file(self._data_directory / + "python_missing_no_schema.lobster") + self._test_runner.declare_input_file(self._data_directory / + "just_requirements_no_schema.lobster") + + conf_file = "multiple_traces_just_no_schema.yaml" + out_file = "report_multiple_traces_just_yaml_no_schema.lobster" + self._test_runner.cmd_args.lobster_config = conf_file + self._test_runner.cmd_args.out = out_file + self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() asserter = Asserter(self, completed_process, self._test_runner) asserter.assertNoStdErrText() @@ -78,6 +118,35 @@ def test_missing_required_files_cause_failure(self): ) asserter.assertExitCode(1) + def test_missing_required_files_cause_failure_yaml_no_schema(self): + # lobster-trace: core_report_req.Missing_Required_Files_Error + """ + This test checks that the lobster report tool fails when required input files + are missing. The tool should report an error and abort processing if any + required lobster file is not found. + """ + self._test_runner.declare_input_file(self._data_directory / + "multiple_traces_just_no_schema.yaml") + self._test_runner.declare_input_file(self._data_directory / + "just_requirements_no_schema.lobster") + self._test_runner.declare_input_file(self._data_directory / + "multiple_traces_code_no_schema.lobster") + + conf_file = "multiple_traces_just_no_schema.yaml" + out_file = "report_multiple_traces_just_yaml_no_schema.lobster" + self._test_runner.cmd_args.lobster_config = conf_file + self._test_runner.cmd_args.out = out_file + self._test_runner.declare_output_file(self._data_directory / out_file) + + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertStdErrText("") + asserter.assertStdOutText( + "[Errno 2] No such file or directory: " + "'multiple_traces_test_no_schema.lobster'\n" + ) + asserter.assertExitCode(1) + def test_multiple_source_files(self): # lobster-trace: UseCases.Tracing_Policy_Output_File # lobster-trace: UseCases.Software_Test_to_Requirement_Mapping_in_output @@ -109,6 +178,54 @@ def test_multiple_source_files(self): self._test_runner.cmd_args.out = out_file self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutText( + f"{conf_file}: lobster warning: configuration file format '.conf' " + f"is deprecated, please migrate to '.yaml' format\n" + ) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_multiple_source_files_yaml_no_schema(self): + # lobster-trace: UseCases.Tracing_Policy_Output_File + # lobster-trace: UseCases.Software_Test_to_Requirement_Mapping_in_output + # lobster-trace: core_report_req.Multi_Level_Source_Files + # lobster-trace: core_report_req.Item_Data_Isolation + """ + This test checks that the lobster report tool can handle multiple source files + given at different levels of tracing policy. + The tool should isolate item data of items and do not mix it. + """ + self._test_runner.declare_input_file( + self._data_directory / "octopus_policy_no_schema.yaml" + ) + self._test_runner.declare_input_file( + self._data_directory / "octopus_system_no_schema.lobster" + ) + self._test_runner.declare_input_file( + self._data_directory / "octopus_software_no_schema.lobster" + ) + self._test_runner.declare_input_file( + self._data_directory / "tentacle_commander_code_no_schema.lobster" + ) + self._test_runner.declare_input_file( + self._data_directory / "tentacle_toolkit_code_no_schema.lobster" + ) + self._test_runner.declare_input_file( + self._data_directory / "tentacle_commander_test_no_schema.lobster" + ) + self._test_runner.declare_input_file( + self._data_directory / "tentacle_toolkit_test_no_schema.lobster" + ) + + conf_file = "octopus_policy_no_schema.yaml" + out_file = "report_octopus_yaml_no_schema.lobster" + self._test_runner.cmd_args.lobster_config = conf_file + self._test_runner.cmd_args.out = out_file + self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() asserter = Asserter(self, completed_process, self._test_runner) asserter.assertNoStdErrText() diff --git a/tests_system/lobster_report/test_multiple_traces.py b/tests_system/lobster_report/test_multiple_traces.py index af88c2ca4..a98885cdf 100644 --- a/tests_system/lobster_report/test_multiple_traces.py +++ b/tests_system/lobster_report/test_multiple_traces.py @@ -34,6 +34,40 @@ def test_multiple_traces_justification(self): self._test_runner.cmd_args.out = out_file self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutText( + f"{conf_file}: lobster warning: configuration file format '.conf' " + f"is deprecated, please migrate to '.yaml' format\n" + ) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_multiple_traces_justification_yaml_no_schema(self): + # lobster-trace: UseCases.Tracing_Policy_Output_File + # lobster-trace: UseCases.Software_Test_to_Requirement_Mapping_in_output + # lobster-trace: core_report_req.Multiple_Traces_Support + # lobster-trace: core_report_req.Status_Justified_Up + """ + This test checks that the lobster report tool can handle multiple lobster traces + with justifications in code as well as tests + """ + self._test_runner.declare_input_file(self._data_directory / + "multiple_traces_just_no_schema.yaml") + self._test_runner.declare_input_file(self._data_directory / + "just_requirements_no_schema.lobster") + self._test_runner.declare_input_file(self._data_directory / + "multiple_traces_code_no_schema.lobster") + self._test_runner.declare_input_file(self._data_directory / + "multiple_traces_test_no_schema.lobster") + + conf_file = "multiple_traces_just_no_schema.yaml" + out_file = "report_multiple_traces_just_yaml_no_schema.lobster" + self._test_runner.cmd_args.lobster_config = conf_file + self._test_runner.cmd_args.out = out_file + self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() asserter = Asserter(self, completed_process, self._test_runner) asserter.assertNoStdErrText() diff --git a/tests_system/lobster_report/test_resolve_references_errors.py b/tests_system/lobster_report/test_resolve_references_errors.py index 3c973f1f1..d7e470bd1 100644 --- a/tests_system/lobster_report/test_resolve_references_errors.py +++ b/tests_system/lobster_report/test_resolve_references_errors.py @@ -17,11 +17,43 @@ def test_unknown_tracing_target(self): self._test_runner.declare_input_file(self._data_directory / "python_unknown_tracing_target.lobster") - self._test_runner.cmd_args.lobster_config = "unknown_tracing_target.conf" + conf_file = "unknown_tracing_target.conf" + self._test_runner.cmd_args.lobster_config = conf_file self._test_runner.cmd_args.out = "report_unknown_tracing_target.lobster" self._test_runner.declare_output_file(self._data_directory / "report_unknown_tracing_target.lobster") + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutText( + f"{conf_file}: lobster warning: configuration file format '.conf' " + f"is deprecated, please migrate to '.yaml' format\n" + ) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_unknown_tracing_target_yaml_no_schema(self): + # lobster-trace: UseCases.Tracing_Policy_Output_File + # lobster-trace: core_report_req.Unknown_Tracing_Target + self._test_runner.declare_input_file( + self._data_directory / "unknown_tracing_target_no_schema.yaml" + ) + self._test_runner.declare_input_file( + self._data_directory / "python_unknown_tracing_target_no_schema.lobster" + ) + + self._test_runner.cmd_args.lobster_config = ( + "unknown_tracing_target_no_schema.yaml" + ) + self._test_runner.cmd_args.out = ( + "report_unknown_tracing_target_yaml_no_schema.lobster" + ) + self._test_runner.declare_output_file( + self._data_directory / + "report_unknown_tracing_target_yaml_no_schema.lobster" + ) + completed_process = self._test_runner.run_tool_test() asserter = Asserter(self, completed_process, self._test_runner) asserter.assertNoStdErrText() @@ -37,11 +69,43 @@ def test_tracing_destination_unversioned(self): self._test_runner.declare_input_file(self._data_directory / "python_unversioned_trace_dest.lobster") - self._test_runner.cmd_args.lobster_config = "unversioned_trace.conf" + conf_file = "unversioned_trace.conf" + self._test_runner.cmd_args.lobster_config = conf_file self._test_runner.cmd_args.out = "report_unversioned_trace_dest.lobster" self._test_runner.declare_output_file(self._data_directory / "report_unversioned_trace_dest.lobster") + result = self._test_runner.run_tool_test() + asserter = Asserter(self, result, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutText( + f"{conf_file}: lobster warning: configuration file format '.conf' " + f"is deprecated, please migrate to '.yaml' format\n" + ) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_tracing_destination_unversioned_yaml_no_schema(self): + # lobster-trace: UseCases.Tracing_Policy_Output_File + # lobster-trace: core_report_req.Tracing_Destination_Unversioned + self._test_runner.declare_input_file( + self._data_directory / "unversioned_trace_no_schema.yaml" + ) + self._test_runner.declare_input_file( + self._data_directory / "python_unversioned_trace_dest_no_schema.lobster" + ) + + self._test_runner.cmd_args.lobster_config = ( + "unversioned_trace_no_schema.yaml" + ) + self._test_runner.cmd_args.out = ( + "report_unversioned_trace_dest_yaml_no_schema.lobster" + ) + self._test_runner.declare_output_file( + self._data_directory / + "report_unversioned_trace_dest_yaml_no_schema.lobster" + ) + result = self._test_runner.run_tool_test() asserter = Asserter(self, result, self._test_runner) asserter.assertNoStdErrText() @@ -57,10 +121,43 @@ def test_tracing_destination_version_mismatch(self): self._test_runner.declare_input_file(self._data_directory / "python_ver_mismatch_trace_dest.lobster") - self._test_runner.cmd_args.lobster_config = "version_mismatch_trace.conf" + conf_file = "version_mismatch_trace.conf" + self._test_runner.cmd_args.lobster_config = conf_file self._test_runner.cmd_args.out = "report_ver_mismatch_trace_dest.lobster" - self._test_runner.declare_output_file(self._data_directory / - "report_ver_mismatch_trace_dest.lobster") + self._test_runner.declare_output_file( + self._data_directory / "report_ver_mismatch_trace_dest.lobster" + ) + + result = self._test_runner.run_tool_test() + asserter = Asserter(self, result, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutText( + f"{conf_file}: lobster warning: configuration file format '.conf' " + f"is deprecated, please migrate to '.yaml' format\n" + ) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_tracing_destination_version_mismatch_yaml_no_schema(self): + # lobster-trace: UseCases.Tracing_Policy_Output_File + # lobster-trace: core_report_req.Tracing_Destination_Version_Mismatch + self._test_runner.declare_input_file( + self._data_directory / "version_mismatch_trace_no_schema.yaml" + ) + self._test_runner.declare_input_file( + self._data_directory / "python_ver_mismatch_trace_dest_no_schema.lobster" + ) + + self._test_runner.cmd_args.lobster_config = ( + "version_mismatch_trace_no_schema.yaml" + ) + self._test_runner.cmd_args.out = ( + "report_ver_mismatch_trace_dest_yaml_no_schema.lobster" + ) + self._test_runner.declare_output_file( + self._data_directory / + "report_ver_mismatch_trace_dest_yaml_no_schema.lobster" + ) result = self._test_runner.run_tool_test() asserter = Asserter(self, result, self._test_runner) diff --git a/tests_system/lobster_report/test_schema_and_version.py b/tests_system/lobster_report/test_schema_and_version.py index 96379a3d6..3ced5d811 100644 --- a/tests_system/lobster_report/test_schema_and_version.py +++ b/tests_system/lobster_report/test_schema_and_version.py @@ -17,8 +17,33 @@ def test_invalid_schema(self): "trlc_zero_items.lobster") self._test_runner.declare_input_file(self._data_directory / "python_invalid_schema.lobster") + conf_file = "invalid_schema.conf" + self._test_runner.cmd_args.lobster_config = conf_file - self._test_runner.cmd_args.lobster_config = "invalid_schema.conf" + result = self._test_runner.run_tool_test() + asserter = Asserter(self, result, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutText( + f"{conf_file}: lobster warning: configuration file format '.conf' " + f"is deprecated, please migrate to '.yaml' format\n" + f"python_invalid_schema.lobster: " + f"lobster error: unknown schema kind " + f"invalid-schema-name\n\n" + f"lobster-report: aborting due " + f"to earlier errors.\n" + ) + asserter.assertExitCode(1) + + def test_invalid_schema_yaml(self): + # lobster-trace: core_report_req.Invalid_Schema + self._test_runner.declare_input_file(self._data_directory / + "invalid_schema.yaml") + self._test_runner.declare_input_file(self._data_directory / + "trlc_zero_items.lobster") + self._test_runner.declare_input_file(self._data_directory / + "python_invalid_schema.lobster") + + self._test_runner.cmd_args.lobster_config = "invalid_schema.yaml" result = self._test_runner.run_tool_test() asserter = Asserter(self, result, self._test_runner) @@ -36,7 +61,31 @@ def test_missing_schema(self): self._data_directory / "missing_schema.conf") self._test_runner.declare_input_file( self._data_directory / "trlc_missing_schema.lobster") - self._test_runner.cmd_args.lobster_config = "missing_schema.conf" + + conf_file = "missing_schema.conf" + self._test_runner.cmd_args.lobster_config = conf_file + + result = self._test_runner.run_tool_test() + asserter = Asserter(self, result, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutText( + f"{conf_file}: lobster warning: configuration file format '.conf' " + f"is deprecated, please migrate to '.yaml' format\n" + f"trlc_missing_schema.lobster: " + f"lobster error: required top-levelkey " + f"schema not present\n\n" + f"lobster-report: aborting due " + f"to earlier errors.\n" + ) + asserter.assertExitCode(1) + + def test_missing_schema_yaml(self): + # lobster-trace: core_report_req.Missing_Schema_Key + self._test_runner.declare_input_file( + self._data_directory / "missing_schema.yaml") + self._test_runner.declare_input_file( + self._data_directory / "trlc_missing_schema.lobster") + self._test_runner.cmd_args.lobster_config = "missing_schema.yaml" result = self._test_runner.run_tool_test() asserter = Asserter(self, result, self._test_runner) @@ -57,7 +106,33 @@ def test_invalid_version(self): self._test_runner.declare_input_file(self._data_directory / "python_invalid_version.lobster") - self._test_runner.cmd_args.lobster_config = "invalid_version.conf" + conf_file = "invalid_version.conf" + self._test_runner.cmd_args.lobster_config = conf_file + + result = self._test_runner.run_tool_test() + asserter = Asserter(self, result, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutText( + f"{conf_file}: lobster warning: configuration file format '.conf' " + f"is deprecated, please migrate to '.yaml' format\n" + f"python_invalid_version.lobster: " + f"lobster error: version 99 for schema " + f"lobster-req-trace is not supported\n\n" + f"lobster-report: aborting due " + f"to earlier errors.\n" + ) + asserter.assertExitCode(1) + + def test_invalid_version_yaml(self): + # lobster-trace: core_report_req.Invalid_Schema_Version + self._test_runner.declare_input_file(self._data_directory / + "invalid_version.yaml") + self._test_runner.declare_input_file(self._data_directory / + "trlc_zero_items.lobster") + self._test_runner.declare_input_file(self._data_directory / + "python_invalid_version.lobster") + + self._test_runner.cmd_args.lobster_config = "invalid_version.yaml" result = self._test_runner.run_tool_test() asserter = Asserter(self, result, self._test_runner) @@ -75,12 +150,36 @@ def test_missing_version(self): self._data_directory / "missing_version.conf") self._test_runner.declare_input_file( self._data_directory / "trlc_missing_version.lobster") - self._test_runner.cmd_args.lobster_config = "missing_version.conf" + + conf_file = "missing_version.conf" + self._test_runner.cmd_args.lobster_config = conf_file + + result = self._test_runner.run_tool_test() + asserter = Asserter(self, result, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutText( + f"{conf_file}: lobster warning: configuration file format '.conf' " + f"is deprecated, please migrate to '.yaml' format\n" + f"trlc_missing_version.lobster: " + f"lobster error: required top-levelkey " + f"version not present\n\n" + f"lobster-report: aborting due " + f"to earlier errors.\n" + ) + asserter.assertExitCode(1) + + def test_missing_version_yaml_no_schema(self): + # lobster-trace: core_report_req.Missing_Version_Key + self._test_runner.declare_input_file( + self._data_directory / "missing_version_no_schema.yaml") + self._test_runner.declare_input_file( + self._data_directory / "trlc_missing_version_no_schema.lobster") + self._test_runner.cmd_args.lobster_config = "missing_version_no_schema.yaml" result = self._test_runner.run_tool_test() asserter = Asserter(self, result, self._test_runner) asserter.assertNoStdErrText() - asserter.assertStdOutText("trlc_missing_version.lobster: " + asserter.assertStdOutText("trlc_missing_version_no_schema.lobster: " "lobster error: required top-levelkey " "version not present\n\n" "lobster-report: aborting due " diff --git a/tests_system/lobster_report/test_tracing_policies.py b/tests_system/lobster_report/test_tracing_policies.py index 837843369..91eaa691b 100644 --- a/tests_system/lobster_report/test_tracing_policies.py +++ b/tests_system/lobster_report/test_tracing_policies.py @@ -31,6 +31,41 @@ def test_linear_policy(self): self._test_runner.cmd_args.out = out_file self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutText( + f"{conf_file}: lobster warning: configuration file format '.conf' " + f"is deprecated, please migrate to '.yaml' format\n" + ) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_linear_policy_yaml_no_schema(self): + # lobster-trace: UseCases.Tracing_Policy_Output_File + # lobster-trace: core_report_req.Linear_Policy_Support + """ + This test checks that the lobster report tool can handle a linear policy + """ + self._test_runner.declare_input_file( + self._data_directory / "linear_policy_no_schema.yaml" + ) + self._test_runner.declare_input_file( + self._data_directory / "linear_system_requirements_no_schema.lobster" + ) + self._test_runner.declare_input_file( + self._data_directory / "linear_software_requirements_no_schema.lobster" + ) + self._test_runner.declare_input_file( + self._data_directory / "code_linear_no_schema.lobster" + ) + + conf_file = "linear_policy_no_schema.yaml" + out_file = "report_linear_yaml_no_schema.lobster" + self._test_runner.cmd_args.lobster_config = conf_file + self._test_runner.cmd_args.out = out_file + self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() asserter = Asserter(self, completed_process, self._test_runner) asserter.assertNoStdErrText() @@ -67,6 +102,51 @@ def test_pizza_policy(self): self._test_runner.cmd_args.out = out_file self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutText( + f"{conf_file}: lobster warning: configuration file format '.conf' " + f"is deprecated, please migrate to '.yaml' format\n" + ) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_pizza_policy_yaml_no_schema(self): + # lobster-trace: UseCases.Tracing_Policy_Output_File + # lobster-trace: UseCases.Requirement_to_software_Test_Mapping_in_Output + # lobster-trace: UseCases.Software_Test_to_Requirement_Mapping_in_output + # lobster-trace: core_report_req.Complex_Multi_Level_Policy_Support + """ + This test checks that the lobster report tool can handle a pizza policy + which consists of 5 levels: system requirements, software requirements, + code, unit tests, and component tests. + """ + self._test_runner.declare_input_file( + self._data_directory / "pizza_policy_no_schema.yaml" + ) + self._test_runner.declare_input_file( + self._data_directory / "pizza_system_requirements_no_schema.lobster" + ) + self._test_runner.declare_input_file( + self._data_directory / "pizza_software_requirements_no_schema.lobster" + ) + self._test_runner.declare_input_file( + self._data_directory / "pizza_code_no_schema.lobster" + ) + self._test_runner.declare_input_file( + self._data_directory / "pizza_component_tests_no_schema.lobster" + ) + self._test_runner.declare_input_file( + self._data_directory / "pizza_unit_tests_no_schema.lobster" + ) + + conf_file = "pizza_policy_no_schema.yaml" + out_file = "report_pizza_yaml_no_schema.lobster" + self._test_runner.cmd_args.lobster_config = conf_file + self._test_runner.cmd_args.out = out_file + self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() asserter = Asserter(self, completed_process, self._test_runner) asserter.assertNoStdErrText() @@ -93,6 +173,35 @@ def test_codebeamer_links(self): self._test_runner.cmd_args.out = out_file self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutText( + f"{conf_file}: lobster warning: configuration file format '.conf' " + f"is deprecated, please migrate to '.yaml' format\n" + ) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_codebeamer_links_yaml_no_schema(self): + # lobster-trace: UseCases.Correct_Item_Data_in_Output_File + """ + This test checks that the report contains + the Codebeamer items present in the input file. + """ + self._test_runner.declare_input_file(self._data_directory / + "codebeamer_links_policy_no_schema.yaml") + self._test_runner.declare_input_file(self._data_directory / + "codebeamer_items_no_schema.lobster") + self._test_runner.declare_input_file(self._data_directory / + "codebeamer_funny_impl_no_schema.lobster") + + conf_file = "codebeamer_links_policy_no_schema.yaml" + out_file = "report_codebeamer_links_yaml_no_schema.lobster" + self._test_runner.cmd_args.lobster_config = conf_file + self._test_runner.cmd_args.out = out_file + self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() asserter = Asserter(self, completed_process, self._test_runner) asserter.assertNoStdErrText() diff --git a/tests_system/lobster_report/test_tracing_status.py b/tests_system/lobster_report/test_tracing_status.py index f618e72da..0ec32065d 100644 --- a/tests_system/lobster_report/test_tracing_status.py +++ b/tests_system/lobster_report/test_tracing_status.py @@ -11,7 +11,7 @@ def setUp(self): self._test_runner = self.create_test_runner() # Tests for the report generation with different statuses - # Status Ok + # Status Ok with "lobster_ok.conf" def test_status_ok(self): # lobster-trace: UseCases.Tracing_Policy_Output_File # lobster-trace: core_report_req.Status_Ok @@ -28,6 +28,33 @@ def test_status_ok(self): self._test_runner.cmd_args.out = out_file self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutText( + f"{conf_file}: lobster warning: configuration file format '.conf' " + f"is deprecated, please migrate to '.yaml' format\n" + ) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + # Status Ok with "lobster_ok_no_schema.yaml" (no kind) + def test_status_ok_yaml_no_schema(self): + # lobster-trace: UseCases.Tracing_Policy_Output_File + # lobster-trace: core_report_req.Status_Ok + self._test_runner.declare_input_file(self._data_directory / + "lobster_ok_no_schema.yaml") + self._test_runner.declare_input_file(self._data_directory / + "trlc_ok_no_schema.lobster") + self._test_runner.declare_input_file(self._data_directory / + "python_ok_no_schema.lobster") + + conf_file = "lobster_ok_no_schema.yaml" + out_file = "report_ok_yaml_no_schema.lobster" + self._test_runner.cmd_args.lobster_config = conf_file + self._test_runner.cmd_args.out = out_file + self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() asserter = Asserter(self, completed_process, self._test_runner) asserter.assertNoStdErrText() @@ -35,7 +62,7 @@ def test_status_ok(self): asserter.assertExitCode(0) asserter.assertOutputFiles() - # Status Missing + # Status Missing with "lobster_missing.conf" def test_status_missing(self): # lobster-trace: UseCases.Tracing_Policy_Output_File # lobster-trace: core_report_req.Status_Missing @@ -52,6 +79,33 @@ def test_status_missing(self): self._test_runner.cmd_args.out = out_file self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutText( + f"{conf_file}: lobster warning: configuration file format '.conf' " + f"is deprecated, please migrate to '.yaml' format\n" + ) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + # Status Missing with "lobster_missing_no_schema.yaml" + def test_status_missing_yaml_no_schema(self): + # lobster-trace: UseCases.Tracing_Policy_Output_File + # lobster-trace: core_report_req.Status_Missing + self._test_runner.declare_input_file(self._data_directory / + "lobster_missing_no_schema.yaml") + self._test_runner.declare_input_file(self._data_directory / + "trlc_missing_no_schema.lobster") + self._test_runner.declare_input_file(self._data_directory / + "python_missing_no_schema.lobster") + + conf_file = "lobster_missing_no_schema.yaml" + out_file = "report_missing_yaml_no_schema.lobster" + self._test_runner.cmd_args.lobster_config = conf_file + self._test_runner.cmd_args.out = out_file + self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() asserter = Asserter(self, completed_process, self._test_runner) asserter.assertNoStdErrText() @@ -59,7 +113,7 @@ def test_status_missing(self): asserter.assertExitCode(0) asserter.assertOutputFiles() - def test_status_missing_mixed(self): + def test_status_mixed(self): # lobster-trace: UseCases.Tracing_Policy_Output_File # lobster-trace: core_report_req.Status_Missing self._test_runner.declare_input_file(self._data_directory / @@ -75,6 +129,32 @@ def test_status_missing_mixed(self): self._test_runner.cmd_args.out = out_file self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutText( + f"{conf_file}: lobster warning: configuration file format '.conf' " + f"is deprecated, please migrate to '.yaml' format\n" + ) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_status_mixed_yaml_no_schema(self): + # lobster-trace: UseCases.Tracing_Policy_Output_File + # lobster-trace: core_report_req.Status_Missing + self._test_runner.declare_input_file(self._data_directory / + "lobster_mixed_no_schema.yaml") + self._test_runner.declare_input_file(self._data_directory / + "trlc_mixed_no_schema.lobster") + self._test_runner.declare_input_file(self._data_directory / + "python_mixed_no_schema.lobster") + + conf_file = "lobster_mixed_no_schema.yaml" + out_file = "report_mixed_yaml_no_schema.lobster" + self._test_runner.cmd_args.lobster_config = conf_file + self._test_runner.cmd_args.out = out_file + self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() asserter = Asserter(self, completed_process, self._test_runner) asserter.assertNoStdErrText() @@ -82,7 +162,7 @@ def test_status_missing_mixed(self): asserter.assertExitCode(0) asserter.assertOutputFiles() - # Status Justified + # Status Justified with "lobster_justified.conf" def test_status_justified(self): # lobster-trace: UseCases.Tracing_Policy_Output_File # lobster-trace: core_report_req.Status_Justified_Global @@ -99,6 +179,33 @@ def test_status_justified(self): self._test_runner.cmd_args.out = out_file self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutText( + f"{conf_file}: lobster warning: configuration file format '.conf' " + f"is deprecated, please migrate to '.yaml' format\n" + ) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + # Status Justified with "lobster_justified_no_schema.yaml" + def test_status_justified_yaml_no_schema(self): + # lobster-trace: UseCases.Tracing_Policy_Output_File + # lobster-trace: core_report_req.Status_Justified_Global + self._test_runner.declare_input_file(self._data_directory / + "lobster_justified_no_schema.yaml") + self._test_runner.declare_input_file(self._data_directory / + "trlc_justified_no_schema.lobster") + self._test_runner.declare_input_file(self._data_directory / + "python_justified_no_schema.lobster") + + conf_file = "lobster_justified_no_schema.yaml" + out_file = "report_justified_yaml_no_schema.lobster" + self._test_runner.cmd_args.lobster_config = conf_file + self._test_runner.cmd_args.out = out_file + self._test_runner.declare_output_file(self._data_directory / out_file) + completed_process = self._test_runner.run_tool_test() asserter = Asserter(self, completed_process, self._test_runner) asserter.assertNoStdErrText() diff --git a/tests_system/lobster_trlc/data/extraction_hierarchy_base_and_extended.out_no_schema.lobster b/tests_system/lobster_trlc/data/extraction_hierarchy_base_and_extended.out_no_schema.lobster new file mode 100644 index 000000000..9ac2d8210 --- /dev/null +++ b/tests_system/lobster_trlc/data/extraction_hierarchy_base_and_extended.out_no_schema.lobster @@ -0,0 +1,34 @@ +{ + "data": [ + { + "tag": "itm extraction_test.A", + "location": { + "kind": "file", + "file": "extraction_hierarchy.trlc", + "line": 3, + "column": 11 + }, + "name": "extraction_test.A", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm extraction_test.B", + "location": { + "kind": "file", + "file": "extraction_hierarchy.trlc", + "line": 7, + "column": 15 + }, + "name": "extraction_test.B", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster-trlc", + "version": 5 +} \ No newline at end of file diff --git a/tests_system/lobster_trlc/data/extraction_hierarchy_base_only.out_no_schema.lobster b/tests_system/lobster_trlc/data/extraction_hierarchy_base_only.out_no_schema.lobster new file mode 100644 index 000000000..42dff6a0a --- /dev/null +++ b/tests_system/lobster_trlc/data/extraction_hierarchy_base_only.out_no_schema.lobster @@ -0,0 +1,20 @@ +{ + "data": [ + { + "tag": "itm extraction_test.A", + "location": { + "kind": "file", + "file": "extraction_hierarchy.trlc", + "line": 3, + "column": 11 + }, + "name": "extraction_test.A", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster-trlc", + "version": 5 +} \ No newline at end of file diff --git a/tests_system/lobster_trlc/data/extraction_hierarchy_extended_only.out_no_schema.lobster b/tests_system/lobster_trlc/data/extraction_hierarchy_extended_only.out_no_schema.lobster new file mode 100644 index 000000000..84f234920 --- /dev/null +++ b/tests_system/lobster_trlc/data/extraction_hierarchy_extended_only.out_no_schema.lobster @@ -0,0 +1,20 @@ +{ + "data": [ + { + "tag": "itm extraction_test.B", + "location": { + "kind": "file", + "file": "extraction_hierarchy.trlc", + "line": 7, + "column": 15 + }, + "name": "extraction_test.B", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster-trlc", + "version": 5 +} \ No newline at end of file diff --git a/tests_system/lobster_trlc/data/input_files_list_no_schema.lobster b/tests_system/lobster_trlc/data/input_files_list_no_schema.lobster new file mode 100644 index 000000000..3a9d26d12 --- /dev/null +++ b/tests_system/lobster_trlc/data/input_files_list_no_schema.lobster @@ -0,0 +1,20 @@ +{ + "data": [ + { + "tag": "itm test_default.goodname", + "location": { + "kind": "file", + "file": "default_file.trlc", + "line": 3, + "column": 9 + }, + "name": "test_default.goodname", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster-trlc", + "version": 5 +} diff --git a/tests_system/lobster_trlc/data/input_from_files_and_inputs_no_schema.lobster b/tests_system/lobster_trlc/data/input_from_files_and_inputs_no_schema.lobster new file mode 100644 index 000000000..1a398e24e --- /dev/null +++ b/tests_system/lobster_trlc/data/input_from_files_and_inputs_no_schema.lobster @@ -0,0 +1,34 @@ +{ + "data": [ + { + "tag": "itm test_default.goodname", + "location": { + "kind": "file", + "file": "default_file.trlc", + "line": 3, + "column": 9 + }, + "name": "test_default.goodname", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm sweet_fruits.raspberry", + "location": { + "kind": "file", + "file": "fruits.trlc", + "line": 3, + "column": 7 + }, + "name": "sweet_fruits.raspberry", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster-trlc", + "version": 5 +} diff --git a/tests_system/lobster_trlc/data/input_from_files_no_schema.lobster b/tests_system/lobster_trlc/data/input_from_files_no_schema.lobster new file mode 100644 index 000000000..3a9d26d12 --- /dev/null +++ b/tests_system/lobster_trlc/data/input_from_files_no_schema.lobster @@ -0,0 +1,20 @@ +{ + "data": [ + { + "tag": "itm test_default.goodname", + "location": { + "kind": "file", + "file": "default_file.trlc", + "line": 3, + "column": 9 + }, + "name": "test_default.goodname", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster-trlc", + "version": 5 +} diff --git a/tests_system/lobster_trlc/data/input_from_working_directory_no_schema.lobster b/tests_system/lobster_trlc/data/input_from_working_directory_no_schema.lobster new file mode 100644 index 000000000..b06335526 --- /dev/null +++ b/tests_system/lobster_trlc/data/input_from_working_directory_no_schema.lobster @@ -0,0 +1,48 @@ +{ + "data": [ + { + "tag": "itm test_default.goodname", + "location": { + "kind": "file", + "file": "default_file.trlc", + "line": 3, + "column": 9 + }, + "name": "test_default.goodname", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm sweet_fruits.raspberry", + "location": { + "kind": "file", + "file": "fruits.trlc", + "line": 3, + "column": 7 + }, + "name": "sweet_fruits.raspberry", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm sweet_fruits.raisin", + "location": { + "kind": "file", + "file": "nested/fruits_nested.trlc", + "line": 3, + "column": 7 + }, + "name": "sweet_fruits.raisin", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster-trlc", + "version": 5 +} diff --git a/tests_system/lobster_trlc/data/output_correctness_test.out_no_schema.lobster b/tests_system/lobster_trlc/data/output_correctness_test.out_no_schema.lobster new file mode 100644 index 000000000..ee85a6e7b --- /dev/null +++ b/tests_system/lobster_trlc/data/output_correctness_test.out_no_schema.lobster @@ -0,0 +1,76 @@ +{ + "data": [ + { + "tag": "itm output_correctness_test.Instance0", + "location": { + "kind": "file", + "file": "output_correctness_test_a.trlc", + "line": 13, + "column": 9 + }, + "name": "output_correctness_test.Instance0", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm output_correctness_test.Instance1", + "location": { + "kind": "file", + "file": "output_correctness_test_a.trlc", + "line": 20, + "column": 9 + }, + "name": "output_correctness_test.Instance1", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm output_correctness_test.Instance2", + "location": { + "kind": "file", + "file": "output_correctness_test_a.trlc", + "line": 32, + "column": 9 + }, + "name": "output_correctness_test.Instance2", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm output_correctness_test.Instance3", + "location": { + "kind": "file", + "file": "output_correctness_test_a.trlc", + "line": 44, + "column": 9 + }, + "name": "output_correctness_test.Instance3", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm output_correctness_test.Instance4", + "location": { + "kind": "file", + "file": "output_correctness_test_b.trlc", + "line": 12, + "column": 9 + }, + "name": "output_correctness_test.Instance4", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster-trlc", + "version": 5 +} diff --git a/tests_system/lobster_trlc/data/reqs_tag_version_none.out_no_schema.lobster b/tests_system/lobster_trlc/data/reqs_tag_version_none.out_no_schema.lobster new file mode 100644 index 000000000..cf2b6710c --- /dev/null +++ b/tests_system/lobster_trlc/data/reqs_tag_version_none.out_no_schema.lobster @@ -0,0 +1,34 @@ +{ + "data": [ + { + "tag": "itm test_reqs.req_with_version", + "location": { + "kind": "file", + "file": "reqs.trlc", + "line": 3, + "column": 9 + }, + "name": "test_reqs.req_with_version", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm test_reqs.req_without_version", + "location": { + "kind": "file", + "file": "reqs.trlc", + "line": 8, + "column": 9 + }, + "name": "test_reqs.req_without_version", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster-trlc", + "version": 5 +} diff --git a/tests_system/lobster_trlc/data/reqs_tag_version_value.out_no_schema.lobster b/tests_system/lobster_trlc/data/reqs_tag_version_value.out_no_schema.lobster new file mode 100644 index 000000000..5f1c084fb --- /dev/null +++ b/tests_system/lobster_trlc/data/reqs_tag_version_value.out_no_schema.lobster @@ -0,0 +1,34 @@ +{ + "data": [ + { + "tag": "itm test_reqs.req_with_version@1234", + "location": { + "kind": "file", + "file": "reqs.trlc", + "line": 3, + "column": 9 + }, + "name": "test_reqs.req_with_version", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + }, + { + "tag": "itm test_reqs.req_without_version", + "location": { + "kind": "file", + "file": "reqs.trlc", + "line": 8, + "column": 9 + }, + "name": "test_reqs.req_without_version", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [] + } + ], + "generator": "lobster-trlc", + "version": 5 +} diff --git a/tests_system/lobster_trlc/data/to_string_rules.out_no_schema.lobster b/tests_system/lobster_trlc/data/to_string_rules.out_no_schema.lobster new file mode 100644 index 000000000..542dce12e --- /dev/null +++ b/tests_system/lobster_trlc/data/to_string_rules.out_no_schema.lobster @@ -0,0 +1,77 @@ +{ + "data": [ + { + "tag": "itm buildings.Greenwood_Ranch", + "location": { + "kind": "file", + "file": "to_string_test.trlc", + "line": 3, + "column": 10 + }, + "name": "buildings.Greenwood_Ranch", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req school FLOORS=3", + "req FACTOR=5, THICKNESS=3.1415!" + ] + }, + { + "tag": "itm buildings.Coconut_Palace", + "location": { + "kind": "file", + "file": "to_string_test.trlc", + "line": 9, + "column": 10 + }, + "name": "buildings.Coconut_Palace", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req palace FLOORS=5", + "req FACTOR=42, THICKNESS=8.283!" + ] + }, + { + "tag": "itm buildings.Space_Tower", + "location": { + "kind": "file", + "file": "to_string_test.trlc", + "line": 15, + "column": 10 + }, + "name": "buildings.Space_Tower", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req hiiiiiigh FLOORS=999999999" + ] + }, + { + "tag": "itm buildings.Dyson_Sphere", + "location": { + "kind": "file", + "file": "to_string_test.trlc", + "line": 20, + "column": 10 + }, + "name": "buildings.Dyson_Sphere", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "refs": [ + "req solar power plant FLOORS=just-too-many", + "req FACTOR=-1, THICKNESS=0.0!" + ] + } + ], + "generator": "lobster-trlc", + "version": 5 +} diff --git a/tests_system/lobster_trlc/data/zero_items_no_schema.lobster b/tests_system/lobster_trlc/data/zero_items_no_schema.lobster new file mode 100644 index 000000000..294e0e484 --- /dev/null +++ b/tests_system/lobster_trlc/data/zero_items_no_schema.lobster @@ -0,0 +1,5 @@ +{ + "data": [], + "generator": "lobster-trlc", + "version": 5 +} diff --git a/tests_system/lobster_trlc/lobster_system_test_case_base.py b/tests_system/lobster_trlc/lobster_system_test_case_base.py index 6e448b287..91c907cd0 100644 --- a/tests_system/lobster_trlc/lobster_system_test_case_base.py +++ b/tests_system/lobster_trlc/lobster_system_test_case_base.py @@ -11,6 +11,12 @@ class LobsterTrlcSystemTestCaseBase(SystemTestCaseBase): "description-fields": ["description"], } + NAMASTE_CONVERSION_RULE_NO_SCHEMA = { + "package": "test_default", + "record-type": "namaste", + "description-fields": ["description"], + } + BERRY_CONVERSION_RULE = { "package": "sweet_fruits", "record-type": "berry", @@ -18,6 +24,12 @@ class LobsterTrlcSystemTestCaseBase(SystemTestCaseBase): "description-fields": ["description"], } + BERRY_CONVERSION_RULE_NO_SCHEMA = { + "package": "sweet_fruits", + "record-type": "berry", + "description-fields": ["description"], + } + def __init__(self, methodName): super().__init__(methodName) self._data_directory = Path(__file__).parents[0] / "data" diff --git a/tests_system/lobster_trlc/test_conversion.py b/tests_system/lobster_trlc/test_conversion.py index 95d569a5a..b3bb418a9 100644 --- a/tests_system/lobster_trlc/test_conversion.py +++ b/tests_system/lobster_trlc/test_conversion.py @@ -72,6 +72,75 @@ def test_rule_propagation(self): test_runner.declare_input_file(self._data_directory / "extraction_hierarchy.rsl") + completed_process = test_runner.run_tool_test() + asserter = Asserter(self, completed_process, test_runner) + asserter.assertNoStdErrText() + lobster_schema = "lobster-req-trace" + lobster_version = 4 + asserter.assertStdOutText( + f"Lobster file version {lobster_version} " + f"containing 'schema' = '{lobster_schema}' is deprecated, " + f"please migrate to version 5\n" + f"lobster-trlc: wrote {setup.num_expected_items} " + f"items to {out_file}\n", + ) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_rule_propagation_no_schema(self): + """Test that rules are propagated to extended record types.""" + test_setups = [ + TestSetup( + name="base_and_extended", + num_expected_items=2, + record_type="base_type", + ), + TestSetup( + name="extended_only", + num_expected_items=1, + record_type="extended_type", + ), + ] + # create copies of the above setups, + # but with explicit values for 'applies_to_derived_types' + test_setups.extend([ + TestSetup( + name=setup.name, + num_expected_items=setup.num_expected_items, + record_type=setup.record_type, + applies_to_derived_types=True, + ) for setup in test_setups + ]) + # add a setup for the base type only + test_setups.append( + TestSetup( + name="base_only", + num_expected_items=1, + record_type="base_type", + applies_to_derived_types=False, + ) + ) + + for setup in test_setups: + with self.subTest(setup=setup.name): + # lobster-trace: UseCases.Incorrect_data_Extraction_from_TRLC + out_file = f"extraction_hierarchy_{setup.name}.out_no_schema.lobster" + test_runner = self.create_test_runner() + test_runner.cmd_args.out = out_file + test_runner.declare_output_file(self._data_directory / out_file) + rules = { + "package": "extraction_test", + "record-type": setup.record_type, + "description-fields": ["description"], + } + if setup.applies_to_derived_types is not None: + rules["applies-to-derived-types"] = setup.applies_to_derived_types + test_runner.config_file_data.conversion_rules = [rules] + test_runner.declare_input_file(self._data_directory / + "extraction_hierarchy.trlc") + test_runner.declare_input_file(self._data_directory / + "extraction_hierarchy.rsl") + completed_process = test_runner.run_tool_test() asserter = Asserter(self, completed_process, test_runner) asserter.assertNoStdErrText() @@ -116,6 +185,53 @@ def test_to_string_rules(self): test_runner.declare_input_file(self._data_directory / "to_string_test.trlc") test_runner.declare_input_file(self._data_directory / "to_string_test.rsl") + completed_process = test_runner.run_tool_test() + asserter = Asserter(self, completed_process, test_runner) + asserter.assertNoStdErrText() + lobster_schema = "lobster-req-trace" + lobster_version = 4 + asserter.assertStdOutText( + f"Lobster file version {lobster_version} " + f"containing 'schema' = '{lobster_schema}' is deprecated, " + f"please migrate to version 5\n" + f"lobster-trlc: wrote 4 items to {out_file}\n", + ) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_to_string_rules_no_schema(self): + """Test that to_string rules are applied correctly.""" + # lobster-trace: UseCases.Incorrect_data_Extraction_from_TRLC + test_runner = self.create_test_runner() + out_file = "to_string_rules.out_no_schema.lobster" + test_runner.cmd_args.out = out_file + test_runner.declare_output_file(self._data_directory / out_file) + test_runner.config_file_data.conversion_rules = [ + { + "package": "buildings", + "record-type": "Building", + "description-fields": ["summary"], + "tags": ["category", "thermal_insulation"], + }, + ] + test_runner.config_file_data.to_string_rules = [ + { + "package": "buildings", + "tuple-type": "Thermal_Insolation", + "to-string": ["FACTOR=$(thermal_factor), THICKNESS=$(thickness)!"], + }, + { + "package": "buildings", + "tuple-type": "Building_Category", + "to-string": [ + "$(name) FLOORS=$(floors)", + "$(name) FLOORS=just-too-many", + ], + }, + ] + test_runner.declare_input_file(self._data_directory / "to_string_test.trlc") + test_runner.declare_input_file(self._data_directory / "to_string_test.rsl") + completed_process = test_runner.run_tool_test() asserter = Asserter(self, completed_process, test_runner) asserter.assertNoStdErrText() @@ -156,6 +272,61 @@ def test_tag_version(self): ), ] + for setup in test_setups: + with self.subTest(setup=setup.name): + out_file = setup.out_file + test_runner = self.create_test_runner() + test_runner.cmd_args.out = out_file + test_runner.config_file_data.conversion_rules = setup.rules + test_runner.declare_output_file(self._data_directory / out_file) + test_runner.declare_input_file(self._data_directory / "reqs.rsl") + test_runner.declare_input_file(self._data_directory / "reqs.trlc") + + completed_process = test_runner.run_tool_test() + asserter = Asserter(self, completed_process, test_runner) + asserter.assertNoStdErrText() + lobster_schema = "lobster-req-trace" + lobster_version = 4 + asserter.assertStdOutText( + f"Lobster file version {lobster_version} " + f"containing 'schema' = '{lobster_schema}' is deprecated, " + f"please migrate to version 5\n" + f"lobster-trlc: wrote {setup.num_expected_items} " + f"items to {out_file}\n", + ) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_tag_version_no_schema(self): + base_rule = { + "package": "test_reqs", + "record-type": "featReq", + "description-fields": ["description"], + } + test_setups = [ + # lobster-trace: trlc_req.Tag_Version_From_Record_Field + TestSetup( + name="version_field_configured_return_value", + num_expected_items=2, + rules=[{**base_rule, "version-field": "version"}], + out_file="reqs_tag_version_value.out_no_schema.lobster", + ), + # lobster-trace: trlc_req.Tag_Version_None_If_Field_Missing + TestSetup( + name="version_field_not_configured_return_none", + num_expected_items=2, + rules=[base_rule], + out_file="reqs_tag_version_none.out_no_schema.lobster", + ), + # lobster-trace: trlc_req.Tag_Version_None_If_Not_Configured + TestSetup( + name="version_field_mis_configured_return_none", + num_expected_items=2, + rules=[{**base_rule, "version-field": "versino"}], + out_file="reqs_tag_version_none.out_no_schema.lobster", + ), + ] + for setup in test_setups: with self.subTest(setup=setup.name): out_file = setup.out_file diff --git a/tests_system/lobster_trlc/test_conversion_errors.py b/tests_system/lobster_trlc/test_conversion_errors.py index fc15f587b..27c39ca02 100644 --- a/tests_system/lobster_trlc/test_conversion_errors.py +++ b/tests_system/lobster_trlc/test_conversion_errors.py @@ -33,6 +33,31 @@ def test_field_does_not_exist(self): ) asserter.assertExitCode(1) + def test_field_does_not_exist_no_schema(self): + """Test that an error is raised when field does not exist in the record type.""" + # lobster-trace: UseCases.TRLC_Config_File_Key_Error + test_runner = self.create_test_runner() + OUT_FILE = "will-not-be-generated_no_schema.lobster" + test_runner.cmd_args.out = OUT_FILE + rules = { + "package": "extraction_test", + "record-type": "base_type", + "description-fields": ["does_not_exist_field"], + } + test_runner.config_file_data.conversion_rules = [rules] + test_runner.declare_input_file(self._data_directory / + "extraction_hierarchy.trlc") + test_runner.declare_input_file(self._data_directory / + "extraction_hierarchy.rsl") + + completed_process = test_runner.run_tool_test() + print(completed_process.stderr) + asserter = Asserter(self, completed_process, test_runner) + asserter.assertNoStdErrText() + asserter.assertStdOutText(f"lobster-trlc: wrote 2 items to " + f"{OUT_FILE}\n") + asserter.assertExitCode(0) + def test_to_string_missing(self): """Test that a missing to-string rule causes an error""" # lobster-trace: UseCases.TRLC_Config_File_Key_Error @@ -68,6 +93,40 @@ def test_to_string_missing(self): ) asserter.assertExitCode(1) + def test_to_string_missing_no_schema(self): + """Test that a missing to-string rule causes an error""" + # lobster-trace: UseCases.TRLC_Config_File_Key_Error + test_runner = self.create_test_runner() + test_runner.cmd_args.out = "will-not-be-generated_no_schema.lobster" + test_runner.config_file_data.conversion_rules = [ + { + "package": "buildings", + "record-type": "Building", + "description-fields": ["summary"], + "tags": ["category", "thermal_insulation"], + }, + ] + test_runner.config_file_data.to_string_rules = [ + { + "package": "buildings", + "tuple-type": "Thermal_Insolation", + "to-string": ["abc"], + }, + ] + test_runner.declare_input_file(self._data_directory / "to_string_test.trlc") + test_runner.declare_input_file(self._data_directory / "to_string_test.rsl") + + completed_process = test_runner.run_tool_test() + asserter = Asserter(self, completed_process, test_runner) + asserter.assertNoStdOutText() + asserter.assertStdErrText( + "lobster-trlc: error in 'to-string-rules' in config.yaml: No " + "'to-string' function defined for tuple 'Building_Category' with value " + "'{'floors': 3, 'name': 'school'}', used at to_string_test.trlc:5:16, " + "defined at to_string_test.rsl:3:7!\n" + ) + asserter.assertExitCode(1) + def test_tuple_member_does_not_exist(self): """Test that a to_string rule causes error if a tuple member does not exist.""" # lobster-trace: UseCases.TRLC_Config_File_Key_Error @@ -106,6 +165,43 @@ def test_tuple_member_does_not_exist(self): ) asserter.assertExitCode(1) + def test_tuple_member_does_not_exist_no_schema(self): + """Test that a to_string rule causes error if a tuple member does not exist.""" + # lobster-trace: UseCases.TRLC_Config_File_Key_Error + test_runner = self.create_test_runner() + test_runner.cmd_args.out = "will-not-be-generated.lobster" + test_runner.config_file_data.conversion_rules = [ + { + "package": "buildings", + "record-type": "Building", + "description-fields": ["summary"], + "tags": ["category", "thermal_insulation"], + }, + ] + test_runner.config_file_data.to_string_rules = [ + { + "package": "buildings", + "tuple-type": "Thermal_Insolation", + "to-string": ["$(does_not_exist)"], + }, + { + "package": "buildings", + "tuple-type": "Building_Category", + "to-string": ["abc"], + }, + ] + test_runner.declare_input_file(self._data_directory / "to_string_test.trlc") + test_runner.declare_input_file(self._data_directory / "to_string_test.rsl") + + completed_process = test_runner.run_tool_test() + asserter = Asserter(self, completed_process, test_runner) + asserter.assertNoStdOutText() + asserter.assertInStdErr( + "lobster-trlc: error in 'to-string-rules' in config.yaml: All 'to_string' " + "conversion functions failed for tuple 'Thermal_Insolation' with value" + ) + asserter.assertExitCode(1) + def test_too_many_conversion_rules(self): """Test that orphan conversion rules are detected.""" # lobster-trace: UseCases.TRLC_Config_File_non_existent_conversion_rules @@ -139,6 +235,37 @@ def test_too_many_conversion_rules(self): ) asserter.assertExitCode(1) + def test_too_many_conversion_rules_no_schema(self): + """Test that orphan conversion rules are detected.""" + # lobster-trace: UseCases.TRLC_Config_File_non_existent_conversion_rules + test_runner = self.create_test_runner() + test_runner.cmd_args.out = "will-not-be-generated_no_schema.lobster" + test_runner.config_file_data.conversion_rules = [ + { + "package": "buildings", + "record-type": "Building", + "description-fields": ["summary"], + "tags": ["category", "thermal_insulation"], + }, + { + "package": "buildings", + "record-type": "Does_Not_Exist", + "description-fields": ["something"], + }, + ] + test_runner.declare_input_file(self._data_directory / "to_string_test.trlc") + test_runner.declare_input_file(self._data_directory / "to_string_test.rsl") + + completed_process = test_runner.run_tool_test() + asserter = Asserter(self, completed_process, test_runner) + asserter.assertNoStdOutText() + asserter.assertInStdErr( + "lobster-trlc: Invalid conversion rule defined in config.yaml: The " + "following conversion rules do not match any record type in the TRLC " + "symbol table: buildings.Does_Not_Exist.", + ) + asserter.assertExitCode(1) + if __name__ == "__main__": unittest.main() diff --git a/tests_system/lobster_trlc/test_input_invalid_extensions.py b/tests_system/lobster_trlc/test_input_invalid_extensions.py index 1cd1a2377..a244343f2 100644 --- a/tests_system/lobster_trlc/test_input_invalid_extensions.py +++ b/tests_system/lobster_trlc/test_input_invalid_extensions.py @@ -8,13 +8,31 @@ class TrlcInvalidExtensionsTest(LobsterTrlcSystemTestCaseBase): def setUp(self): super().setUp() self._test_runner = self.create_test_runner() + + def test_invalid_extensions_inputs_files_list(self): + # lobster-trace: trlc_req.Invalid_Inputs_List_Of_Files_Extensions + # lobster-trace: UseCases.TRLC_Config_File_Syntax_Error self._test_runner.config_file_data.conversion_rules = [ self.NAMASTE_CONVERSION_RULE, ] + self._test_runner.declare_input_file(self._data_directory / + "rsl_invalid_extension.slr") + self._test_runner.declare_input_file(self._data_directory / + "trlc_invalid_extension.clrt") + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertStdErrText( + "lobster-trlc: File rsl_invalid_extension.slr does not have a valid " + "extension. Expected one of .rsl, .trlc.\n" + ) + asserter.assertExitCode(1) - def test_invalid_extensions_inputs_files_list(self): + def test_invalid_extensions_inputs_files_list_no_schema(self): # lobster-trace: trlc_req.Invalid_Inputs_List_Of_Files_Extensions # lobster-trace: UseCases.TRLC_Config_File_Syntax_Error + self._test_runner.config_file_data.conversion_rules = [ + self.NAMASTE_CONVERSION_RULE_NO_SCHEMA, + ] self._test_runner.declare_input_file(self._data_directory / "rsl_invalid_extension.slr") self._test_runner.declare_input_file(self._data_directory / @@ -30,6 +48,26 @@ def test_invalid_extensions_inputs_files_list(self): def test_invalid_extensions_input_from_file(self): # lobster-trace: trlc_req.Invalid_Inputs_From_File_Extensions # lobster-trace: UseCases.TRLC_Config_File_Syntax_Error + self._test_runner.config_file_data.conversion_rules = [ + self.NAMASTE_CONVERSION_RULE, + ] + self._test_runner.declare_inputs_from_file(self._data_directory / + "invalid_ext_inputs_from_file.txt", + self._data_directory) + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertStdErrText( + "lobster-trlc: File rsl_invalid_extension.slr does not have a valid " + "extension. Expected one of .rsl, .trlc.\n" + ) + asserter.assertExitCode(1) + + def test_invalid_extensions_input_from_file_no_schema(self): + # lobster-trace: trlc_req.Invalid_Inputs_From_File_Extensions + # lobster-trace: UseCases.TRLC_Config_File_Syntax_Error + self._test_runner.config_file_data.conversion_rules = [ + self.NAMASTE_CONVERSION_RULE_NO_SCHEMA, + ] self._test_runner.declare_inputs_from_file(self._data_directory / "invalid_ext_inputs_from_file.txt", self._data_directory) diff --git a/tests_system/lobster_trlc/test_input_list_of_files.py b/tests_system/lobster_trlc/test_input_list_of_files.py index aa6ad1c99..bd4898e05 100644 --- a/tests_system/lobster_trlc/test_input_list_of_files.py +++ b/tests_system/lobster_trlc/test_input_list_of_files.py @@ -23,6 +23,29 @@ def test_input_files_list(self): completed_process = self._test_runner.run_tool_test() asserter = Asserter(self, completed_process, self._test_runner) asserter.assertNoStdErrText() + lobster_schema = "lobster-req-trace" + lobster_version = 4 + asserter.assertStdOutText( + f"Lobster file version {lobster_version} " + f"containing 'schema' = '{lobster_schema}' is deprecated, " + f"please migrate to version 5\n" + f"lobster-trlc: wrote 1 items to " + f"{OUT_FILE}\n") + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_input_files_list_no_schema(self): + # lobster-trace: trlc_req.Input_List_Of_Files + # lobster-trace: UseCases.Incorrect_data_Extraction_from_TRLC + self._test_runner.config_file_data.conversion_rules = [ + self.NAMASTE_CONVERSION_RULE_NO_SCHEMA, + ] + OUT_FILE = "input_files_list_no_schema.lobster" + self._test_runner.cmd_args.out = OUT_FILE + self._test_runner.declare_output_file(self._data_directory / OUT_FILE) + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() asserter.assertStdOutText(f"lobster-trlc: wrote 1 items to " f"{OUT_FILE}\n") asserter.assertExitCode(0) @@ -75,6 +98,39 @@ def test_input_files_list(self): completed_process = test_runner.run_tool_test() asserter = Asserter(self, completed_process, test_runner) asserter.assertNoStdErrText() + lobster_schema = "lobster-req-trace" + lobster_version = 4 + asserter.assertStdOutText( + f"Lobster file version {lobster_version} " + f"containing 'schema' = '{lobster_schema}' is deprecated, " + f"please migrate to version 5\n" + f"lobster-trlc: wrote 1 items to " + f"{OUT_FILE}\n") + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_input_files_list_no_schema(self): + # lobster-trace: UseCases.Incorrect_data_Extraction_from_TRLC + """Test that input files can be specified as command line arguments""" + test_runner = self.create_test_runner() + + test_runner.cmd_args.dir_or_files = [ + "default_file.rsl", + "default_file.trlc", + ] + + for file in test_runner.cmd_args.dir_or_files: + test_runner.copy_file_to_working_directory(self._data_directory / file) + + test_runner.config_file_data.conversion_rules = [ + self.NAMASTE_CONVERSION_RULE_NO_SCHEMA, + ] + OUT_FILE = "input_files_list_no_schema.lobster" + test_runner.cmd_args.out = OUT_FILE + test_runner.declare_output_file(self._data_directory / OUT_FILE) + completed_process = test_runner.run_tool_test() + asserter = Asserter(self, completed_process, test_runner) + asserter.assertNoStdErrText() asserter.assertStdOutText(f"lobster-trlc: wrote 1 items to " f"{OUT_FILE}\n") asserter.assertExitCode(0) diff --git a/tests_system/lobster_trlc/test_inputs_and_inputs_from_file.py b/tests_system/lobster_trlc/test_inputs_and_inputs_from_file.py index 220af740f..6c0874751 100644 --- a/tests_system/lobster_trlc/test_inputs_and_inputs_from_file.py +++ b/tests_system/lobster_trlc/test_inputs_and_inputs_from_file.py @@ -17,18 +17,55 @@ def _setup_basic_test_runner(self): self._test_runner = self.create_test_runner() self._test_runner.declare_input_file(self._data_directory / "default_file.rsl") self._test_runner.declare_input_file(self._data_directory / "default_file.trlc") + + def test_input_from_files_and_inputs_list(self): + """ + Test that inputs from files and inputs list can be processed together. + """ + # lobster-trace: trlc_req.Input_list_Of_File_And_Inputs_From_File + # lobster-trace: UseCases.Incorrect_data_Extraction_from_TRLC self._test_runner.config_file_data.conversion_rules = [ self.BERRY_CONVERSION_RULE, self.NAMASTE_CONVERSION_RULE, ] + OUT_FILE = "input_from_files_and_inputs.lobster" + for extra_file in (False, True): + with self.subTest(f"{extra_file=}"): + if extra_file: + self._test_runner.copy_files_in_working_directory( + [self._data_directory / "fruits.trlc"] + ) + self._test_runner.cmd_args.out = OUT_FILE + self._test_runner.declare_output_file(self._data_directory / OUT_FILE) + self._test_runner.declare_inputs_from_file( + self._data_directory / "input_from_files_and_inputs.txt", + self._data_directory + ) + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + lobster_schema = "lobster-req-trace" + lobster_version = 4 + asserter.assertStdOutText( + f"Lobster file version {lobster_version} " + f"containing 'schema' = '{lobster_schema}' is deprecated, " + f"please migrate to version 5\n" + f"lobster-trlc: wrote 2 items to " + f"{OUT_FILE}\n") + asserter.assertExitCode(0) + asserter.assertOutputFiles() - def test_input_from_files_and_inputs_list(self): + def test_input_from_files_and_inputs_list_no_schema(self): """ Test that inputs from files and inputs list can be processed together. """ # lobster-trace: trlc_req.Input_list_Of_File_And_Inputs_From_File # lobster-trace: UseCases.Incorrect_data_Extraction_from_TRLC - OUT_FILE = "input_from_files_and_inputs.lobster" + self._test_runner.config_file_data.conversion_rules = [ + self.BERRY_CONVERSION_RULE_NO_SCHEMA, + self.NAMASTE_CONVERSION_RULE_NO_SCHEMA, + ] + OUT_FILE = "input_from_files_and_inputs_no_schema.lobster" for extra_file in (False, True): with self.subTest(f"{extra_file=}"): if extra_file: @@ -54,6 +91,10 @@ def test_duplicate_contents_input_from_files_and_inputs_list(self): Test that duplicates in inputs from files and inputs list cause an error """ # lobster-trace: trlc_req.Duplicate_Input_list_Of_File_And_Inputs_From_File + self._test_runner.config_file_data.conversion_rules = [ + self.BERRY_CONVERSION_RULE, + self.NAMASTE_CONVERSION_RULE, + ] self._test_runner.declare_inputs_from_file( self._data_directory / "input_from_files_and_inputs_duplicate_contents.txt", self._data_directory) diff --git a/tests_system/lobster_trlc/test_inputs_from_directory.py b/tests_system/lobster_trlc/test_inputs_from_directory.py index 5546aeed6..d6cccbd39 100644 --- a/tests_system/lobster_trlc/test_inputs_from_directory.py +++ b/tests_system/lobster_trlc/test_inputs_from_directory.py @@ -10,17 +10,56 @@ class InputFromDirectory(LobsterTrlcSystemTestCaseBase): def setUp(self): super().setUp() self._test_runner = self.create_test_runner() + + def test_input_from_directory(self): + """Test that a directory is processed""" + # lobster-trace: UseCases.Incorrect_data_Extraction_from_TRLC + + # TODO: the test folder structure is not recursive, but it should be self._test_runner.config_file_data.conversion_rules = [ self.BERRY_CONVERSION_RULE, self.NAMASTE_CONVERSION_RULE, ] + OUT_FILE = "input_from_working_directory.lobster" + self._test_runner.cmd_args.out = OUT_FILE + self._test_runner.declare_output_file(self._data_directory / OUT_FILE) + file_paths = [ + self._data_directory / "fruits.trlc", + self._data_directory / "fruits.rsl", + self._data_directory / "default_file.trlc", + self._data_directory / "default_file.rsl" + ] + self._test_runner.copy_files_in_working_directory(file_paths) + os.makedirs(self._test_runner.working_dir / "nested", exist_ok=True) + shutil.copy( + self._data_directory / "fruits_nested.trlc", + self._test_runner.working_dir / "nested" / "fruits_nested.trlc" + ) + self._test_runner.config_file_data.inputs = ["."] + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + lobster_schema = "lobster-req-trace" + lobster_version = 4 + asserter.assertStdOutText( + f"Lobster file version {lobster_version} " + f"containing 'schema' = '{lobster_schema}' is deprecated, " + f"please migrate to version 5\n" + f"lobster-trlc: wrote 3 items to " + f"{OUT_FILE}\n") + asserter.assertExitCode(0) + asserter.assertOutputFiles() - def test_input_from_directory(self): + def test_input_from_directory_no_schema(self): """Test that a directory is processed""" # lobster-trace: UseCases.Incorrect_data_Extraction_from_TRLC # TODO: the test folder structure is not recursive, but it should be - OUT_FILE = "input_from_working_directory.lobster" + self._test_runner.config_file_data.conversion_rules = [ + self.BERRY_CONVERSION_RULE_NO_SCHEMA, + self.NAMASTE_CONVERSION_RULE_NO_SCHEMA, + ] + OUT_FILE = "input_from_working_directory_no_schema.lobster" self._test_runner.cmd_args.out = OUT_FILE self._test_runner.declare_output_file(self._data_directory / OUT_FILE) file_paths = [ diff --git a/tests_system/lobster_trlc/test_inputs_from_file.py b/tests_system/lobster_trlc/test_inputs_from_file.py index f87edc218..c0f7c85ac 100644 --- a/tests_system/lobster_trlc/test_inputs_from_file.py +++ b/tests_system/lobster_trlc/test_inputs_from_file.py @@ -8,14 +8,40 @@ class InputFromFilesTest(LobsterTrlcSystemTestCaseBase): def setUp(self): super().setUp() self._test_runner = self.create_test_runner() + + def test_input_from_files(self): + # lobster-trace: trlc_req.Inputs_From_File + # lobster-trace: UseCases.Incorrect_data_Extraction_from_TRLC self._test_runner.config_file_data.conversion_rules = [ self.NAMASTE_CONVERSION_RULE, ] + OUT_FILE = "input_from_files.lobster" + self._test_runner.cmd_args.out = OUT_FILE + self._test_runner.declare_output_file(self._data_directory / OUT_FILE) + self._test_runner.declare_inputs_from_file(self._data_directory / + "valid_ext_inputs_from_file.txt", + self._data_directory) + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() + lobster_schema = "lobster-req-trace" + lobster_version = 4 + asserter.assertStdOutText( + f"Lobster file version {lobster_version} " + f"containing 'schema' = '{lobster_schema}' is deprecated, " + f"please migrate to version 5\n" + f"lobster-trlc: wrote 1 items to " + f"{OUT_FILE}\n") + asserter.assertExitCode(0) + asserter.assertOutputFiles() - def test_input_from_files(self): + def test_input_from_files_no_schema(self): # lobster-trace: trlc_req.Inputs_From_File # lobster-trace: UseCases.Incorrect_data_Extraction_from_TRLC - OUT_FILE = "input_from_files.lobster" + self._test_runner.config_file_data.conversion_rules = [ + self.NAMASTE_CONVERSION_RULE_NO_SCHEMA, + ] + OUT_FILE = "input_from_files_no_schema.lobster" self._test_runner.cmd_args.out = OUT_FILE self._test_runner.declare_output_file(self._data_directory / OUT_FILE) self._test_runner.declare_inputs_from_file(self._data_directory / @@ -32,6 +58,34 @@ def test_input_from_files(self): def test_input_from_files_duplicate_contents(self): """Test that duplicated TRLC record types/objects cause an error""" # lobster-trace: trlc_req.Duplicate_Inputs_From_File + self._test_runner.config_file_data.conversion_rules = [ + self.NAMASTE_CONVERSION_RULE, + ] + self._test_runner.declare_inputs_from_file( + self._data_directory / "input_from_file_duplicate_data.txt", + self._data_directory) + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertStdErrText( + "lobster-trlc: TRLC processing failed: aborting due to TRLC error\n" + ) + asserter.assertStdOutText('package test_default\n' + ' ^^^^^^^^^^^^ default_file_copy.rsl:1: ' + 'error: duplicate definition, previous definition at' + ' default_file.rsl:1\n' + 'namaste goodname {\n' + ' ^^^^^^^^ default_file_copy.trlc:3: ' + 'error: duplicate definition, previous definition at' + ' default_file.trlc:3\n' + ) + asserter.assertExitCode(1) + + def test_input_from_files_duplicate_contents_no_schema(self): + """Test that duplicated TRLC record types/objects cause an error""" + # lobster-trace: trlc_req.Duplicate_Inputs_From_File + self._test_runner.config_file_data.conversion_rules = [ + self.NAMASTE_CONVERSION_RULE_NO_SCHEMA, + ] self._test_runner.declare_inputs_from_file( self._data_directory / "input_from_file_duplicate_data.txt", self._data_directory) diff --git a/tests_system/lobster_trlc/test_inputs_zero.py b/tests_system/lobster_trlc/test_inputs_zero.py index ac23c3013..77465e08d 100644 --- a/tests_system/lobster_trlc/test_inputs_zero.py +++ b/tests_system/lobster_trlc/test_inputs_zero.py @@ -26,6 +26,31 @@ def test_rsl_input_only(self): completed_process = self._test_runner.run_tool_test() asserter = Asserter(self, completed_process, self._test_runner) asserter.assertNoStdErrText() + lobster_schema = "lobster-req-trace" + lobster_version = 4 + asserter.assertStdOutText( + f"Lobster file version {lobster_version} " + f"containing 'schema' = '{lobster_schema}' is deprecated, " + f"please migrate to version 5\n" + f"lobster-trlc: wrote 0 items to " + f"{OUT_FILE}\n") + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_rsl_input_only_no_schema(self): + """Test that output is empty if no *.trlc inputs are provided, only *.rsl.""" + # lobster-trace: UseCases.Default_Path_Warning_Test + self._test_runner.config_file_data.conversion_rules = [ + self.BERRY_CONVERSION_RULE_NO_SCHEMA, + ] + OUT_FILE = "zero_items_no_schema.lobster" + self._test_runner.cmd_args.out = OUT_FILE + self._test_runner.declare_output_file(self._data_directory / OUT_FILE) + self._test_runner.declare_input_file(self._data_directory / + "fruits.rsl") + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() asserter.assertStdOutText(f"lobster-trlc: wrote 0 items to " f"{OUT_FILE}\n") asserter.assertExitCode(0) @@ -48,8 +73,14 @@ def test_no_inputs_at_all(self): completed_process = self._test_runner.run_tool_test() asserter = Asserter(self, completed_process, self._test_runner) asserter.assertNoStdErrText() - asserter.assertStdOutText(f"lobster-trlc: wrote 0 items to " - f"{OUT_FILE}\n") + lobster_schema = "lobster-req-trace" + lobster_version = 4 + asserter.assertStdOutText( + f"Lobster file version {lobster_version} " + f"containing 'schema' = '{lobster_schema}' is deprecated, " + f"please migrate to version 5\n" + f"lobster-trlc: wrote 0 items to " + f"{OUT_FILE}\n") asserter.assertExitCode(0) def test_orphan_conversion_rules(self): @@ -78,6 +109,32 @@ def test_orphan_conversion_rules(self): asserter.assertNoStdOutText() asserter.assertExitCode(1) + def test_orphan_conversion_rules_no_schema(self): + """ + Test that when conversion rules are not provided + then the tool shall raise an error + """ + # lobster-trace: trlc_req.No_Inputs_At_All + # lobster-trace: UseCases.TRLC_Config_File_Key_Error + self._test_runner.config_file_data.conversion_rules = [ + self.BERRY_CONVERSION_RULE_NO_SCHEMA, + self.NAMASTE_CONVERSION_RULE_NO_SCHEMA, + ] + OUT_FILE = "will-not-be-generated_no_schema.lobster" + self._test_runner.cmd_args.out = OUT_FILE + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertStdErrText( + "lobster-trlc: Invalid conversion rule defined in config.yaml: The " + "following conversion rules do not match any record type in the TRLC " + "symbol table: sweet_fruits.berry, test_default.namaste. " + "The TRLC symbol table contains no record types at all. " + "The following conversion rules were successfully mapped to TRLC types: " + "none.\n" + ) + asserter.assertNoStdOutText() + asserter.assertExitCode(1) + if __name__ == "__main__": unittest.main() diff --git a/tests_system/lobster_trlc/test_output_correctness.py b/tests_system/lobster_trlc/test_output_correctness.py index f65bce393..9135dc942 100644 --- a/tests_system/lobster_trlc/test_output_correctness.py +++ b/tests_system/lobster_trlc/test_output_correctness.py @@ -61,9 +61,70 @@ def test_output_correctness(self): completed_process = self._test_runner.run_tool_test() asserter = Asserter(self, completed_process, self._test_runner) asserter.assertNoStdErrText() + lobster_schema = "lobster-req-trace" + lobster_version = 4 + asserter.assertStdOutText( + f"Lobster file version {lobster_version} " + f"containing 'schema' = '{lobster_schema}' is deprecated, " + f"please migrate to version 5\n" + f"lobster-trlc: wrote 5 items to " + f"output_correctness_test.out.lobster\n", + ) + asserter.assertExitCode(0) + asserter.assertOutputFiles() + + def test_output_correctness_no_schema(self): + """Test that output is correlated to input. + + This tests uses data where each value is used only once in the whole input + set, so we can verify that each output item is populated with data only + based on one single input item. + """ + # lobster-trace: UseCases.Incorrect_data_Extraction_from_TRLC + self._test_runner.cmd_args.out = "output_correctness_test.out_no_schema.lobster" + self._test_runner.declare_output_file( + self._data_directory / self._test_runner.cmd_args.out) + + config = self._test_runner.config_file_data + + config.inputs_from_file = "output_correctness_test_inputs.txt" + for file in ( + "output_correctness_test.rsl", + config.inputs_from_file, + ): + self._test_runner.copy_file_to_working_directory( + self._data_directory / file, + ) + + for file in ( + "output_correctness_test_a.trlc", + "output_correctness_test_b.trlc", + ): + self._test_runner.declare_input_file(self._data_directory / file) + + config.conversion_rules = [ + { + "package": "output_correctness_test", + "record-type": "TheType", + "description-fields": [ + "string", + "integer", + "decimal", + "boolean", + "strings", + "decimals", + "booleans", + "integers", + "references", + ], + } + ] + completed_process = self._test_runner.run_tool_test() + asserter = Asserter(self, completed_process, self._test_runner) + asserter.assertNoStdErrText() asserter.assertStdOutText( "lobster-trlc: wrote 5 items to " - "output_correctness_test.out.lobster\n", + "output_correctness_test.out_no_schema.lobster\n", ) asserter.assertExitCode(0) asserter.assertOutputFiles() diff --git a/tests_unit/lobster_codebeamer/test_codebeamer.py b/tests_unit/lobster_codebeamer/test_codebeamer.py index a242bb9ef..fe47ce45d 100644 --- a/tests_unit/lobster_codebeamer/test_codebeamer.py +++ b/tests_unit/lobster_codebeamer/test_codebeamer.py @@ -217,6 +217,7 @@ def test_codebeamer_base(self): } ) self.assertEqual(config.base, "https://example.com/api/v3") + self.assertEqual(config.schema, "Requirement") if __name__ == '__main__': unittest.main() diff --git a/tests_unit/lobster_codebeamer/test_codebeamer_no_schema.py b/tests_unit/lobster_codebeamer/test_codebeamer_no_schema.py new file mode 100644 index 000000000..1e029932b --- /dev/null +++ b/tests_unit/lobster_codebeamer/test_codebeamer_no_schema.py @@ -0,0 +1,214 @@ +import unittest +from unittest.mock import Mock, patch + +from lobster.tools.codebeamer.codebeamer import ( + MismatchException, + get_query, get_single_item, + get_many_items, parse_config_data, to_lobster, + import_tagged, +) + +from lobster.tools.codebeamer.config import AuthenticationConfig, Config + +LIST_OF_COMPARED_ATTRIBUTES = [ + 'name', + 'just_down', + 'just_up', + 'just_global' +] + + +class QueryCodebeamerNoSchemaTest(unittest.TestCase): + def setUp(self): + self._mock_cb_config = Config( + num_request_retry=5, + retry_error_codes=[], + references=None, + import_tagged=None, + import_query=None, + verify_ssl=None, + page_size=10, + schema="Item", + timeout=123, + out=None, + cb_auth_conf=AuthenticationConfig( + token=None, + user=None, + password=None, + root="http://some.codebeamer.server", + ) + ) + + def _assertListEqualByAttributes(self, list1, list2): + self.assertEqual(len(list1), len(list2), "Lists length are not the same") + for obj1, obj2 in zip(list1, list2): + for attr in LIST_OF_COMPARED_ATTRIBUTES: + self.assertEqual(getattr(obj1, attr), getattr(obj2, attr), + f"{obj1} is not like {obj2} in {attr}") + + @patch('lobster.tools.codebeamer.codebeamer.query_cb_single') + def test_get_query_with_ID(self, mock_query_cb_single): + mock_query = 171619121 + item_data = [ + { + "item": { + "id": 34886222, + "name" : "mock item", + "version": 8, + "tracker": { + "id": 34158092 + }, + "categories": [{"name": "Item"}], + } + } + ] + mock_query_cb_single.return_value = { + "page": 1, + "pageSize": 100, + "total": 1, + "items": item_data + } + + result = get_query(self._mock_cb_config, mock_query) + self.assertEqual(len(result), 1) + + self.assertEqual(result[0].name, item_data[0]["item"]["name"]) + self.assertEqual(result[0].tag.tag, str(item_data[0]["item"]["id"])) + self.assertEqual(result[0].location.item, item_data[0]["item"]["id"]) + self.assertEqual(result[0].location.tracker, + item_data[0]["item"]["tracker"]["id"]) + self.assertEqual(result[0].location.version, item_data[0]["item"]["version"]) + + @patch('lobster.tools.codebeamer.codebeamer.query_cb_single') + def test_get_query_with_query(self, mock_query_cb_single): + mock_query = ("TeamID IN (10833708) AND workItemStatus IN ('InProgress') " + "AND summary LIKE 'Vulnerable Road User'") + item_data = [ + { + "id": 34886222, + "name" : "mock item", + "version": 8, + "tracker": { + "id": 34158092 + }, + "categories": [{"name": "Item"}], + } + ] + mock_query_cb_single.return_value = { + "page": 1, + "pageSize": 100, + "total": 1, + "items": item_data + } + + result = get_query(self._mock_cb_config, mock_query) + self.assertEqual(len(result), 1) + + self.assertEqual(result[0].name, item_data[0]["name"]) + self.assertEqual(result[0].tag.tag, str(item_data[0]["id"])) + self.assertEqual(result[0].location.item, item_data[0]["id"]) + self.assertEqual(result[0].location.tracker, item_data[0]["tracker"]["id"]) + self.assertEqual(result[0].location.version, item_data[0]["version"]) + + @patch('lobster.tools.codebeamer.codebeamer.query_cb_single') + def test_get_query_with_invalid_data(self, mock_query_cb_single): + query_id = 789 + mock_query_cb_single.return_value = { + "page": 1, + "pageSize": 100, + "total": 1, + "items": [] + } + with self.assertRaises(MismatchException): + get_query(self._mock_cb_config, query_id) + + @patch('lobster.tools.codebeamer.codebeamer.query_cb_single') + def test_get_single_item(self, mock_query_cb_single): + item_id = 11693324 + mock_response = Mock() + mock_response.return_value = { + 'page': 1, + 'pageSize': 999, + 'total': 1, + 'items': [{'item': {'id': item_id, 'name': 'test name'}}] + } + + mock_query_cb_single.return_value = mock_response + + query_result = get_single_item(self._mock_cb_config, item_id) + self.assertEqual(query_result, mock_response) + + def test_get_single_item_invalid_id(self): + for item_id in (None, 0, -1, "house", 123.456, "456"): + with self.subTest(item_id=item_id): + with self.assertRaises(ValueError): + get_single_item(self._mock_cb_config, item_id) + + @patch('lobster.tools.codebeamer.codebeamer.query_cb_single') + def test_get_many_items(self, mock_query_cb_single): + item_ids = {24406947, 21747817} + response_items = [ + {'id': 24406947, 'name': 'Test name 1'}, + {'id': 21747817, 'name': 'Test name 2'} + ] + mock_response = { + 'page': 1, + 'pageSize': 123, + 'total': len(response_items), + 'items': response_items + } + + mock_query_cb_single.return_value = mock_response + + query_result = get_many_items(self._mock_cb_config, item_ids) + self.assertEqual(query_result, response_items) + + @patch('lobster.tools.codebeamer.codebeamer.query_cb_single') + def test_import_tagged(self, mock_query_cb_single): + item_ids = (24406947, 21747817) + response_items = [ + { + 'id': item_ids[0], + 'name': 'Test name 1', + 'categories': [{'name': 'Folder'}], + 'version': 7, + 'status': {'name': 'status'}, + 'tracker': {'id': 123} + }, + { + 'id': item_ids[1], + 'name': 'Test name 2', + 'categories': [{'name': 'Folder'}], + 'version': 10, + 'status': {'name': 'status'}, + 'tracker': {'id': 124} + } + ] + mock_query_cb_single.return_value = { + 'page': 1, + 'pageSize': 100, + 'total': len(response_items), + 'items': response_items + } + + expected_result = [to_lobster(self._mock_cb_config, items) + for items in response_items] + + import_tagged_result = import_tagged(self._mock_cb_config, set(item_ids)) + + self._assertListEqualByAttributes(import_tagged_result, expected_result) + + +class ParseYamlNoSchemaTests(unittest.TestCase): + def test_codebeamer_base(self): + config = parse_config_data( + { + 'root': 'https://example.com', + 'import_query': 1231323, + } + ) + self.assertEqual(config.base, "https://example.com/api/v3") + self.assertEqual(config.schema, "Item") + +if __name__ == '__main__': + unittest.main() diff --git a/tests_unit/lobster_codebeamer/test_codebeamer_schema.py b/tests_unit/lobster_codebeamer/test_codebeamer_schema.py index 0a628f3aa..2ef75d12d 100644 --- a/tests_unit/lobster_codebeamer/test_codebeamer_schema.py +++ b/tests_unit/lobster_codebeamer/test_codebeamer_schema.py @@ -56,6 +56,16 @@ def test_missing_config_field(self): str(context.exception), ) + def test_config_no_schema(self): + config = parse_config_data( + { + 'root': 'https://example.com', + "import_query": 8805855, + } + ) + self.assertIsNotNone(config) + self.assertEqual(config.schema, "Item") + def test_unsupported_config_keys(self): with self.assertRaises(KeyError) as context: parse_config_data( diff --git a/tests_unit/lobster_cpp/BUILD.bazel b/tests_unit/lobster_cpp/BUILD.bazel index f696bda1a..38172eb71 100644 --- a/tests_unit/lobster_cpp/BUILD.bazel +++ b/tests_unit/lobster_cpp/BUILD.bazel @@ -4,8 +4,8 @@ load("@rules_python//python:defs.bzl", "py_test") # gazelle:exclude __init__.py py_test( - name = "test_implementation_builder", - srcs = ["test_implementation_builder.py"], + name = "test_item_builder", + srcs = ["test_item_builder.py"], deps = [ "//lobster/common", "//lobster/tools/cpp", diff --git a/tests_unit/lobster_cpp/test_implementation_builder.py b/tests_unit/lobster_cpp/test_implementation_builder.py deleted file mode 100644 index 990d328a1..000000000 --- a/tests_unit/lobster_cpp/test_implementation_builder.py +++ /dev/null @@ -1,119 +0,0 @@ -from os import getcwd -from os.path import abspath, join -import re -from unittest import TestCase -from lobster.common.location import File_Reference -from lobster.tools.cpp.implementation_builder import ImplementationBuilder - - -class ImplementationBuilderTest(TestCase): - @staticmethod - def _get_os_independent_abspath_start(): - """Returns an arbitrary path which is guaranteed to be absolute. - This way we can construct absolute paths in a platform-independent way. - Note that otherwise an absolute path on Linux would start with a slash ("/"), - while on Windows it would start with a drive letter (e.g., "C:\"). - - The simplest solution is to use the current working directory, - which always exists on all platforms and is always absolute. - """ - return getcwd() - - def test_get_location_from_abs_path(self): - impl_builder = ImplementationBuilder() - path = join(self._get_os_independent_abspath_start(), - "path", "to", "the", "baking soda.NaHCO3") - result = impl_builder._get_location(path, 420) - self.assertEqual(result.filename, path) - self.assertEqual(result.line, 420) - self.assertIsNone(result.column) - - def test_get_location_from_rel_path(self): - impl_builder = ImplementationBuilder() - result = impl_builder._get_location(join(".", "water.H2O"), 1) - self.assertEqual(result.filename, abspath("water.H2O")) - self.assertEqual(result.line, 1) - self.assertIsNone(result.column) - - def test_get_tag(self): - impl_builder = ImplementationBuilder() - for duplicate_file_counter, parent_folder in enumerate( - ("cake", "pie"), - start=1, - ): - FILE = "ingredients.txt" - path = join(parent_folder, FILE) - function_names = ["Sodium Chloride (NaCl)", "Glucose (C6H12O6)"] - for line_nr, function_name in enumerate(function_names, start=1): - with self.subTest(path=path, function_name=function_name): - tracing_tag = impl_builder._get_tag(path, function_name, line_nr) - self.assertEqual(tracing_tag.namespace, "cpp") - self.assertEqual( - tracing_tag.tag, - f"{FILE}:{duplicate_file_counter}:{function_name}:{line_nr}", - ) - self.assertIsNone(tracing_tag.version) - - def test_from_match(self): - impl_builder = ImplementationBuilder() - - for num_extra_groups in (0, 1, 10): - num_groups = impl_builder.MIN_NUM_GROUPS + num_extra_groups - with self.subTest(num_groups=num_groups): - values = "example.cpp:42:call:myFunction" - values += "".join( - f":additional_{i}" for i in range(num_extra_groups) - ) - match = re.match( - r":".join(r"(.*)" for _ in range(num_groups)), - values - ) - if not match: - self.fail("Invalid test setup: regex match failed!") - if len(match.groups()) != num_groups: - self.fail(f"Invalid test setup: expected {num_groups} groups, " - f"got {len(match.groups())}!") - impl = impl_builder.from_match(match) - - self.assertEqual(impl.tag.namespace, "cpp") - self.assertEqual(impl.tag.tag, "example.cpp:1:myFunction:42") - self.assertIsInstance(impl.location, File_Reference) - self.assertEqual(impl.location.filename, abspath("example.cpp")) - self.assertEqual(impl.location.line, 42) - self.assertIsNone(impl.location.column) - self.assertEqual(impl.language, "C/C++") - self.assertEqual(impl.kind, "call") - self.assertEqual(impl.name, "myFunction") - - def test_from_match_invalid_line_number(self): - impl_builder = ImplementationBuilder() - - match = re.match( - r"(.*)-(.*)-(.*)-(.*)", - "stuff.cpp-NOT_INTEGER-abc-def" - ) - if not match: - self.fail("Invalid test setup: regex match failed!") - if len(match.groups()) != impl_builder.MIN_NUM_GROUPS: - self.fail(f"Invalid test setup: expected {impl_builder.MIN_NUM_GROUPS} " - f"groups, got {len(match.groups())}!") - with self.assertRaises(ValueError): - impl_builder.from_match(match) - - def test_from_match_if_new(self): - impl_builder = ImplementationBuilder() - db = {} - match = re.match( - r"(.*):(.*):(.*):(.*)", - "example.cpp:43:callback:yourFunction" - ) - if not match: - self.fail("Invalid test setup: regex match failed!") - impl = impl_builder.from_match_if_new(db, match) - self.assertEqual(len(db), 1) - self.assertIn(impl.tag.key(), db) - self.assertIs(db[impl.tag.key()], impl) - - # Test that it returns the existing implementation if it already exists - existing_impl = impl_builder.from_match_if_new(db, match) - self.assertIs(existing_impl, impl) diff --git a/tests_unit/lobster_cpp/test_item_builder.py b/tests_unit/lobster_cpp/test_item_builder.py new file mode 100644 index 000000000..de4735ffe --- /dev/null +++ b/tests_unit/lobster_cpp/test_item_builder.py @@ -0,0 +1,179 @@ +from os import getcwd +from os.path import abspath, join +import re +from unittest import TestCase +from lobster.common.items import Implementation, Item, KindTypes +from lobster.common.location import File_Reference +from lobster.tools.cpp.item_builder import ItemBuilder + + +class ItemBuilderTest(TestCase): + @staticmethod + def _get_os_independent_abspath_start(): + """Returns an arbitrary path which is guaranteed to be absolute. + This way we can construct absolute paths in a platform-independent way. + Note that otherwise an absolute path on Linux would start with a slash ("/"), + while on Windows it would start with a drive letter (e.g., "C:\"). + + The simplest solution is to use the current working directory, + which always exists on all platforms and is always absolute. + """ + return getcwd() + + def test_get_location_from_abs_path(self): + item_builder = ItemBuilder() + path = join(self._get_os_independent_abspath_start(), + "path", "to", "the", "baking soda.NaHCO3") + result = item_builder._get_location(path, 420) + self.assertEqual(result.filename, path) + self.assertEqual(result.line, 420) + self.assertIsNone(result.column) + + def test_get_location_from_rel_path(self): + item_builder = ItemBuilder() + result = item_builder._get_location(join(".", "water.H2O"), 1) + self.assertEqual(result.filename, abspath("water.H2O")) + self.assertEqual(result.line, 1) + self.assertIsNone(result.column) + + def test_get_tag(self): + item_builder = ItemBuilder() + for duplicate_file_counter, parent_folder in enumerate( + ("cake", "pie"), + start=1, + ): + FILE = "ingredients.txt" + path = join(parent_folder, FILE) + function_names = ["Sodium Chloride (NaCl)", "Glucose (C6H12O6)"] + for line_nr, function_name in enumerate(function_names, start=1): + with self.subTest(path=path, function_name=function_name): + tracing_tag = item_builder._get_tag(path, function_name, line_nr) + self.assertEqual(tracing_tag.namespace, "cpp") + self.assertEqual( + tracing_tag.tag, + f"{FILE}:{duplicate_file_counter}:{function_name}:{line_nr}", + ) + self.assertIsNone(tracing_tag.version) + + def test_from_match_no_kind(self): + item_builder = ItemBuilder() + + for num_extra_groups in (0, 1, 10): + num_groups = item_builder.MIN_NUM_GROUPS + num_extra_groups + with self.subTest(num_groups=num_groups): + values = "example.cpp:42:call:myFunction" + values += "".join( + f":additional_{i}" for i in range(num_extra_groups) + ) + match = re.match( + r":".join(r"(.*)" for _ in range(num_groups)), + values + ) + if not match: + self.fail("Invalid test setup: regex match failed!") + if len(match.groups()) != num_groups: + self.fail(f"Invalid test setup: expected {num_groups} groups, " + f"got {len(match.groups())}!") + item = item_builder.from_match(match) + + self.assertEqual(item.tag.namespace, "cpp") + self.assertEqual(item.tag.tag, "example.cpp:1:myFunction:42") + self.assertIsInstance(item.location, File_Reference) + self.assertEqual(item.location.filename, abspath("example.cpp")) + self.assertEqual(item.location.line, 42) + self.assertIsNone(item.location.column) + self.assertTrue(isinstance(item, Item)) + + def test_from_match_kind_itm(self): + item_builder = ItemBuilder(kind=KindTypes.ITM.value) + + for num_extra_groups in (0, 1, 10): + num_groups = item_builder.MIN_NUM_GROUPS + num_extra_groups + with self.subTest(num_groups=num_groups): + values = "example.cpp:42:call:myFunction" + values += "".join( + f":additional_{i}" for i in range(num_extra_groups) + ) + match = re.match( + r":".join(r"(.*)" for _ in range(num_groups)), + values + ) + if not match: + self.fail("Invalid test setup: regex match failed!") + if len(match.groups()) != num_groups: + self.fail(f"Invalid test setup: expected {num_groups} groups, " + f"got {len(match.groups())}!") + item = item_builder.from_match(match) + + self.assertEqual(item.tag.namespace, "cpp") + self.assertEqual(item.tag.tag, "example.cpp:1:myFunction:42") + self.assertIsInstance(item.location, File_Reference) + self.assertEqual(item.location.filename, abspath("example.cpp")) + self.assertEqual(item.location.line, 42) + self.assertIsNone(item.location.column) + self.assertTrue(isinstance(item, Item)) + + def test_from_match_kind_imp(self): + item_builder = ItemBuilder(kind=KindTypes.IMP.value) + + for num_extra_groups in (0, 1, 10): + num_groups = item_builder.MIN_NUM_GROUPS + num_extra_groups + with self.subTest(num_groups=num_groups): + values = "example.cpp:42:call:myFunction" + values += "".join( + f":additional_{i}" for i in range(num_extra_groups) + ) + match = re.match( + r":".join(r"(.*)" for _ in range(num_groups)), + values + ) + if not match: + self.fail("Invalid test setup: regex match failed!") + if len(match.groups()) != num_groups: + self.fail(f"Invalid test setup: expected {num_groups} groups, " + f"got {len(match.groups())}!") + item = item_builder.from_match(match) + + self.assertEqual(item.tag.namespace, "cpp") + self.assertEqual(item.tag.tag, "example.cpp:1:myFunction:42") + self.assertIsInstance(item.location, File_Reference) + self.assertEqual(item.location.filename, abspath("example.cpp")) + self.assertEqual(item.location.line, 42) + self.assertIsNone(item.location.column) + self.assertTrue(isinstance(item, Implementation)) + self.assertEqual(item.language, "C/C++") + self.assertEqual(item.kind, "call") + self.assertEqual(item.name, "myFunction") + + def test_from_match_invalid_line_number(self): + item_builder = ItemBuilder() + + match = re.match( + r"(.*)-(.*)-(.*)-(.*)", + "stuff.cpp-NOT_INTEGER-abc-def" + ) + if not match: + self.fail("Invalid test setup: regex match failed!") + if len(match.groups()) != item_builder.MIN_NUM_GROUPS: + self.fail(f"Invalid test setup: expected {item_builder.MIN_NUM_GROUPS} " + f"groups, got {len(match.groups())}!") + with self.assertRaises(ValueError): + item_builder.from_match(match) + + def test_from_match_if_new(self): + item_builder = ItemBuilder() + db = {} + match = re.match( + r"(.*):(.*):(.*):(.*)", + "example.cpp:43:callback:yourFunction" + ) + if not match: + self.fail("Invalid test setup: regex match failed!") + item = item_builder.from_match_if_new(db, match) + self.assertEqual(len(db), 1) + self.assertIn(item.tag.key(), db) + self.assertIs(db[item.tag.key()], item) + + # Test that it returns the existing implementation if it already exists + existing_item = item_builder.from_match_if_new(db, match) + self.assertIs(existing_item, item) diff --git a/tests_unit/lobster_cpptest/data/cpptest-config_no_kind_1.yaml b/tests_unit/lobster_cpptest/data/cpptest-config_no_kind_1.yaml new file mode 100644 index 000000000..03bc4e238 --- /dev/null +++ b/tests_unit/lobster_cpptest/data/cpptest-config_no_kind_1.yaml @@ -0,0 +1,3 @@ +files: ["a", "b"] +output_file: "component_tests.lobster" +codebeamer_url: "https://codebeamer.com" diff --git a/tests_unit/lobster_cpptest/data/cpptest-config_no_kind_2.yaml b/tests_unit/lobster_cpptest/data/cpptest-config_no_kind_2.yaml new file mode 100644 index 000000000..24c2d0361 --- /dev/null +++ b/tests_unit/lobster_cpptest/data/cpptest-config_no_kind_2.yaml @@ -0,0 +1,2 @@ +output_file: "unit_tests.lobster" +codebeamer_url: "https://codebeamer.com" diff --git a/tests_unit/lobster_cpptest/test_cpptest.py b/tests_unit/lobster_cpptest/test_cpptest.py index 7c8cffbeb..166277cd6 100644 --- a/tests_unit/lobster_cpptest/test_cpptest.py +++ b/tests_unit/lobster_cpptest/test_cpptest.py @@ -4,6 +4,7 @@ from os.path import dirname from pathlib import Path +from lobster.common.items import KindTypes from lobster.tools.cpptest.cpptest import ( OUTPUT_FILE, CODEBEAMER_URL, @@ -31,6 +32,7 @@ def setUp(self): self.test_case_file = str(Path(dirname(__file__), "data", "test_case.cpp")) self.test_config_1 = str(Path(dirname(__file__), "data", "cpptest-config_1.yaml")) self.test_config_2 = str(Path(dirname(__file__), "data", "cpptest-config_2.yaml")) + self.test_config_no_kind_2 = str(Path(dirname(__file__), "data", "cpptest-config_no_kind_2.yaml")) self.output_file_name = f'{self.lobster_generator}_{os.path.basename(self.test_case_file)}' self.output_file_name = self.output_file_name.replace('.', '_') @@ -70,7 +72,19 @@ def test_parse_config_file(self): self.assertEqual( [CODEBEAMER_URL, KIND, FILES, OUTPUT_FILE], list(vars(config)) -) + ) + self.assertEqual(KindTypes.REQ.value, config.kind) + + def test_parse_config_file_no_kind(self): + config = parse_config_file(self.test_config_no_kind_2) + self.assertIsNotNone(config) + self.assertIsInstance(config, Config) + self.assertEqual(4, len(vars(config))) + self.assertEqual( + [CODEBEAMER_URL, KIND, FILES, OUTPUT_FILE], + list(vars(config)) + ) + self.assertEqual(KindTypes.ITM.value, config.kind) def test_get_test_file_list(self): file_dir_list = [self.test_data_dir] @@ -130,7 +144,7 @@ def test_single_file(self): config = Config( files=[self.test_case_file], codebeamer_url="https://codebeamer.com", - kind="req", + kind=KindTypes.ITM.value, output_file=self.output_file_name ) @@ -161,7 +175,7 @@ def test_single_directory(self): config = Config( files=[self.test_data_dir], codebeamer_url="https://codebeamer.com", - kind="req", + kind=KindTypes.ITM.value, output_file=self.output_data_file_name ) @@ -183,7 +197,7 @@ def test_not_existing_file_dir(self): config = Config( files=[self.test_fake_dir], codebeamer_url="https://codebeamer.com", - kind="req", + kind=KindTypes.ITM.value, output_file=self.output_file_name ) @@ -252,6 +266,61 @@ def test_separate_output_config(self): expected_refs = expected_unit_test_refs_dicts.get(tag) self.assertListEqual(expected_refs, refs) + + def test_separate_output_config_no_kind(self): + config: Config = parse_config_file(self.test_config_no_kind_2) + config.files = [self.test_case_file] + + run_lobster_cpptest( + config=config + ) + + self.assertEqual(os.path.exists(self.unit_test_lobster_file), True) + + with open(self.unit_test_lobster_file, "r", encoding="UTF-8") as unit_test_file: + unit_test_lobster_file_dict = json.loads(unit_test_file.read()) + + unit_test_lobster_items = [] + orphan_test_lobster_items = [] + lobster_items = unit_test_lobster_file_dict.get('data') + self.assertIsNotNone(lobster_items) + self.assertIsInstance(lobster_items, list) + self.assertEqual(46, len(lobster_items)) + + for lobster_item in lobster_items: + if 'refs' in lobster_item.keys(): + unit_test_lobster_items.append(lobster_item) + else: + orphan_test_lobster_items.append(lobster_item) + + self.assertIsNotNone(unit_test_lobster_items) + self.assertIsInstance(unit_test_lobster_items, list) + self.assertEqual(10, len(unit_test_lobster_items)) + + self.assertIsNotNone(orphan_test_lobster_items) + self.assertIsInstance(orphan_test_lobster_items, list) + self.assertEqual(36, len(orphan_test_lobster_items)) + + # just check a few refs from the written unit test lobster items + expected_unit_test_refs_dicts = { + 'cpp test_case.cpp:1:RequirementAsComments:70': + ['itm 0815', 'itm 0816'], + 'cpp test_case.cpp:1:Requirement:64': + ['itm 0815'] + } + + for lobster_item in unit_test_lobster_items: + self.assertIsNotNone(lobster_item) + self.assertIsInstance(lobster_item, dict) + file_name = lobster_item.get('location').get('file') + self.assertTrue(os.path.isabs(file_name)) + tag = lobster_item.get('tag') + refs = lobster_item.get('refs') + self.assertIsInstance(refs, list) + if tag in expected_unit_test_refs_dicts: + expected_refs = expected_unit_test_refs_dicts.get(tag) + self.assertListEqual(expected_refs, refs) + def test_test_case_parsing(self): """ Verify that the test case parsing is working correctly @@ -298,27 +367,27 @@ def test_test_case_parsing(self): "test_name": "BriefTagMultipleLines"}, # Verify that the requirement tags are correctly parsed {"suite": "RequirementTagTest", "test_name": "Requirement", - "req": ["CB-#0815"]}, + "itm": ["CB-#0815"]}, {"suite": "RequirementTagTest1", "test_name": "RequirementAsOneLineComments", - "req": ["CB-#0815", "CB-#0816"]}, + "itm": ["CB-#0815", "CB-#0816"]}, {"suite": "RequirementTagTest1", "test_name": "RequirementAsComments", - "req": ["CB-#0815", "CB-#0816"]}, + "itm": ["CB-#0815", "CB-#0816"]}, {"suite": "RequirementTagTest1", "test_name": "RequirementsAsMultipleComments", - "req": ["CB-#0815", "CB-#0816", "CB-#0817", "CB-#0818", "CB-#0819", "CB-#0820"]}, + "itm": ["CB-#0815", "CB-#0816", "CB-#0817", "CB-#0818", "CB-#0819", "CB-#0820"]}, {"suite": "RequirementTagTest2", "test_name": "URLRequirement", - "req": []}, + "itm": []}, {"suite": "RequirementTagTest2", "test_name": "URLRequirementsCommaSeparated", - "req": []}, + "itm": []}, {"suite": "RequirementTagTest2", "test_name": "URLRequirementsAsCommentsSpaceSeparated", - "req": []}, + "itm": []}, {"suite": "RequirementTagTest2", "test_name": "MultipleURLRequirements", - "req": []}, + "itm": []}, {"suite": "RequirementTagTest3", "test_name": "MixedRequirements", - "req": ["CB-#0816"]}, + "itm": ["CB-#0816"]}, {"suite": "RequirementTagTest4", "test_name": "InvalidRequirement", - "req": []}, + "itm": []}, {"suite": "RequirementTagTest4", "test_name": "MissingRequirementReference", - "req": []}, + "itm": []}, # Verify that the required-by tag is correctly parsed {"suite": "RequirementByTest1", "test_name": "RequiredByWithAt", "req_by": ["FOO0::BAR0"]}, @@ -347,16 +416,16 @@ def test_test_case_parsing(self): "version": ["1", "42"], }, {"suite": "VersionTagTest", "test_name": "MoreVersionsThanRequirements", "version": ["12", "70"], - "req": ["CB-#0815"]}, + "itm": ["CB-#0815"]}, {"suite": "VersionTagTest", "test_name": "MoreRequirementsThanVersions", "version": ["28", "28"], - "req": ["CB-#0815", "CB-#0816"]}, + "itm": ["CB-#0815", "CB-#0816"]}, {"suite": "VersionTagTest", "test_name": "VersionSpaceSeparated", "version": ["28", "99"], - "req": ["CB-#123", "CB-#456"]}, + "itm": ["CB-#123", "CB-#456"]}, # Verify that all at once is correctly parsed {"suite": "AllTogetherTest", "test_name": "ImplementationMultipleLines", "docu_start": 207, "docu_end": 214, "def_start": 215, "def_end": 217, "version": ["42", "2"], "test": "foo", "brief": "this test tests something", - "req": ["CB-#0815", "CB-#0816"], + "itm": ["CB-#0815", "CB-#0816"], "req_by": ["FOO0::BAR0"], "testmethods": ["TM_BOUNDARY", "TM_REQUIREMENT"]}, {"suite": "RequirementTest1", "test_name": "TestMultipleComments", "docu_start": 238, "docu_end": 253, "def_start": 254, "def_end": 254} @@ -390,10 +459,10 @@ def test_test_case_parsing(self): expectation["def_end"], f"def_end does not match for test_name {test_cases[i].test_name}", ) - if "req" in expectation: + if "itm" in expectation: self.assertEqual( test_cases[i].requirements, - expectation["req"], + expectation["itm"], f"req does not match for test_name {test_cases[i].test_name}", ) if "req_by" in expectation: diff --git a/tests_unit/lobster_pkg/test_pkg.py b/tests_unit/lobster_pkg/test_pkg.py index 769c5c1fb..d58577e04 100644 --- a/tests_unit/lobster_pkg/test_pkg.py +++ b/tests_unit/lobster_pkg/test_pkg.py @@ -11,7 +11,7 @@ create_raw_entry, extract_lobster_traces_from_trace_analysis, xml_parser, - create_default_activity, + create_default_item, ) @@ -57,13 +57,14 @@ def test_lobster_pkg_functions_with_valid_xml_format(self): self.assertIn("lobster-trace: misplaced.req1,misplaced.req2", misplaced_traces[0]) getvalues.extend(valid_traces) - create_raw_entry(data, file.name, json.dumps(getvalues)) + create_raw_entry(data, file.name, json.dumps(getvalues), kind="act") lobster_items = list(data.values()) for item in lobster_items: lobster_item = item.to_json() self.assertTrue(lobster_item['refs'] == expected_values) + def test_lobster_pkg_functions_with_misplaced_lobster_lines(self): with open(self.test_pkg_file_with_misplaced, "r", encoding="UTF-8") as file: filename = Path(self.test_pkg_file_with_misplaced).name @@ -96,7 +97,7 @@ def test_lobster_pkg_functions_with_invalid_xml_format(self): self.assertIsInstance(misplaced_traces, list) self.assertEqual(0, len(misplaced_traces)) - create_default_activity(file_content, filename, data) + create_default_item(file_content, filename, data, kind="act") self.assertIn('pkg sample2.pkg',list(data.keys())) lobster_items = list(data.values()) diff --git a/tests_unit/lobster_report/test_report.py b/tests_unit/lobster_report/test_report.py index 41b0ca437..dc8dbf879 100644 --- a/tests_unit/lobster_report/test_report.py +++ b/tests_unit/lobster_report/test_report.py @@ -49,11 +49,14 @@ def test_compute_coverage(self): ) - def test_generate_report_file(self): + def test_generate_report_file_conf(self): apple_config = "apple.conf" banana_output = "banana.lobster" - with patch.object(Report, 'parse_config') as mock_parse_config, \ + with patch.object(Report, 'validate_config_from_yaml_file') as mock_validate_config_from_yaml_file, \ + patch.object(Report, 'load_config_from_yaml_file') as mock_load_config_from_yaml_file, \ + patch.object(Report, 'print_deprecated_warning') as mock_print_deprecated_warning, \ + patch.object(Report, 'load_config_from_conf_file') as mock_load_config_from_conf_file, \ patch.object(Report, 'write_report') as mock_write_report: lobster_report( @@ -62,5 +65,32 @@ def test_generate_report_file(self): ) # Verify custom parameters were used - mock_parse_config.assert_called_once_with(apple_config) + mock_print_deprecated_warning.assert_called_once_with(apple_config) + mock_load_config_from_conf_file.assert_called_once_with(apple_config) mock_write_report.assert_called_once_with(banana_output) + + mock_validate_config_from_yaml_file.assert_not_called() + mock_load_config_from_yaml_file.assert_not_called() + + def test_generate_report_file_yaml(self): + apple_config = "apple.yaml" + banana_output = "banana.lobster" + + with patch.object(Report, 'validate_config_from_yaml_file') as mock_validate_config_from_yaml_file, \ + patch.object(Report, 'load_config_from_yaml_file') as mock_load_config_from_yaml_file, \ + patch.object(Report, 'print_deprecated_warning') as mock_print_deprecated_warning, \ + patch.object(Report, 'load_config_from_conf_file') as mock_load_config_from_conf_file, \ + patch.object(Report, 'write_report') as mock_write_report: + + lobster_report( + lobster_config_file=apple_config, + output_file=banana_output + ) + + # Verify custom parameters were used + mock_validate_config_from_yaml_file.assert_called_once_with(apple_config) + mock_load_config_from_yaml_file.assert_called_once_with(apple_config) + mock_write_report.assert_called_once_with(banana_output) + + mock_print_deprecated_warning.assert_not_called() + mock_load_config_from_conf_file.assert_not_called() diff --git a/tests_unit/test_io.py b/tests_unit/test_io.py index 9f718e56f..daf0bf396 100644 --- a/tests_unit/test_io.py +++ b/tests_unit/test_io.py @@ -4,7 +4,7 @@ from unittest.mock import patch, create_autospec, mock_open, ANY from lobster.common.errors import Message_Handler, LOBSTER_Error from lobster.common.location import File_Reference -from lobster.common.items import Tracing_Tag, Requirement, Implementation, Activity +from lobster.common.items import Tracing_Tag, Requirement, Implementation, Activity, Item from lobster.common.io import lobster_write, lobster_read from lobster.common.location import Location @@ -20,6 +20,11 @@ def setUp(self): self.mock_language = "mock_language" self.mock_location = create_autospec(Location, instance = True) self.tracing_tag = Tracing_Tag(self.mock_namespace, self.mock_tag) + self.item = Item( + self.tracing_tag, + self.mock_location, + self.mock_name, + ) self.requirement = Requirement( self.tracing_tag, self.mock_location, @@ -58,6 +63,28 @@ def setUp(self): "ref_down": ["mock_value"], } + @patch("lobster.common.io.json") + @patch("lobster.common.items.Tracing_Tag.to_json") + @patch("lobster.common.items.Item.to_json") + def test_lobster_write_item(self, mock_item_to_json, mock_tracing_tag_to_json, mock_json): + generator = "mock_generator" + mock_tracing_tag_to_json.return_value = "mock_value" + self.source_data["tracing_status"] = "mock_status" + mock_item_to_json.return_value = self.source_data + items = [self.item] + self.source_data["tracing_status"] = "mock_status" + self.source_data["framework"] = "mock_framework" + fd_req = io.StringIO() + mock_data = { + "data" : [self.source_data], + "generator" : generator, + "version" : 5 + } + lobster_write(fd_req, Item, generator, items) + fd_req.seek(0) + mock_json.dump.assert_called_once_with(mock_data, fd_req, indent=2) + + @patch("lobster.common.io.json") @patch("lobster.common.items.Tracing_Tag.to_json") @patch("lobster.common.items.Item.to_json") @@ -130,6 +157,33 @@ def test_lobster_write_activity(self, mock_item_to_json, mock_tracing_tag_to_jso } mock_json.dump.assert_called_once_with(mock_data, fd_act, indent=2) + @patch("lobster.common.items.Item.additional_data_from_json") + @patch("lobster.common.items.Tracing_Tag.key") + @patch("lobster.common.items.Tracing_Tag.from_json") + def test_lobster_read_valid_item(self, mock_from_json, mock_key, mock_additional_data_from_json): + mock_key.return_value = "mock_namespace mock_tag" + mock_from_json.return_value = self.tracing_tag + self.source_data.update({"location" : { + "kind": "file", + "file": "example.txt" + }}) + self.source_data["tracing_status"] = "mock_status" + self.source_data["framework"] = "mock_framework" + mock_data_req = { + "version" : 5, + "generator" : "mock_generator", + "data" : [self.source_data] + } + read_data = json.dumps(mock_data_req, indent=4) + with patch("os.path.isfile", return_value=True): + with patch("builtins.open", mock_open(read_data=read_data)): + lobster_read(self.mh, self.filename, self.level, self.items, self.source_info) + self.assertEqual(len(self.items), 1) + mock_additional_data_from_json.assert_called_once_with( + self.level, + self.source_data, mock_data_req["version"], + ) + @patch("lobster.common.items.Item.additional_data_from_json") @patch("lobster.common.items.Tracing_Tag.key") @patch("lobster.common.items.Tracing_Tag.from_json") @@ -239,14 +293,25 @@ def test_lobster_read_missing_data_key(self, mock_file_open, mock_isfile): @patch( "builtins.open", new_callable=unittest.mock.mock_open, - read_data='{"schema": "lobster-req-trace", "version": 5, "generator": "test_gen", "data": []}', + read_data='{"schema": "lobster-req-trace", "generator": "mock_generator", "data": []}', + ) + def test_lobster_read_missing_versio_key(self, mock_file_open, mock_isfile): + with self.assertRaises(LOBSTER_Error): + lobster_read(self.mh, self.filename, self.level, self.items, self.source_info) + self.mh.error.assert_called_with(ANY, "required top-level key version not present") + + @patch("os.path.isfile", return_value=True) + @patch( + "builtins.open", + new_callable=unittest.mock.mock_open, + read_data='{"schema": "lobster-imp-trace", "version": 4, "generator": "test_gen", "data": []}', ) def test_lobster_read_unsupported_version(self, mock_file_open, mock_isfile): with self.assertRaises(LOBSTER_Error): lobster_read(self.mh, self.filename, self.level, self.items, self.source_info) self.mh.error.assert_called_with( File_Reference(self.filename), - "version 5 for schema lobster-req-trace is not supported", + "version 4 for schema lobster-imp-trace is not supported", ) @patch("os.path.isfile", return_value=True)