How do I update my automated test scripts to use CDRouter's web CLI
Any scripts that currently use the cdrouter-cli
command line can be easily
updated to use CDRouter’s web CLI instead
by following the steps below.
Convert Scripts to CDRouter Web CLI Format
-
Step 1: Import your configuration file(s) using CDRouter’s web interface
-
Step 2: Create new test packages from CDRouter’s web interface that reference the config files created in Step 1 and call the tests and run-time options you were previously executing from the command line
-
Step 3: Modify your script(s) to launch the test package(s) created in Step 2 using the CDRouter web CLI’s
-package
command
Example Script Using cdrouter -package
Command
#!/bin/sh
cdrouter -package my_package
Note that multiple test packages can also be run from the same script using the
-wait
option. This forces CDRouter’s web CLI to wait until the package has
finished before executing the next package.
Example Script Using -wait
Option
#!/bin/sh
cdrouter -package config_a -wait
cdrouter -package config_b -wait
cdrouter -package config_c -wait
Tags can also be specified from the command line. Tags provide additional meta information about configs, packages, and results that can be useful for managing and organizing the resources on your CDRouter system.
Example Script Using -tags
Option
#!/bin/sh
cdrouter -package config_a -tags "new firmware"
cdrouter -package config_b -tags v1.1,rc2
cdrouter -package config_c -tags tester-$USERNAME
Notes
-
You can monitor the progress of all test packages launched from CDRouter’s web CLI on the web interface.
-
CDRouter will still prompt you to restart the device under test unless a restart script has been configured. Please see this Knowledge Base article for more information on skipping the restart prompt at startup.