Creating Test Manifests
🚧 Documentation under development
The RidgeRun Embedded Test Orchestrator guide is currently under active development. Some sections may be incomplete or change without notice.
Questions? Contact RidgeRun or email to support@ridgerun.com.
Creating Test Manifests
Each test is stored in its own directory under agent/tests. The directory contains a Bash script with the validation logic and a manifest.json file that describes the test.
This example creates a test that confirms that a network interface exists.
1. Create the Test Directory
Open a terminal on the embedded device and run:
cd "$HOME/embedded-testing-tool" mkdir -p agent/tests/network_interface_check
Use a short, unique directory name without spaces.
2. Create the Bash Test
Create the test entry point:
cat > agent/tests/network_interface_check/run.sh <<'EOF'
#!/usr/bin/env bash
set -euo pipefail
interface_name="${TEST_PARAM_INTERFACE_NAME:-eth0}"
echo "Checking network interface: ${interface_name}"
if ip link show "${interface_name}" > /dev/null 2>&1; then
echo "Interface ${interface_name} is available"
exit 0
fi
echo "Interface ${interface_name} was not found" >&2
exit 1
EOF
chmod +x agent/tests/network_interface_check/run.sh
A test must return exit code 0 to pass. Any other exit code produces a failed result. Text written to standard output and standard error is saved with the execution result.
3. Create the Manifest
Create manifest.json in the same directory:
cat > agent/tests/network_interface_check/manifest.json <<'EOF'
{
"id": "network_interface_check",
"name": "Network interface check",
"description": "Checks whether a network interface is available.",
"runner_type": "bash",
"entrypoint": "run.sh",
"timeout_seconds": 30,
"tags": ["ethernet", "network"],
"parameters": [
{
"name": "interface_name",
"type": "string",
"default_value": "eth0",
"description": "Network interface to validate."
}
]
}
EOF
The manifest fields are:
| Field | Required | Purpose |
|---|---|---|
id
|
Yes | Unique test identifier. It should match the test directory name. |
name
|
Yes | Friendly name displayed in the dashboard. |
description
|
No | Short explanation of what the test validates. |
runner_type
|
Yes | Script runner. Use bash for Bash tests.
|
entrypoint
|
Yes | Script executed by the agent. |
timeout_seconds
|
No | Maximum execution time. The default is 30 seconds. |
tags
|
No | Labels used to describe the tested area. |
parameters
|
No | Values that users can configure when assigning the test. |
4. Use Test Parameters
Each parameter is passed to the script as an environment variable. The name is converted to uppercase and prefixed with TEST_PARAM_.
For example, interface_name becomes:
TEST_PARAM_INTERFACE_NAME
Supported parameter types are string, number, integer, and boolean. The complete configured parameter set is also available in TEST_PARAMETERS_JSON.
5. Check the Test Files
Validate the JSON and run the script locally:
python3 -m json.tool agent/tests/network_interface_check/manifest.json > /dev/null TEST_PARAM_INTERFACE_NAME=eth0 agent/tests/network_interface_check/run.sh echo "Exit code: $?"
Review the output and confirm that the exit code matches the expected result.
6. Restart the Device Agent
Stop the running device agent with Ctrl+C, then start it again using the same configuration from Starting the System.
The agent discovers manifests when it starts and sends the updated test list to the server.
Open Available Tests in the dashboard, select the device, and search for network_interface_check.
If the test does not appear, review the device agent terminal for a manifest loading error.
Next Step
The new test is now available to the Test Orchestrator. Continue to Assigning and Configuring Tests to select it for a device and set its parameter values.