Show TOC

Procedure documentationCreating a Login Schema

 

To be able to automate Web scenarios, the recorder and the execution engine must be able to log automatically into the system under test (SUT), using its login page. Because there are different login pages in the SUTs, the user must define a login schema by specifying Uniform Resource Identifiers (URIs) of the UI elements.

A login schema can define URIs of input fields, buttons, checkboxes, and links, for example.

To make its definition easier, you can use an assistant to define the URI of the login page elements.

With CBTA the NW_STANDARD_LOGON login schema is provided, which you can use to record and to execute test scripts on SAP NetWeaver Java systems with at least version 7.01.

All login schemas are stored in the MIME repository (SE80) of the SAP Solution Manager system.

A login schema contains three parts: pre-login steps, login steps, and post-login steps. Each part contains some actions. An action is defined by an URI and an optional value. This value is used when the action needs a parameter, for example to set a value in an input field or to select a checkbox (in that case, the value would be checked). You cannot define values for the user field, the password field, and the login button.

  • Pre-login steps

    Perform mandatory actions before entering the user name and the password. You can define as many actions as required.

  • Login steps

    Main part of a login schema. Define three mandatory URIs:

    • Entry field for the user name

    • Entry field for the password

    • Pushbutton or link to activate the validation of the credentials

    If the login screen contains other fields (to specify the language, for example), you can define additional URIs. Such actions are performed before the user credentials are confirmed.

  • Post-login steps

    If some steps are to be performed after the login button has been pressed, you can define post-login actions. You can define as many actions as required.

Prerequisites

You are editing a CBTA-based test configuration, the executable type is URL.

Note Note

Only use non-production users and systems.

Do not use a login schema in a test script if its test profile refers to an SUT for which you have configured anonymous URI-based SUT access. For more information, see Creating a Test Profile With Logon Data for SUTs.

End of the note.

Procedure

  1. Open the logon page of the application to be tested.

  2. On the Attributes tab page, under Additional Test Options, choose F4 help the login Sschema .

    A dialog box appears.Existing login schemas found in the MIME repository are displayed.

    By default, CBTA provides the NW_STANDARD_LOGON login schema, which you can use to record and execute test scripts on Java systems (version 7.01 or higher).

  3. Choose Create.

    The Login Schema Creation Wizard is displayed.

  4. Enter data as required.

    If you enter the name of an existing login schema, a counter suffix is added by default. To overwrite an existing login schema, choose the Overwrite existing login schema field.

  5. In the Login Schema Wizard, choose the Refresh button.

  6. In the list of available sessions, select the session corresponding to the logon page of the tested application.

  7. Define the URIs of the logon page:

    1. Choose the Spy button of the field that you want to identify, for example the user name field.

    2. Switch to the logon page of the tested application.

    3. On the logon page, position the mouse on an object (in our example, the user name field).

      UI elements under the mouse are be highlighted. If UI elements are not highlighted correctly, check the zoom factor in MS Internet Explorer which must be 100%.

    4. Click the object you want to identify (the user name field, in our example).

    5. Go back to the Login Schema Creation Wizard.

      The URI of the selected UI element is displayed in the corresponding field.

    6. Repeat the previous step for all UI elements to be specified. The following fields are mandatory:

      • Input field for the user name

      • Input field for the password

      • Confirmation button

    To specify additional fields (a field to set the language, for example), define additional login steps. To specify the value, choose the With value field.

    Note Note

    For the user name field and the password field, the With value fields are disabled since the user name and password are automatically retrieved from the SUT management.

    End of the note.
  8. Define pre-login and post-logon steps, if required.

    If some actions have to be performed before choosing the login button, define additional login steps.

    If some actions have to be performed before entering the user name, repeat this operation with a pre-login step.

    If some additional actions have to be performed after choosing the login button, repeat the operation with apost-login step.

  9. Give a name to the new login schema and an optional description. Note that there is an option to overwrite any existing login schema with the same name. If this option is not selected, a counter suffix will be appended to this new login schema name.

  10. Choose Next.

    The login schema is uploaded to the MIME repository of the SAP Solution Manager system.

    The Object Directory Entry Creation dialog box appears.

    If the dialog box is not visible in the Windows task bar or if the wizard seems to be blocked on the upload step, minimize all others applications, to display the dialog box.

  11. Select a transport package, and save your entries.

  12. Go back to the Login Schema Creation Wizard window.

    The status is green.

  13. Choose Finish.

Result

The login schema can be selected in the corresponding field when defining the test script attributes in the TCE:

At recording and execution time, the login schema file is downloaded to the front-end environment, next to the CBASE files. It is then used at login time.

Login schema definition files (with the .lsd extension) are stored centrally in the SAP Solution Manager, and synchronized automatically on all front end machines that use CBTA. It is stored in the mime repository, next to the CBASE files. If your user has the S_DEVELOP role, you can display them in transaction SE80, under SAP/PUBLIC/CBTA/LOGIN_SCHEMA.