To run automated tests that simulate user actions over the GUI, TestLeft requires that an interactive user session be opened on your test workstation. Otherwise, the test engine will not be able to access the GUI and your tests will fail. If your tests run in unattended mode (for example, if they are run on remote test agents controlled by a continuous integration system), an interactive session must be opened in your testing environment before the testing process starts.
To open user sessions, you can use the SessionCreator utility. The utility is shipped with TestLeft (as well as with TestExecute and TestComplete). It allows opening interactive user sessions to allow the test engine to interact with the GUI. You can use the utility to create a user session using the specified credentials or to connect to an existing session, and to launch a REST service on the specified port.
You control the utility via the command line.
The SessionCreator utility command line is as follows:
Here, the pipe character means
OR. The square brackets mean that the argument or a group of arguments is optional.
Note: The utility has 32-bit and 64-bit executables:
The SessionCreator 32-bit executable is located in the <TestLeft>\Bin folder. It controls the 32-bit version of TestLeft.
The SessionCreator 64-bit executable is located in the <TestLeft>\x64\Bin folder. It controls the 64-bit version of TestLeft.
/RestServerPort:port_number (or /R:port_number)
Specifies a port for the RESTful web service. The default value is 2377.
/UserName:user_name (or /u:user_name)
Specifies the user name that will be used to start a session or to connect to an existing session.
Specifies the password that will be used to start a session or to connect to an existing session.
The password will not be encrypted.
Specifies the file from which the utility will read the password that will be used to start a session or to connect to an existing session. The file must support the UTF-8 encoding and must reside in a location where the utility can access it.
/UseActiveSession (or /UA)
Specifies whether the utility will use the currently active session. If you omit this parameter, the utility will stop the current session and start a new session using the provided credentials.
/Help (or /H)
Shows information on the
Below are several examples of using the utility. They show how to start interactive user sessions and how to start the REST web service.
|Note:||The sample command lines below may split into two or more lines. This is a visual effect that depends on the width of your web browser window. When specifying a command line for the utility, type all the command-line arguments in the same line.|
The following command starts a user session and commands TestLeft to start its REST service. The REST service will be available through the default port (2377):
SessionCreator.exe StartRestServer /UserName:Tester /password:mypassword1
The following command connects to the specified user session and commands TestLeft to start its REST service:
SessionCreator.exe StartRestServer /UserName:Tester /password:mypassword1 /UseActiveSession
The following command starts a user session and commands TestLeft to start its REST service. The service will be available through the specified port:
SessionCreator.exe StartRestServer /RestServerPort:6001 /UserName:Tester /password:mypassword1