| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Please refer to the main repository for how to use these tools here
CLI tool for using the CSA Test Harness
"hostname" : "192.168.x.x" //Change this to your Raspberry Pi IP address/localhost for local developmentCommands: abort-testing Abort the current test execution available-tests Get a list of available tests project Manage the application projects run-tests Create a new test run from selected tests test-run-execution List test run executions and read logs test-runner-status Get the current Matter test runner status
Run th-cli available-tests to get a list of tests available in Test Harness, printed in YAML. For JSON respond, use th-cli available-tests --json .
Run th-cli run-tests --tests-list <tests> [--title, -n <title>] [--config, -c <config>] [--pics-config-folder, -p <pics-config-folder>] [--project-id <ID>] [--no-color] to start a new test execution.
Required:
Optional:
Run th-cli test-run-execution-history to fetch the history of test runs. Use --skip and --limit for pagination
Run th-cli test-run-execution-history --id {id} with a test run execution id to fetch the information for that test run.
For JSON respond, add --json to the command.
Run th-cli create-project --name {project name} --config {config file} to create a new project. Project name is required.
Run th-cli list-projects to fetch projects. Use --skip and --limit for pagination. Use --archived to fetch archived projects only.
Run th-cli list-projects --id {id} with a project id to fetch the information for that specific project.
For JSON respond, add --json to the command.
Run th-cli delete-project --id {id} to delete a project.
Run th-cli update-project --id {id} --config {config file} to update a project. Both parameters are required. Config must be a full test environment config file.
By default, the CLI application presents colored texts for all the available commands, specially for the log of test run executions from the th-cli run-tests command. If the users need to disable the colors from the tool's output, they may use one of the options presented below:
For the item 3 above, it's possible to change permanently adding the TH_CLI_NO_COLOR=1 variable to the shell profile (e.g. ~/.bashrc). After that, resetting that terminal or any new one will present no color for all the CLI commands.
The source files are organized in ./th_cli/.
The project uses click to declare commands. To add a new command to the CLI:
This project comes with a pre-configured dev-container for VS Code. This takes care of all dependencies and configuring type-checker, linters and auto-formatting.
A major component of the CLI is the calling the Test Harness API. We're auto-generating a python client for this API using fastapi_client based on the openapi.json published by the Test Harness backend.
To update our client:
The project dependencies are managed with Poetry. To add a new dependency, run poetry add <package-name>.
The project dependencies may be scanned to look for known vulnerabilities or conflicts for all the poetry packages configured. For that, run the following command after the tool installation to verify the current status of the required dependencies:
The GitHub Project will run linting with Black, Flake8 and mypy on PRs. But these are also available in convenient scripts:
The VS Code dev-container is also configured to do this automatically on file save.
| Back | FazBrowse Home | New Git URL |