This repository contains a working simple example of what it can be done using the lobster tool to demonstrate software traceability and requirements coverage. Please consider reading first the lobster documentation, configuration files and the common interchange format.
To test this demo, do not forget to install the needed tools as explained in the lobster repository
A lobster config file (by default lobster.conf
) declares the tracing policy. In simple words, how your artefact relates to the other and where is its source. The syntax is fairly simple and best explained by the following example step by step.
The core feature is an item level, and there are three kinds:
- requirements (for things like trlc, codebeamer, systemweaver, doors, ...)
- implementation (for things like code or models)
- activity (for things like tests, proofs, argumentation, ...)
In the lobster.conf
file the declaration of the three levels might look like this:
requirements "Several code requirements"{
source: "trlc.lobster";
source: "codebeamer.lobster";
}
implementation "Source code"{
source: "software.lobster";
}
activity "Tests of source code"{
source: "test_software.lobster";
}
For the levels there are the attributes. More on this topic in the lobster repository
-
Source:
The source attribute assigns eg.trlc.lobster
as source file. -
trace to: The trace to attribute declares the trace to: "Several code requirements" level; This declares that the items in this level are expected to be linked to items from report.
-
requires: Possible ways to verify a requirement.
requirements "Several code requirements"{
source: "trlc.lobster";
source: "codebeamer.lobster";
requires: "Tests of source code";
}
implementation "Source code"{
source: "software.lobster";
trace to: "Several code requirements";
}
activity "Tests of source code"{
source: "test_software.lobster";
trace to: "Several code requirements";
}
In order to generate the tracing.html
file we need first to create the input files *.lobster and set up the tracing policy. This is achieved using the source codes, test source codes, requirements definitions with their traces and the several lobster convertion tools. This diagram shows the complete workflow of lobster.
Execute the below commands in the root folder in sequential order. Otherwise use the target tracing
from root folder if you use a Linux environment or use WSL.
For Windows users, please use the tracing.bat
file.
-
- In our vanilla example we used trlc as requirement, python implementation, python activity (tests), cpp implementation, gtest for cpptesting and codebeamer. For that we need to generate *.lobster files using the convertion tools.
For example:
trlc.lobster
,python.lobster
,cpp.lobster
,codebeamer.lobster
...
- In our vanilla example we used trlc as requirement, python implementation, python activity (tests), cpp implementation, gtest for cpptesting and codebeamer. For that we need to generate *.lobster files using the convertion tools.
For example:
-
trlc
lobster-trlc main.trlc main.rsl --config-file=lobster-trlc.conf --out lobster_output_files/trlc.lobster
This is the link for lobster-tool-trlc - Our lobster repository package - lobster-tool-trlc
- Annotations for trlc - lobster-trace is present inside the function body.
python
implementationslobster-python ./source_code_python --out="./lobster_output_files/python_software.lobster"
This is the link for lobster-tool-python - Our lobster repository package - lobster-tool-python
- Annotations for python - lobster-trace is present inside the function body.
python
testslobster-python ./unittests_python --activity --out="./lobster_output_files/python_tests.lobster"
- Annotations for python - lobster-trace is present inside the function body.
cpp
implementationlobster-cpp ./source_code_cpp --clang-tidy="../llvm-project/build/bin/clang-tidy" --out="./lobster_output_files/cpp_software.lobster"
This is the link for lobster-tool-cpp - Our lobster repository package - lobster-tool-cpp
- Annotations for cpp - lobster-trace is present inside the function body.
cpp uses
clang-tidy
. Please see here to create it.
gtest
for cpp testslobster-gtest ./unittests_cpp --out="./lobster_output_files/gtests.lobster"
This is the link for lobster-tool-cpp - Our lobster repository package - lobster-tool-cpp
- Annotations for cpp - lobster-trace is present inside the function body.
codebeamer
No command is available since there is no public codebeamer instance that we can provide. That is why we provide a sample codebeamer.lobster
file that was created from a real codebeamer instance and its API. Nonetheless the codebeamer requirements are considered in the lobster's tracing policy as a source.
This is the link for lobster-tool-codebeamer - Our lobster repository package - lobster-tool-codebeamer
- Annotations for codebeamer - lobster-trace is present outside the function body.
-
- After generating the .lobster file next step is to generate the
report.lobster
file, which has all the information about the requirement, implementation, activity.
- After generating the .lobster file next step is to generate the
lobster-report --lobster-config=lobster.conf --out="./lobster_output_files/report.lobster"
lobster-online-report "lobster_output_files/report.lobster"
-
- Once the
report.lobster
is generated then next step is to generate thetracing.html
file and any user can easily read that file and can find the traces in the file.
- Once the
lobster-html-report ./lobster_output_files/report.lobster --out="tracing_example.html"
or for your CI:
lobster-ci-report ./lobster_output_files/report.lobster
This demo was created using lobster version
0.9.19
and TRLC version2.0.0
all the *.lobster files in this repository can be generated with our tools. For learning and comparison process they will be uploaded too. The same applies for the
tracing_example.html
file.