Upload
others
View
2
Download
0
Embed Size (px)
Citation preview
User Guide
CBTA 3.0 SP2 2013-10-11
PUBLIC
Login Schema
Table of Contents
Foreword ........................................................................................................................................................................... 5
Login Schema Structure .................................................................................................................................................... 6
Pre-login Steps .............................................................................................................................................................. 6
Login Steps .................................................................................................................................................................... 6
Post-login Steps ............................................................................................................................................................. 6
Login Schema Definition ................................................................................................................................................... 7
References ...................................................................................................................................................................... 13
Related Links ............................................................................................................................................................... 13
List of Materials and Documentations ........................................................................................................................ 13
Page 5 of 15
Foreword
To be able to automate web scenarios, the recorder and the execution engine must be able to log automatically into
the System under Test, using its login page. Since a login page can be different on each tested system, the user needs
to define a login schema to describe how the login page is, by specifying Uniform Resource Identifiers of the UI
elements.
A login schema can define Uniform Resource Identifiers (URI) of input fields, buttons, checkboxes, links, etc.
To ease the definition of login schemas, a user can use an assistant (see Fig.1) which will help him/her to define the
Uniform Resource Identifier (URI) of the login page elements.
Figure 1: Login Schema Definition Assistant
With CBTA comes a login schema called “NW_STANDARD_LOGON” which can be used 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 of the Solution Manager system.
Page 6 of 15
Login Schema Structure
A login schema contains three different 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”). Of course, it is not possible to define a value for the user field, the password field and the login button
since this makes no sense.
Pre-login Steps
This part can be used to perform mandatory actions before entering the username and the password. The user can
define as many actions he wants.
Login Steps
This is the main part of a login schema. This is where the user will define the URI of the username field, the URI of
the password field and the URI of the login button.
Additional URI can also be defined if the login screen contains some other fields, for example to specify the
language. Such actions will be performed before pressing the login button.
Post-login Steps
If some steps are mandatory once the login button has been pressed, some post-login actions have to be defined. As
for pre-login steps, the user can define as many actions he wants.
Page 7 of 15
Login Schema Definition
To create a new login schema, from the testscript attributes view, press the F4 button of the login schema
field (see Fig.2).
Figure 2: Login Schema F4 button from the testscript attributes view.
The list of existing login schema found in the MIME repository will be displayed, press the “Create” button
(see Fig.3) to display the login schema creation assistant.
Figure 3: List of existing login schema.
The same mechanism as the Object Spy and the Check Picker exists here: by specifying the Internet Explorer session
it is possible to automatically retrieve the URI of a login screen UI element.
To do so, using Internet Explorer, first navigate to the login page of the System under Test (See Fig.4).
Page 8 of 15
Figure 4: Example of a login page.
Back to the login schema definition assistant, press the “Refresh” button and select the session which
corresponds to the login page (See Fig.5).
Figure 5: How to select the correct session from the assistant.
Page 9 of 15
Press the “Spy” button of the “User Field URI”. In the login page in Internet Explorer, UI elements under the
mouse should be highlighted. Select the “User” field (See Fig.6).
Figure 6: Press the “Spy” button and select the “User” field in the login page.
Repeat this operation to get the URI of the password field and the URI of the login button.
Now the main part of the login schema has been defined. If some actions have to be performed before
pressing the login button, use the additional login steps (See Fig.7).
Figure 7: How to define additional actions before pressing the login button.
Page 10 of 15
If some actions have to be performed before setting the username, repeat this operation using the pre-login
steps part (See Fig.8).
Figure 8: How to define some pre-login steps.
If some additional actions have to be performed after pressing the login button, repeat the operation using
the post-login steps part (See Fig.9).
Figure 9: How to define some post-login steps.
Give a name to this new login schema and an optional description. Please 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.
Once this is done, press the “Next” button to upload this new login schema to the MIME repository.
Page 11 of 15
The Object Directory Entry Creation window should appear to ask for the package in which the login schema
should be saved (local object can also be selected). Please note that this window is not modal to the login
schema definition wizard and is not visible in the Windows taskbar, consequently, if the wizard seems to be
blocked on the upload step, please minimize all others applications to find the Object Directory Entry
Creation window.
Figure 10: Object Directory Entry Creation window.
When the upload is finished, the upload status is displayed in the Login Schema Assistant. Press the “Finish”
button to close the wizard.
Figure 11: Upload status of the login schema.
Page 12 of 15
Finally, back to Test Composition Environment, after refreshing the list, this new login schema can be
selected.
Figure 12: The new login schema is added to the list.
Page 13 of 15
References
Related Links
Portals where to find additional information about CBTA:
Title Link
SAP Support Portal https://service.sap.com/support
Search for CBTA
SAP Community Network http://scn.sap.com
Search for CBTA
Wiki Page http://wiki.scn.sap.com/wiki/display/SM/CBTA
List of Materials and Documentations
Official materials and documentations:
Title Link
CBTA – Default Components (EN) https://service.sap.com/~sapidb/011000358700001306982012E
CBTA - How-To Guide https://service.sap.com/~sapidb/011000358700000049262013E
CBTA – Test Automation Demo https://service.sap.com/~sapidb/011000358700000062492013E
Test Management –
Application Lifecycle Management Processes
https://service.sap.com/~sapidb/011000358700000697562009E
Page 15 of 15
www.sap.com/contactsap
© 2013 SAP AG or an SAP affiliate company. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. National product specifications may vary. These materials are provided by SAP AG and its affiliated companies (“SAP Group”) for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty. SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries. Please see www.sap.com/corporate-en/legal/copyright/index.epx#trademark for additional trademark information and notices.