Testing SAP Web

Applies to TestComplete 15.45, last modified on December 01, 2022

SAP ERP is a resource-planning solution by SAP SE for managing business processes. To access SAP solution features, a web interface, Web GUI, can be used.

In TestComplete, you can create automated tests that simulate user actions over the SAP GUI Web interface. TestComplete recognizes individual web elements on web pages, and you can record (or create from scratch) and then run tests that interact with those elements. For example, the tests can simulate various user actions, like clicks, double-clicks, typing text, and so on. The tests can also verify the state of web elements, for example, check the text that an element shows or the state of a check box.

Requirements

  • An active license for the TestComplete Web module.

  • The Web Testing plugin must be enabled in TestComplete (it is installed and enabled by default).

  • One of the following browsers must be installed on your TestComplete workstation and be prepared for testing:

    • Microsoft Edge 83 - 103 (based on the Chromium engine, both 32-bit and 64-bit versions)

      Note: The non-Chromium version of Edge is not supported.

    • Microsoft Internet Explorer 11 (both 32-bit and 64-bit versions)

      Note: The Modern UI (Metro) version of Internet Explorer 11 is not currently supported.

    • Google Chrome 103 (both 32- and 64-bit versions)

      If you use a later version of Google Chrome, check whether a patch is available for it.

    • Mozilla Firefox 91 - 102.1 ESR, 94 - 102 (both 32-bit and 64-bit versions)

      If you use a later version of Firefox, check whether a patch is available for it.

    To learn how to prepare web browsers for testing, see Preparing Web Browsers.

  • If you are planning to run tests in remote environments, also see the requirements for cross-platform web tests.

Creating and recording tests for SAP Web

To create a test, you can record user actions over the SAP Web interface in one of the supported web browsers, or you can create a test from scratch. The easiest way to create a test is to record it:

  1. In TestComplete, start recording.

  2. Launch your web browser.

  3. Navigate to the SAP Web pages, interact with them as an end user would: click the links, input data into forms, and so on.

  4. Stop the recording.

TestComplete will process the performed actions and generate the test. The images below show an example of a recorded test that simulates user actions over SAP Web:

A keyword test

Recorded keyword test that simulates user actions over SAP Web

Click the image to enlarge it.

A script test

Recorded script test that simulates user actions over SAP Web

Click the image to enlarge it.

The test consists of a sequence of operations that simulate user actions over SAP Web pages.

Identifying and storing objects of the SAP Web

In TestComplete, for an automated test to be able to simulate any user action over the SAP Web (or any other tested application), it must find the target object over which the action is to be simulated.

By default, when you record a test, TestComplete automatically adds objects with which you are interacting to the Name Mapping repository of the TestComplete project. For each object it adds, it assigns an alias, a short name to use to refer the object from tests, and recognition criteria that will be used to locate the object during the test run.

SAP Web objects added to the Name Mapping repository

Click the image to enlarge it.

To learn more about working with the Name Mapping repository, see Name Mapping.

Running tests

On local computers

You can run the recorded automated test on your local computer as is. The easiest way to run a test is to click Run:

Running a recorded keyword test on a local computer

TestComplete will run all recorded test operations. This way, it will repeat all user actions that were performed during the test recording.

In remote environments

In TestComplete, you can connect your project to remote environments and run tests there. This way, you can check how your tested web application or web page functions in various web browsers and on various operating systems, including those that TestComplete does not support directly, for example, non-Windows operating systems. Organize test runs in remote environments by using the Execution Plan editor of your project:

Running tests in remote environments

Click the image to enlarge it.

To learn more about this, see About Cross-Platform Web Tests.

Viewing test results

After the test run is over, you can view the results in TestComplete. The results include the overall test status (pass, fail, pass with warnings) and detailed data on each simulated user actions:

Test log

Click the image to enlarge it.

See Also

Testing Enterprise Applications
Testing SAP GUI
About Cross-Platform Web Tests

Highlight search results