6. Axivion Bauhaus Suite¶
Static Analysis tries to uncover potential errors in software by analyzing the source code. In this project one of the tools that are used is the Axivion Bauhaus Suite.
6.1. Setup¶
Install OpenJDK and make it available in PATH.
Install Python3.8 from https://www.python.org/downloads/windows/. Use the user installer and make sure to install the Python launcher. Leave all other options as they are selected.
Install Axivion Bauhaus Suite from the zip-file in a versioned directory e.g.,
C:\Bauhaus\x.y.z
and addC:\Bauhaus\x.y.z\bin
to the user PATH environment variable.Copy the license file into
%USERPROFILE%\.bauhaus
.Copy the certificate of the dashboard server to
%USERPROFILE%\.bauhaus\auto.cert
.Optional: If there is an Axivion Dashboard server running: Set the user environment variable
AXIVION_PASSWORD=xyz
to the user token obtained from the dashboard.
To verify that the install can successfully build run the following commands in a terminal inside the project root (please make sure that the terminal is freshly spawned so that it inherits the new environment variables):
C:\Users\vulpes\Documents\foxbms-2>waf build_axivion clean_axivion
6.2. Local Builds And Results¶
Run the analysis step
C:\Users\vulpes\Documents\foxbms-2>tests\axivion\start_local_analysis.bat
Run the following command in to start a local dashserver and do not close the terminal afterwards:
dashserver start --local --noauth --install_file=%USERPROFILE%\.bauhaus\localbuild\projects\foxbms-2.db
Follow the instructions printed on the terminal to see the results.
6.3. VS Code Setup¶
6.3.1. Usage¶
6.3.1.1. Running the Tests¶
Press Ctrl + Shift + B and run the task axivion analysis. This task
runs the Axivion analysis script tests/axivion/start_analysis.bat
.
6.3.1.2. Issues¶
Open command palette by pressing Ctrl + Shift + P and search for axivion.
6.3.2. Local Builds¶
If VS Code is installed the VS Code’s settings.json
is automatically
correctly configured for Axivion usage.
6.3.3. CI Builds¶
To get CI build results in VS Code add the following configuration to the VS Code User settings:
"axivion.dashboards": [
{
"id": "user friendly Dashboard name",
"url": "<path-to-dashboard>",
"username": "<username>"
}
]