Configuration & start

After you have installed the Test Workflow Studio and do not want to use it exclusively locally, the agent and the Studio must be configured. The configuration files specify the name of the component and the connection data for connecting to the TWS server.

These files can be edited with any common editor e.g. the Windows Editor or Notepad++.


Server

Overview

The server is used to centrally connect all components used by TWS (Agent, Studio) - so they can communicate with each other.

Configuration

The server does not have to be configured and can be started right away.

Starting

Requirements

  • TWS is installed

Studio

Overview

The Studio is the interface between the user and other components of the TWS.

Configuration

Configuration of the Studio is necessary if you do not want to connect to a local server.

The Studio has to properties, that are relevant to a user:

  • studioName: The name, so a unique identifier of the Studio
  • service: The address of the server that it will connect to
  • WorkflowHistory: The number of last opened workflows shown in the Studio

Configuration file

By default the configuration file appsettingsStudio.json will be found under the path

C:\Program Files\Hauertmann IT-Consulting\Test Workflow Studio\bin
{
  "studioConfig": {
    "ClientSettingsProvider.ServiceUri": "",
    "studioName": "Studio",
    "service": "net.tcp://localhost/Studios",
    "Guid": "12345678-1234-1234-1234-1234567890ab",
    "WorkflowHistory": "5",
    "ApplicationInsightsInstrumentationKey": "7f8939dc-fa7e-43b6-ab46-b9ae7bfa8572"
}}

If you do not make any changes to this configuration the Studio will use the default values and connect to a local server.

Example

The Studio should be called “MyStudio” and connect to the local server - the configuration file should look like this:

{
  "studioConfig": {
    "ClientSettingsProvider.ServiceUri": "",
    "studioName": "MyStudio",
    "service": "net.tcp://localhost/Studios",
    "Guid": "12345678-1234-1234-1234-1234567890ab",
    "WorkflowHistory": "5",
    "ApplicationInsightsInstrumentationKey": "7f8939dc-fa7e-43b6-ab46-b9ae7bfa8572"
}}

The Studio can now be started using the regular TestWorkflows.Studio.exe-file and automatically use these settings.

Changing the language of the Studio

The following steps are required to change the language of the Studio and components

Step 1: Opens the settings on the computer Step 2: Click on “Time and Language”. Step 3: Click on “Region and Language”. Step 4: Choose the language you want. Step 5: Choose the country where the language is spoken. Step 6: Register once again.

Starting

Requirements

  • TWS is installed
  • Server is started

To start the Studio it is required to have a server running, since the Studio will try to connect to a server once its started and its process will terminate if it can’t connect to one.


Agent

Overview

The agent is used to record user-interactions in different applications and transform them into a playable workflow.

While recording, the agent sends informations to the server, where recorded interactions are transformed into activites and put into the workspace of the Studio

Configuration

Custom configuration of an agent is necessary to clearly distinguish one agent from the other, either simply by its name or by its capabilities - for example that the agent is running on a linux system or specific programs that you want to test are installed on its system.

The agent has three properties, that are of importance to a user:

  • AgentId: The name, a unique identifier
  • ServiceAddress: The adress of the server that the agent will connect to
  • Capabilities: The capabilities of the agent

To configure these properties before starting an agent, you have two options:

For Windows you will find the configuration file appsettings.json & the agents executable under:

>C:\Program Files\Hauertmann IT-Consulting\Test Workflow Studio\agent\win\bin\

And for Linux under:

>C:\Program Files\Hauertmann IT-Consulting\Test Workflow Studio\agent\linux\bin\

Configuration file

This settings file looks like this:

{
  "agent": {
    "AgentId": "",
    "ServiceAddress": "",
    "Capabilities": ""
  },
}

Should you not change any settings before starting the agent it will be started using default settings.

Example

Like in the example from the command line the agent should have the agentId “AgentForLinux”, connect to the local server and have the capability “Linux” - so the settings file should look like this:

{
  "agent": {
    "AgentId": "AgentForLinux",
    "ServiceAddress": "",
    "Capabilities": „Linux“
  },
}

Now this agent can be started by using the .exe file that’s in the same directory as the settings file.

Command line

You can start the agent using the command line or PowerShell with parameters or without parameters without having to configure the configuration file every time you want to start another agent

Start the PowerShell or command line in the folder that contains the agent.

Starting

Requirements

  • TWS is installed
  • Server is started

To start the agent, it is mandatory to have a started server running - the agent tries to connect to this server at startup - if it does not exist, it waits until the server is started at the specified service address.

Start via .exe file

Under the path given above you will find the TestWorkflows.Agent.exe. The agent loads the configuration file and connects to the server with the specified address.

Start and configuration by command line

You can start the agent by using the command-line (PowerShell) with paramaters to define its configuration without having to reconfigure its settings file every time you want to start another agent:

To do this just start the Command Line or PowerShell in its directory.

By default this directory will be for the windows agent:

C:\Program Files\Hauertmann IT-Consulting\Test Workflow Studio\agent\win\bin

And for the linux agent:

C:\Program Files\Hauertmann IT-Consulting\Test Workflow Studio\agent\linux\bin

Start without parameters

  • Enter the agents file name (default is „TestWorkflows.Agent.exe“)

The agent will be started with its default settings - meaning its agentId will be set to the name of the machine it is running on, it will connect to the server at the default adress and will have no special capabilities - so it won’t be able to run workflows that require any capabilities (like an agent running on linux).

Start with parameters

  • Enter the agents file name
  • followed directly by the parameters you want

If for example you want to start an agent with the agentId “AgentForLinux” and give it the capabilitiy “Linux”, you must use the following command in the command line or powershell:

.\TestWorkflows.Agent.exe –agent:agentid=“AgentForLinux“ –agent:Capabilities=Linux

For every following capabilitiy you would have to increase the index of the tag (since the tags are stored in an array), so if you wanted to add the second capability “Chrome” the command would have to look like this:

.\TestWorkflows.Agent.exe --agent:agentid="LocalAgent:AgentForLinux" --agent:Capabilities=Linux,Chrome

After running this command the agent with start in this command line oder powershell window and connect with the server. Once its connected to the server you will be able to use it run or record workflows on it.

_images/Agent_Konfig_PowerShell.png

To start more agents - as long as your license is not at capacity - you will have to start another command line or powershell and restart this process - just make sure to give it another agentId that no other agent currently connected to the server you’re trying to connect to is using or it won’t be able to connect to the server.


Test Adapter

_images/warning.png Warning

The Test Workflow Test Adapter can currently only be used in .NET Framework projects (from version 4.7.1).

Overview of the

The Test Workflow Test Adapter performs test workflows within the project or project collection to perform automated web testing. A test workflow playlist allows workflows to be defined and scheduled for test runs.

Configuration

The configuration takes place via the argument Server-Address, which is given during execution.

Starting

The startin and running of playlists will be described in this chapter Running->Test-Adapter.


Command Line Interface

The Test Workflow command line interface is compatible with .NET Core 2.1 supporting operating systems.

Overview

The Test Workflow command line interface offers a further option for executing test workflows in addition to the Studio and the Test Adapter.

Configuration

The command line interface is configured by the parameters used when starting it.

-server <SERVER_ADRESSE>

You can either enter a custom server adress or the cli will use a default local adress (localhost). tws-cli.exe -server 192.168.0.1

Starting

Starting and running a playlist will be described in this chapter Running->CommandLineInterface