CLI Reference
tap.exe runner start
Starts the Runner using the config located at <OpenTapInstallation>/Config/runner.json. See Runner Config section for configuration
Arguments:
--listen : IP address of the interface and port for the internal NATS server to listen on. Default is 127.0.0.1:20111. When registered to KS8500, only the loopback interface is allowed.
Environment variables:
OPENTAP_RUNNER_TOKEN
If RunnerRegistrationUrl is specified in config, and OPENTAP_RUNNER_TOKEN environment variable is set and the CredentialsFilePath is either not set or does not exist, a registration flow will start, similar to the runner register CLI action by using the RunnerRegistrationUrl and RunnerRegistrationToken specified in the configuration file.
If RunnerRegistrationUrl is specified in config, and OPENTAP_RUNNER_TOKEN environment variable is set and the connection is refused by the server due to an Autorization Violation exception, a registration flow will start and if the registration is successful another connection will be attempted.
tap.exe runner session
Starts a Runner Session that can be connected to via NATS.
Arguments:
--id : Guid formatted ID. Used as Session ID. Default is a new random GUID.
--nats-server : NATS Servers to connect to. Multiple entries is supported. Default is nats://localhost:4222.
--log : Specify log file location. This is a standard OpenTAP option that controls where session logs are written. Default is ./SessionLogs.
Standard OpenTAP options are also available:
-v, --verbose : Show verbose/debug-level log messages.
-c, --color : Color messages according to their severity.
-q, --quiet : Quiet console logging.
The session will have the following NATS subject structure:
OpenTap.Session.{ID}
tap.exe runner register
Sets up a new <OpenTapInstallation>/Config/runner.json config file and registers the runner at the specified --url using the --token as authentication and sets the --name as the display name of the runner.
Arguments:
--config : File path to config file
--url : Runners Service Registration Url
--token : Runners Service Registration Token
--name : Display name of the runner
--nats-server : NATS Server to connect to
--capability : Add capability tags
Environment variables:
OPENTAP_RUNNER_TOKEN
Runner Configuration
{
// Display name sent to Runner Service as part of registration and also used in the connection name to NATS.
"Name": "John Runner",
// Directory to store session logs. Created Sessions will also store their sessionlogs at this location.
"LogDestination": "./SessionLogs",
// A performance optimization in image creation. If a previously resolved image is requested again, do not consult repositories, just return last resolved image
"UseImageCache": true,
// Runner Service url. If this is set, the Runner will register and store registration details in the runner.json config
"RunnerRegistrationUrl": "http://runner-url.com",
// Tags to specify the capabilities of this runner. TestPlans created on this Runner will default request to be loaded in Runners with these tags
"Capabilities": [
"PowerAnalyzer",
"SCPI"
],
// Connect to specified NATS servers. If registering using the "RunnerRegistrationUrl", leave this empty to use servers retrieved by the registration process
// If "ws://" or "wss://" scheme is used, the Runner will use the "NATS Server" TapPackage and connect as a leaf server. This eliminates firewall issues.
"NatsUrls": [
"nats://nats:4222"
],
// Enables JWT Bearer token authentication of incomming requests. The signing keys are retrieved by the runner using <AuthUrl>/.well-known/openid-configuration.
"AuthUrl": "http://keycloak.ks8500-url.com/auth/realms/Default",
// Default domain. Client's using SetAccessToken will set their access tokens against this domain.
"DefaultDomain": "http://ks8500-url.com",
// Preconfigured NATS Seed. The Runner will register towards RunnerRegistrationUrl using this seed. If not specified, a new seed will be generated
"NatsSeed": "SUAO4HD23JK4UCLUO2BCQ3FGHNTJ4UOBP3B2G5AS7MABB4ANFSN4RIF27U"
}
Configuration can be overwritten using environment variables. The variables are prefixed with OPENTAP_RUNNER_.
Examples:
- To change the
LogDestination, setOPENTAP_RUNNER_LOGDESTINATION=<DesiredLogDirectory> - To change an array, e.g. the
NatsUrls, setOPENTAP_RUNNER_NATSURLS__0=<Index 0 Nats URL>