32.7.2. Testing system start-up


<< Prev   Next >>

32.7.2.1. General information

To run the test scenario, start both the test manager and the test client. Startup order is arbitrary. It is important that by the time you start the test scenario, the test client is running and available at the address used to connect the test manager.

Starting is possible both from the command line (this method will be discussed below) and from Designer. The application that you start from Designer can be either a test manager or a test client, depending on the settings specified in the Designer settings dialog box. The mobile client can only act as the test client.

32.7.2.2. Testing client start-up

To start the test client, use the TestClient command of the command line for starting the client application. You can also specify the number of the TCP port to be used for testing manager and testing client interactions. For this, use the TPort parameter of the TestClient command. If there is no specified value for this parameter, 1538 is used. Specify this parameter if you have multiple test clients running on a single computer.

Thus, the startup line of the client application that should act as a testing client, is as follows:

1cv8c ENTERPRISE /IBName "Test Application" /TestClient ‑Tport 1843

In this example, the thin client (1cv8c) will be a test client for the Test Application infobase. It will use the 1843 TCP port to interact with the test manager.

If the client application is running as a test client, Test client will be displayed in the title of the main application window. Similar text will be also displayed in the About window.

To connect to a test client that is a thin or thick client, you need two parameters: the IP address or computer name where the test client is running, and the TCP port number to be used for interaction.

If you start a web client or a mobile client, the situation is slightly more complicated. In addition to the TestClient command, specify another command-line parameter: TestClientID=<ID>. It contains a UUID of the client application under test. To unambiguously specify the test client, in the case of a web or mobile client, you need the following parameters:

  • Address of the web server where the tested application is deployed. You do not have to know the infobase address.
  • ID of a specific instance of the application under test running on the web/mobile client.
  • TCP port number to be used by the web server to transfer data between the manager and the testing client.

Since a single web server can serve multiple infobases and multiple connections to one infobase, including for testing, instruct the web server which TCP ports must be used to interact with the test manager. To do this, use the testcfg.xml file located in 1C:Enterprise settings directory that serves the test client published on the web server.

If the test client is a mobile application created for the mobile platform, the TULR parameter of the TestClient command is added to the command line for starting the test client. The TURL parameter value indicates the publication URL of an infobase running in test manager mode. Specify the TestClientID parameter for a mobile application if several test clients are running simultaneously (similar to the web client).

You can test the mobile client using automated testing tools on your automated testing tools. To do this, follow the steps:

  • Start the test manager on your personal computer.
  • Start the test client on the mobile client running under Android in the emulator.
  • Run the test client in the mobile client under the test manager running on your personal computer.

This will require a code in 1C:Enterprise language that will start the test client in the emulator. Add this code to a configuration that creates the required infrastructure for testing and starting test scenarios. To start the mobile client in test client mode, use the following code:

PathToAndroidSDK = "<Path to the root directory of Android SDK>";
ApplicationID = "<ID of the application to start>";
PublicationURL = "http://host/test";
Command = PathToAndroidSDK + "\platform-tools\adb.exe shell am broadcast ‑-user current ‑n " + ApplicationID + "/com.e1c.mobile.Starter ‑a com.e1c.mobile.START_CMD ‑es cmd '/WS "+ PublicationURL + " /TestClient'";
Await RunAppAsync(Command);

See also:

  • Command line to launch the client application
  • The testcfg.xml file

32.7.2.3. Testing manager start-up

To run the test scenario, start the client application in test manager mode. Use the TestManager command-line key to run the client application. You cannot use the web client as a test manager.

Thus, the startup line of the client application that should act as a testing client, is as follows:

1cv8c ENTERPRISE /IBName "Test Manager" /TestManager

If the client application is started as a test manager, the text Test Manager will be displayed in the title of the main application window. Similar text will be also displayed in the About window.

32.7.2.4. Starting in interactive action log record mode

The client application is started in the mode that allows you to record interactive actions, either using the UILogRecorder command line key or using the appropriate command of Designer menu Service ‑ Start to record the user actions log.

You can also specify the IP port number to be used by the testing manager to control recording of the interactive action log. To do this, use the TPort parameter of the UILogRecorder command. If there is no specified value for this parameter, 1538 is used. You can also select the location where the system will save the log file. To do this, use the File parameter of the UILogRecorder command. If this parameter is not specified, after the file is recorded, the client application opens a text document window containing the saved log.

Thus, the startup line of the client application, which should allow to generate a log of interactive actions, looks as follows:

1cv8c ENTERPRISE /IBName "Test Manager" /UILogRecorder

With this launch, an appropriate command bar is added to the upper right corner of the main window of the client application that controls the journal entry.

Fig. 638. Testing command bar

Numbers refer to the following:

  1. The button to start recording the user action log.

If you click the only available button on this panel, the recording of user actions will begin. The panel will also change its type (all buttons will become available).

Fig. 639. Testing command bar during recording

Numbers refer to the following:

  1. The button to temporarily stop/continue recording the user action log.
  2. The button to stop recording the user action log. The action log written up to the time you clicked the button will be lost.
  3. Finish recoding user actions. After you finish the recording, the list of actions will be written to a file (if the File parameter is specified) or a text document window with the list of actions will be opened.

If a mobile client acts as a client application, note the following features:

  • The developer's mobile client always runs in user action log record mode. To manage the recoding of user actions, click Service and settings ‑ Log user actions.
  • For the UILogRecorder command specified in the command line for starting the mobile client, only the File parameter is available. The file with the recorded scenario will be on the device where it was recorded. The TPort parameter is not used in the mobile client.

<< Prev   Next >>

Icon/Social/001 Icon/Social/006 Icon/Social/005 Icon/Social/004 Icon/Social/002