About
To run automated tests that simulate user actions over GUI, the test engine requires an interactive user session to be opened on your test workstation. Otherwise, the test engine will not be able to access the GUI and tests will fail. If your tests run in an unattended mode (for example, if they are run on remote test agents controlled by a continuous integration system), your testing environment must have an interactive session opened before the testing starts.
To open user sessions and start test runs, you can use the SessionCreator utility. The utility is shipped with TestExecute for TestLeft. It allows opening interactive user sessions so that the test engine is able to interact with GUI. You can use the utility to create a user session using the specified credentials or connect to an existing session and then command the product to launch the REST service on the specified port.
You control the utility by using command line.
Command-Line Syntax
The SessionCreator utility command line is as follows:
SessionCreator.exe StartRestServer [/RestServerPort:port_number /UserName:user_name /Password:password | /PasswordFile:password_file_name [/UseActiveSession]] [/AccessKey:access_key] [/Help]
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 TestExecute.
-
The SessionCreator 64-bit executable is located in the <TestLeft>\x64\Bin folder. It controls the 64-bit version of TestExecute.
/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.
/Password:password
Specifies the password that will be used to start a session or to connect to an existing session.
The password will not be encrypted.
/PasswordFile:password_file_name
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 will start a new session using the provided credentials.
/AccessKey:access_key
If you use SmartBear License Management to control your product licenses, use this parameter to specify the access key assigned to your SmartBear account. This key will be used to license the product instance.
/Help (or /H)
Shows information on the StartRestServer
command.
Examples
Below are several examples of how to use the utility to start interactive user sessions and 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 the help viewer’s 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 TestExecute 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 starts a user session and commands TestExecute to start its REST service. The service will be available through the specified port:
SessionCreator.exe StartRestServer /RestServerPort:6001 /UserName:Tester /password:mypassword1
Exit Codes
The SessionCreator utility provides the following exit codes:
Exit Code | Description |
---|---|
7 | Failed to run TestExecute for TestLeft. |
8 | Failed to parse the specified command. |
127 | Unable to launch the product, because some product files are missing or the installation is damaged. |
1000 | Unable to launch the product, because another instance of the product is already running. |
1001 | Unable to start the product, because there is not enough free disk space. |
-1 | Unable to launch the product because the license check has failed and the product cannot obtain a license. You can find information on licensing in Licensing TestExecute.
You can view the Silent.log file to get more information on possible reasons of the license check failure. The file is in the <System_Drive>:\Users\<User_Name>\AppData\Roaming\SmartBear\TestComplete\14.0 folder. To resolve licensing problems, you can use the Licensing Troubleshooter on our web site: |
Other codes | You may receive codes different from those above (for example, -10, -12). This can happen if your operating system, firewall, or a third-party application that manages TestExecute test runs overwrites the actual TestExecute exit code. In this case, to learn the received exit code definition, contact your system administrator or the SmartBear Support team. |
The SessionCreator 32-bit executable is located in the <TestLeft>\Bin folder. It controls the 32-bit version of the product.
The SessionCreator 64-bit executable is located in the <TestLeft>\x64\Bin folder. It controls the 64-bit version of the product.
The SessionCreator 32-bit executable is located in the <TestLeft>\Bin folder. It controls the 32-bit version of the product.
The SessionCreator 64-bit executable is located in the <TestLeft>\x64\Bin folder. It controls the 64-bit version of the product.
The SessionCreator 32-bit executable is located in the <TestLeft>\Bin folder. It controls the 32-bit version of the product.
The SessionCreator 64-bit executable is located in the <TestLeft>\x64\Bin folder. It controls the 64-bit version of the product.
The SessionCreator 32-bit executable is located in the <TestLeft>\Bin folder. It controls the 32-bit version of the product.
The SessionCreator 64-bit executable is located in the <TestLeft>\x64\Bin folder. It controls the 64-bit version of the product.
The SessionCreator 32-bit executable is located in the <TestLeft>\Bin folder. It controls the 32-bit version of the product.
The SessionCreator 64-bit executable is located in the <TestLeft>\x64\Bin folder. It controls the 64-bit version of the product.
The SessionCreator 32-bit executable is located in the <TestLeft>\Bin folder. It controls the 32-bit version of the product.
The SessionCreator 64-bit executable is located in the <TestLeft>\x64\Bin folder. It controls the 64-bit version of the product.
The SessionCreator 32-bit executable is located in the <TestLeft>\Bin folder. It controls the 32-bit version of the product.
The SessionCreator 64-bit executable is located in the <TestLeft>\x64\Bin folder. It controls the 64-bit version of the product.
The SessionCreator 32-bit executable is located in the <TestLeft>\Bin folder. It controls the 32-bit version of the product.
The SessionCreator 64-bit executable is located in the <TestLeft>\x64\Bin folder. It controls the 64-bit version of the product.
The SessionCreator 32-bit executable is located in the <TestLeft>\Bin folder. It controls the 32-bit version of the product.
The SessionCreator 64-bit executable is located in the <TestLeft>\x64\Bin folder. It controls the 64-bit version of the product.
The SessionCreator 32-bit executable is located in the <TestLeft>\Bin folder. It controls the 32-bit version of the product.
The SessionCreator 64-bit executable is located in the <TestLeft>\x64\Bin folder. It controls the 64-bit version of the product.
The SessionCreator 32-bit executable is located in the <TestLeft>\Bin folder. It controls the 32-bit version of the product.
The SessionCreator 64-bit executable is located in the <TestLeft>\x64\Bin folder. It controls the 64-bit version of the product.