Modifying testvar values at runtime

Testvar values can be temporarily overridden at runtime when launching a package. This allows quick, non-permanent changes without modifying the config file—ideal for debugging, experimentation, and automation workflows.

To begin, click Add a testvar in the package launch dialog:

You can add multiple testvars to the main group or to specific testvar groups. Individual testvars and entire groups can be deleted as needed.

This functionality is also available via the CDRouter Web API for integration with automated testing and CI/CD systems.

To override testvars via the API, send a POST request as described in the “Launch a job” section of the documentation. Include testvar details in JSON format within the request body.

The following example shows the JSON payload corresponding to the screenshot above:

POST /api/v1/jobs/
{
  "package_id": "123",
  "options": {
    "testvars": [
      {
        "group": "main",
        "name": "lanInterface",
        "value": "eth4"
      },
      {
        "group": "lan2",
        "name": "lanInterface",
        "value": "eth5"
      },
      {
        "group": "main",
        "name": "lanSSID",
        "action": "delete-testvar"
      },
      {
        "group": "lan3",
        "name": "lanSSID",
        "action": "delete-testvar"
      },
      {
        "group": "lan4",
        "action": "delete-group"
      }
    ]
  }
}