cli
Last updated: 2025-10-30 01:16:08.722293 File source: link on GitLab
CLI
The cli.sh script provides a unified interface for managing various functionalities of the test-suite.
Currently, the cli is only tested on linux, so please if you want to use it on MacOSx, you are encouraged to report incompatibilites with the underlying scripts that compose the cli.
Basic Usage
Note that all cli.sh executions assume that your working directory is the test-suite project root.
./cli.sh <context> <action> [<subcommand>, ...] [additional arguments...]Running without arguments (./cli.sh) will fail with a usage message.
Customization via environment variables
To customize the execution of the local environment, you should copy .default.env to .env and change the variable values as needed.
The order or precedence is:
command line defined environment variables (ex:
DMS_SOURCE=/path/to/deb ./cli.sh lxd create)environment variables defined in
.envfileenvironment variables defined in
.default.envfile
The following are some of the the environment variables available for customizing test execution via the CLI.
lxd create lxd destroy
lxd create lxd destroyThe most important variable is DMS_SOURCE:
DMS_SOURCE: path to a debian file, to a dms local clone or an https link (default:https://d.nunet.io/nunet-dms-amd64-stable.deb)
The name is legacy when the project only accepted a debian package and has been overloaded to support links and folders, since it's relatively simple to distinguish these cases.
For the case which the variable points to debian package, it's used directly by dms-on-lxd to provision the virtual machines.
If it's an HTTPS link, the CLI attempts to download the debian package using curl. There is no support for authentication, since the intended usage is with the permalinks hosted at d.nunet.io. Use https://d.nunet.io/nunet-dms-amd64-stable.deb for a stable release from the release branch of dms and https://d.nunet.io/nunet-dms-amd64-latest.deb for the latest release from the main branch.
If it's a folder, the cli assumes a folder structure where maint-scripts/Dockerfile.build and maint-scripts/build.sh exist and will atempt to use these files to build dms and then use the resulting debian package to provision the environment.
DMS_ON_LXD_ENV: name of the environment to create the virtual machines. Useful for deploying multiple separate environment with different versions of DMS (default:local)DMS_ON_LXD_INSTANCES_COUNT: number of instances to create with the debian package provided byDMS_SOURCEinstalled (default:2)
If DMS_SOURCE is a web link:
DMS_ON_LXD_OVERWRITE_DEB: set totrueto overwrite an existing deb file with the contents ofDMS_SOURCE(default:false)
run {test_type}
run {test_type}BEHAVE_STEP_TIMEOUT: sets the timeout for each step when running gherking features in python-behave. (default:30)DMS_ON_LXD_CONTAINERIZATION: Set tofalseto run tests directly without Docker container (default:true)BEHAVE_ENABLE_ALLURE: Set totrueto enable Allure test reporting (default:true)BEHAVE_ENABLE_JUNIT: Set totrueto enable JUnit test reporting (default:true)BEHAVE_VERBOSE_VALIDATION: Set totrueto enable verbose validation of feature files, which displays among other things skipped steps (default:false)
LXD Infrastructure Management
See DMS on LXD Usage Guide for detailed information on environment variables used to customize DMS on LXD execution.
See Feature Environment setup guide for detailed information on how to execute the feature environment locally.
While the following examples use inline environment variables, you are encouraged to use the .env file to customize these variables.
Create LXD infrastructure
./cli.sh lxd create
Destroy LXD infrastructure
./cli.sh lxd destroyTo specify a dms debian file:
DMS_SOURCE=/path/to/file ./cli.sh lxd createTo specify a download link for the dms debian file:
DMS_SOURCE=https://d.nunet.io/nunet-dms-amd64-latest.deb DMS_ON_LXD_OVERWRITE_DEB=true ./cli.sh lxd destroyFeature Environment
Validate gherkin feature files
./cli.sh validate feature-files
Run standalone tests
./cli.sh run functional_tests standalone
Run distributed tests with allure and junit
BEHAVE_ENABLE_JUNIT=true BEHAVE_ENABLE_ALLURE=true ./cli.sh run functional_tests distributed
Serve allure reports
./cli.sh serve allure-report
List available tests
./cli.sh run functional_tests list
Run specific distributed tests
./cli.sh run functional_tests distributed $(./cli.sh run functional_tests list | grep deployment)
Run specific standalone tests
./cli.sh run functional_tests standalone $(./cli.sh run functional_tests list | grep deployment)Last updated

