WindowsExecutor Operator

The WindowsExecutor operator executes a command on a target Windows machine using WinRM.

The command can be anything that runs on a Windows Command Prompt.

Operator arguments

NameTypeValue RestrictionsRequiredDefaultDescription

command

String

Yes

The command to be executed on the remote machine

host

Object

It should have a structure like the one described here below

No

Information relative to the target machine onto which the command has to be executed

component

String

It should match the name of an existing Component of the System under test

No

The name of the Component whose properties can be used as arguments of the operator

host structure and arguments

Here follows the structure of the host argument

host:
  protocol: [https|http]
  hostname: this_is_a_hostname
  port: 5863
  path: /wsman
  username: this_is_a_username
  password: this_is_a_password
  validateCertificate: false

with its arguments:

NameTypeValue RestrictionsRequiredDefaultDescription

protocol

String

  • https

  • http

Yes, if the Component whose name is defined in component hasn’t a property named host->protocol

https

The protocol to use to connect to the Windows machine with WinRM

hostname

String

Valid FQDN or ip address

Yes, if the Component whose name is defined in component hasn’t a property named host->hostname

-

Windows machine’s hostname

port

Number

1≤port≤65532

Yes, if the Component whose name is defined in component hasn’t a property named host->port

5863

WinRM port

path

String

-

Yes, if the Component whose name is defined in component hasn’t a property named host->path

/wsman

The path where WinRM is listening

username

String

  • username

  • domain\username

  • username@domain

Yes, if the Component whose name is defined in component hasn’t a property named host->hostname

-

User login (domain or local)

password

String

-

Yes, if the Component whose name is defined in component hasn’t a property named host->password

-

Login password

authType

String

  • ntlm

  • ssl

Yes, if the Component whose name is defined in component hasn’t a property named host->authType

ntlm

The authentication method to use against Windows machine

validateCertificate

Boolean

  • true

  • false

Yes, if the Component whose name is defined in component hasn’t a property named host->validateCertificate

False

Whether or not validate the server certificate

ca

String

A valid CA certificate

Yes, if the Component whose name is defined in component hasn’t a property named host->ca

-

The CA that is required to validate the servier certificate

operationTimeoutSec

Integer

Must be greather then 0

No

The amount in seconds after which the execution of the command is considered failed

Notice that the ouput of the command doesn’t reset the timeout.

readTimeoutSec

Integer

Must be greather then operationTimeoutSec

No

The amount of seconds to wait before an HTTP connect/read times out

Get operator arguments from component

The component argument can refer to a Component by name and use its properties as the arguments of the operator. In case the mapped arguments are already provided to the operator, there is no override.

Here is an example of a component that overrides the host and the command arguments:

name: LoadRunnerMachine
componentType: WebApplication
properties:
  command: "dir c:\"
  host:
    hostname: lr.mydomain.com
    username: MyLoadRunnerUser
    password: MyPassword

Examples

Execute a dir command with explicit host information

name: TestConnectivity
operator: WindowsExecutor
arguments:
  command: "dir c:\"
  host:
    hostname: frontend.akamas.io
    username: administrator
    password: MyPassword

Execute a dir command with host information taken from a Component

name: TestConnectivity
operator: WindowsExecutor
arguments:
  command: "dir c:\"
  component: frontend1

Last updated