You can record business scenarios and create automated test cases with component-based test automation.
You can create tests and components from the screens of a transaction, and parameterize them. These tests are for a single transaction and can be combined into a scenario test. You maintain the components in the test composition environment.
Note
You can test the following types of applications:
SAP ABAP servers:
SAP GUI
SAP CRM Web Client
Web Dynpro ABAP
Business Server Pages (BSP)
Web GUI (SAP GUI for HTML)
SAP Java servers:
SAP Portal
Java Web Dynpro
Web servers:
URL (HTML pages)
SAP UI5
Note
There are limitations to the scope of CBTA. For more information, see SAP note 1835958.
To cover special use cases, you have the following options:
To compose tests manually, to reuse parts of existing tests, or modify tests (add certain conditions, for example), you can create screen components for ABAP Web Dynpro applications.
For more information, see “ABAP Web Dynpro Screen Components”.
To retrieve information from a message that the application displays in the message area, you can the default component CBTA_WEB_A_GETMESSAGEPARAMS
. You add it to the generated test script, manually.
For more information, see “CBTA 3.0 SP02 – Working with Message Parameters” (http://service.sap.com/~sapidb/011000358700000195142014E.PDF) on SAP Service Marketplace at .
You have installed the Component-Based Test Automation client on your local machine. For more information, see Installing and Configuring the CBTA Client.
You have created a test profile. For more information, see Creating a Test Profile With Logon Data for SUTs.
You have created a test configuration or a test script and are editing it in the test composition environment. For more information, see Creating a Test Configuration or a Test Script.
You have maintained the attributes of the test configuration or a test script. For more information, see Maintaining SAP Attributes on the Attributes Tab Page.
Save your entries.
Choose Launch CBTA
.
Logon to the system under test.
The Test Creation Wizard
starts.
Optional: Replace the default analysis name with a more meaningful one.
To confirm, choose Next
.
The executable starts. The Test Creation Wizard
is in recording mode.
Perform the business process.
Optional: To add a checkpoint, do the following:
In the Test Creation Wizard
, choose Add Checkpoint
.
Click the UI control to be checked.
The UI control is listed in the test creation wizard.
Optional: Change the property to be checked.
When changing this property, its value is displayed.
Optional: Change the operator and value to be checked.
Optional: To add a screenshot to the execution report, choose Insert Screenshot
.
To stop the recording, in the Test Creation Wizard
choose Stop the PFA and validate
.
Choose Next
.
The structure of the process flow is displayed.
Verify that the business process has been recorded correctly and completely .
To create the test, choose Next
.
To cancel the recording, choose Cancel
.
The test script and test components required are generated and uploaded to the SAP Solution Manager.
Choose Finish
.
In the test composition environment, choose Refresh
.
The test composition environment is updated with the results of the recording. The test script parameters, if defined, are displayed on the Parameters
tab page.
To define a checkpoint, choose Add Checkpoint
in the test creation wizard for recording.
In the tested application, select the UI element to be checked.
In the test creation wizard, a new line has been added to the list of steps. The list of properties that can be checked is automatically retrieved according to the UI element type.
If the UI element is still visible in the tested application, the value of the property selected in the wizard will be automatically filled and updated.
Select the checkpoint type:
Check Data
: If you want to perform a check, select Check Data
. Under Parameters
, select the operator of the check to perform. You can set a value for the check or keep the default, which is retrieved only if the UI control that is targeted by the check is still available in the tested application. If the tested application is updated asynchronously, select Data Updated Asynchronously
under Options
, to perform the check repeatedly until it succeeds or until a timeout is reached. Use this option when the test execution must wait for an unknown time, for example until a background job has finished. When this option is selected, you can set some additional parameters under Options
:
Initial Wait Time
: The time to wait before the first execution of the check.
Interval
: The time to wait between two executions of the check.
Timeout
: The total time during which checks will be performed.
The Options
field under Parameters
is automatically updated according to the value of these parameters. This value is set for the OPTIONS
parameter of the CBTA_WEB_CHECKPROPERTY
default component instance, which will be inserted in the generated test. You can also define this value later in the test composition environment.
Get Data
: If you only need this checkpoint to make the UI element property value available for another step, set the checkpoint type to Get Data
. No check is performed. You do not need to define an operator and a value, so these fields are disabled under Parameters
. A CBTA_WEB_GETPROPERTY
(or CBTA_WEB_GETATTRIBUTE
) default component is inserted in the generated test. An output parameter exposes the value of the selected property for the targeted UI element. This value is also stored in the execution context.
Adding Screenshots: To make the report of the execution of a test more readable, you can insert some instances of the default component CBTA_WEB_CAPTURESCREEN
in the test during recording. To append the screenshot step to the recording, choose Add Screenshot
. Alternatively, right-click a step under Steps
and choose Insert Screenshot
. A new step for a screen capture is inserted under Steps
.
Removing Steps: Select a step and choose Remove
to delete a step from the current recording. Note that this can result in a non-executable test if you remove a mandatory step.
Pausing: To pause a recording, choose Pause
. To continue, choose Resume
.