How-To Guide Test Automation Framework



Similar documents
Best Practice Manual Testing of E2E processes using SAP Solution Manager Test Option 1. Marcus Wefers, ALM Solution Management, AGS, SAP AG

How-To Guide Manual Testing with SAP Solution Manager

Business Process Change Analyzer How-to guide

Best Practice / Next Practice: Regression Testing of SAP-centric Business Processes

Solution Documentation for Custom Development

CBTA. Component Based Test Automation How-to guide

SAP Automated Testing Excellence Using HP Quality Center Test Tools. Linda Lehman, SAP Kjell Lillemoen, HP

Database Studio is the new tool to administrate SAP MaxDB database instances as of version 7.5.

Microsoft Visual Studio Integration Guide

EzyScript User Manual

Configuration Guide. Remote Backups How-To Guide. Overview

Decision Support AITS University Administration. Web Intelligence Rich Client 4.1 User Guide

Your First App Store Submission

SAP Business One mobile app for Android

Editing your Website User Guide

How to Configure the Workflow Service and Design the Workflow Process Templates

Appendix A How to create a data-sharing lab

PTC Integrity Eclipse and IBM Rational Development Platform Guide

Bitrix Site Manager ASP.NET. Installation Guide

PUBLIC Password Manager for SAP Single Sign-On Implementation Guide

StreamServe Persuasion SP5 Ad Hoc Correspondence and Correspondence Reviewer

Release Document Version: User Guide: SAP BusinessObjects Analysis, edition for Microsoft Office

Chapter 15: Forms. User Guide. 1 P a g e

Fairfield University Using Xythos for File Sharing

SAP CRM 7.02 SAP CRM 7.02, version for SAP HANA October 2012 English Document Version 3.1

Getting Started with Mamut Online Desktop

Baylor Secure Messaging. For Non-Baylor Users

Jet Data Manager 2012 User Guide

PORTAL ADMINISTRATION

Enterprise Reporting Advanced Web Intelligence Training. Enterprise Reporting Services

Navigation Course. Introduction to Navigation in SAP Solutions and Products

GP REPORTS VIEWER USER GUIDE

System Administration Training Guide. S100 Installation and Site Management

SAP Business One mobile app for Android

CHARTER BUSINESS custom hosting faqs 2010 INTERNET. Q. How do I access my ? Q. How do I change or reset a password for an account?

WhatsUp Gold v16.3 Installation and Configuration Guide

How to Guide SAP Security Optimization Self-Service

Kaldeera Workflow Designer 2010 User's Guide

Results CRM 2012 User Manual

ThirtySix Software WRITE ONCE. APPROVE ONCE. USE EVERYWHERE. SMARTDOCS SHAREPOINT CONFIGURATION GUIDE THIRTYSIX SOFTWARE

Intellect Platform - Tables and Templates Basic Document Management System - A101

Table of Contents INTRODUCTION... 2 HOME PAGE Announcements... 7 Personalize & Change Password... 8 Reminders... 9 SERVICE CATALOG...

Attix5 Pro Server Edition

Welcome to MaxMobile. Introduction. System Requirements

DiskPulse DISK CHANGE MONITOR

PUBLIC. How to Use in SAP Business One. Solutions from SAP. SAP Business One 2005 A SP01

TM Online Storage: StorageSync

ScheduleOne - Help Guide

Learn how to create web enabled (browser) forms in InfoPath 2013 and publish them in SharePoint InfoPath 2013 Web Enabled (Browser) forms

Contents Overview... 5 Configuring Project Management Bridge after Installation... 9 The Project Management Bridge Menu... 14

Getting Started. Getting Started with Time Warner Cable Business Class. Voice Manager. A Guide for Administrators and Users

Strategic Asset Tracking System User Guide

HP Enterprise Integration module for SAP applications

ArcGIS 10.1: The Installation and Authorization User Guide

SOS SO S O n O lin n e lin e Bac Ba kup cku ck p u USER MANUAL

Welcome to MaxMobile. Introduction. System Requirements. MaxMobile 10.5 for Windows Mobile Pocket PC

Test Automation with SAP Solution Manager 7.1 and HP QTP. ALM Solution Management, AGS, SAP AG September 2012

Single Sign-On Guide for Blackbaud NetCommunity and The Patron Edge Online

SAP Business Intelligence (BI) Reporting Training for MM. General Navigation. Rick Heckman PASSHE 1/31/2012

Table of Contents INTRODUCTION...2 HOME PAGE...3. Announcements... 6 Personalize... 7 Reminders... 9 Recent Items SERVICE CATALOG...

Business Warehouse Reporting Manual

How to Create User-Defined Fields and Tables

Search help. More on Office.com: images templates

How To Set Up Total Recall Web On A Microsoft Memorybook (For A Microtron)

StrikeRisk v6.0 IEC/EN Risk Management Software Getting Started

Business Explorer (BEx)

Table of Contents. 1. Content Approval...1 EVALUATION COPY

IBM Operational Decision Manager Version 8 Release 5. Getting Started with Business Rules

TSM for Windows Installation Instructions: Download the latest TSM Client Using the following link:

WatchDox Administrator's Guide. Application Version 3.7.5

CRM Quick Reference Guide

Microsoft Access 2010 handout

Decision Support AITS University Administration. EDDIE 4.1 User Guide

ACCELLOS HELPDESK CUSTOMER GUIDE

MAS 500 Intelligence Tips and Tricks Booklet Vol. 1

CRM Migration Manager for Microsoft Dynamics CRM. User Guide

Sitecore InDesign Connector 1.1

Crystal Reports Payroll Exercise

RoomWizard Synchronization Software Manual Installation Instructions

Getting Started - The Control Panel

AdventNet ManageEngine SupportCenter Plus :: User Guide. Table Of Contents INTRODUCTION... 3 REQUEST Creating a New Request...

How to Create an ecatt?

ICP Data Entry Module Training document. HHC Data Entry Module Training Document

Intellect Platform - The Workflow Engine Basic HelpDesk Troubleticket System - A102

Centran Version 4 Getting Started Guide KABA MAS. Table Of Contents

Rational Quality Manager. Quick Start Tutorial

NSi Mobile Installation Guide. Version 6.2

Hamline University Administrative Computing Page 1

How To Install An Aneka Cloud On A Windows 7 Computer (For Free)

User Guide. Version 3.2. Copyright Snow Software AB. All rights reserved.

The software shall provide the necessary tools to allow a user to create a Dashboard based on the queries created.

Richmond SupportDesk Web Reports Module For Richmond SupportDesk v6.72. User Guide

Web Intelligence User Guide

Global Search v 6.1 for Microsoft Dynamics CRM Online (2013 & 2015 versions)

Kentico CMS 7.0 E-commerce Guide

Guide to Setting up Docs2Manage using Cloud Services

Transcription:

SAP Solution Manager How-To Guide Test Automation Framework January 2011 Applicable Releases: SAP Solution Manager 7.1 Target groups: Test Engineers, Quality Experts, Technology Consultants, Application Consultants Authors: Roland Remmers, Marcus Wefers, Mirco Rotzlawski

1. Introduction...4 2. Prerequisites and Setup of Test Automation Framework...5 2.1 Solution Manager setup...5 2.2 Solution Documentation...5 2.2.1 System Landscape Documentation...6 2.2.2 Business Process documentation...6 2.3 Setup of Test Automation Framework...7 2.3.1 Settings for use of ecatt in Solution Manager...7 2.3.2 Installation of third party test tool on client PC...8 2.3.3 Work Center Test Management...8 2.3.4 Registration of third party test tool in SAP SolMan...9 2.3.5 Definition of a Test Case Type for automated tests... 11 2.3.6 Creation of Business Partners (for Test Case Error Messages handling)... 12 2.4 Authorizations... 14 2.5 Preparation of Managed Systems for Test Automation... 14 3. Definition of Automated Test Cases... 16 3.1 Create a new Test Configuration... 17 3.1.1 Delete a Test Configuration... 20 3.2 Test Configuration: Components... 20 3.2.1 Test Script... 20 3.2.2 System Data Container (SDC)... 26 3.2.3 Test Data Container (TDC)... 33 3.3 Parameterization of test cases... 38 3.3.1 Parameter definition and handover from test tool... 38 3.3.2 Parameterization using Variants only... 40 3.3.3 Parameterization using Test Data Container... 42 3.4 Definition and Use of Generic Attributes of a Test Case... 45 3.4.1 Definition of Generic Attributes... 45 3.4.2 Maintenance of Generic Attributes for a test case... 46 4. Test Planning of Automated Tests... 47 4.1 Prerequisites for executing automated tests... 47 4.1.1 Test Plan... 47 4.1.2 Test Package & Assignment of Testers... 48 4.2 Coverage & Consistency checks for Test Plans... 50 4.2.1 Test Case Coverage for Business Processes... 50 4.2.2 Check Assignment of Test Cases to Test Plans and Test Packages... 52 4.2.3 Inconsistency Check for Test Plans... 53 5. Execution of Automated Test Cases... 57 5.1 The Tester Worklist... 57 5.2 Execution of automated tests from the Tester Worklist... 58 5.2.1 Single Test Case execution... 58 5.2.2 Collective execution of Test Cases... 59 Page 2

5.2.3 Handover of System Data for test execution... 61 5.2.4 Start Options for Automated Tests... 63 5.3 Scheduling of Automated Tests for unattended execution on a remote machine... 65 5.3.1 Prerequisites... 67 5.3.2 How to schedule the unattended execution... 67 5.4 Execution log... 72 5.5 Notification emails... 74 5.5.1 Register users for receiving notification emails when test executions fail... 75 5.5.2 Change templates for notification emails... 76 6. Business Process Change Analysis (BPCA)... 78 6.1 Generating a TBOM (Technical Bill Of Material)... 78 6.1.1 Manual recording of a TBOM... 79 6.1.2 Automatic recording of a TBOM... 81 6.1.3 Prerequisites and additional information on BPCA... 82 7. Reporting... 83 7.1 Status Reporting... 83 7.1.1 Check Status for Current Test Phase... 83 7.2 BI Reporting... 85 7.2.1 Activation of BI Reporting for Test Management... 85 7.2.2 Status Report... 88 7.2.3 Progress Report... 89 7.2.4 Messages Report... 91 7.2.5 Test Effort Report... 92 8. Repair of Damaged Test Cases... 95 8.1 Workflow to report a Damaged Test Case... 96 8.1.1 Prerequisites... 96 8.1.2 Create a Test Case Error Message... 96 8.2 Central repair environment for Test Engineers... 98 8.2.1 Damaged Test Case Worklist... 98 8.2.2 Test Case Error Message... 99 8.2.3 Customizing of the transaction type for Test Case Errors... 105 8.3 Change Analysis for Damaged Test Cases... 112 8.3.1 Example: Change Analysis indicating UI change... 113 9. Appendix... 119 9.1 Further documentation... 119 Page 3

1. Introduction The Test Automation Framework provided with SAP Solution Manager 7.1 allows to design and execute automated test cases with certified external tools, directly in the business process context. It is integrated with the various test management capabilities supporting the whole test cycle: The Test Automation Framework allows you to create and execute automated test cases. In this way it complements ecatt and facilitates functions such as creating test configurations, test data containers and system data containers. For this it makes use of the system data already available in the system landscape documentation in Solution Manager. The various steps within the Test Management cycle are complemented as follows: Test Preparation: o Set up automated tests in SAP Solution Manager Blueprint. o Create Test Configurations using an external test tool. o Create a Test Configuration and a test script in one single step. o When test cases are executed, RFC destinations are derived automatically from SAP Solution Manager system landscape, depending on the system role the user chooses. o The Test Automation Framework supports the usage of Test Data containers, which store required test data and which can be reused in different test cases, thus saving time through reduced maintenance effort. Test Plan Management: Change the system role without changing the system data containers. The RFC destinations are derived automatically when the test cases are executed. Tester Worklist (execution): o Execute automated test cases o Assign custom generic attributes to classify failures Page 4

o Create Test Case Error Messages for follow-up by a responsible test engineer Damaged Test Case Worklist: Exchange information about the process of repairing damaged test cases. Also the Damaged Test Case Worklist serves as a central repair environment for Test Engineers, providing direct access to all relevant information and features for repairing test cases. Reporting: Different reports for status, progress and message reporting as well as gap and consistency reports as well as direct access to test logs of third-party automated test tools. Administration: o Register 3rd party test tools o Customize test case types to switch on or off certain types of test cases o Define generic attributes of test cases o Register users for receiving notification e-mails when test executions fail o Edit templates for notification e-mails 2. Prerequisites and Setup of Test Automation Framework 2.1 Solution Manager setup The content described in this document require SAP Solution Manager 7.1 SP1. Initial- and basic configuration has been performed with transaction SOLMAN_SETUP. Check the Solution Manager Installation Guide for more detailed information and instructions: SAP Support Portal > Release & Upgrade Info > Installation & Upgrade Guides > SAP Components > SAP Solution Manager > newest Release (direct link: http://service.sap.com/~form/sapnet?_shortkey=01100035870000735220&_scenario=0110003 5870000000202&). 2.2 Solution Documentation As a prerequisite to do Test Management with SAP Solution Manager it is required to have at least a basic documentation of all systems relevant for testing (System Landscape Documentation) as well as all processes relevant for testing (Business Process Documentation). Page 5

Lean Solution Documentation as prerequisite for Test Management System Landscape Documentation Business Process Documentation SAP ERP DEV SAP CRM DEV TST PRD TST Connectivity PRD Connectivity Single source of truth non-sap Lean documentation of process steps Business Requirements Links to 3rd party tools and ARIS integration Interface and Custom Code documentation Test Case assignment (Test Option 1) Trace of used SAP objects for BPCA Setup SAP Solution Manager Setup Wizard - guided procedure with help sections and log files for semi-automatic and fast setup 2010 SAP AG. All rights reserved. / Page 13 Setup SAP Business Suite content: BPR* Re-documentation with SoDocA** Manual documentation Consultant solution: xml-based upload * BPR: Business Process Repository ** SoDocA: Solution Documentation Assistant 2.2.1 System Landscape Documentation The following prerequisites need to be fulfilled: Solution Manager local System Landscape Directory is set up and contains technical system information of your managed system landscape Managed systems considered for testing are available in Solution Manager Landscape Management (transaction SMSY) Logical Components are in place and managed systems are assigned to according System Roles RFC destinations from Solution Manager to managed system and vice versa have been created 2.2.2 Business Process documentation In Solution Manager test cases are assigned to process steps or processes. As a prerequisite it is therefore required to have all relevant processes documented in a Solution Manager Project. The following prerequisites need to be fulfilled: A Solution Manager Project has been setup (transaction SOLAR_PROJECT_ADMIN - Project Administration) The project contains a Business Blueprint which describes all relevant scenarios, processes and process steps (transaction SOLAR01 - SAP Solution Manager: Bus. Blueprint) Page 6

Each process step has assigned the relevant transaction (SAP GUI transaction, WebDynpro Application, CRM WebClient Application, URL, etc.; transaction SOLAR02 - SAP Solution Manager: Configuration). 2.3 Setup of Test Automation Framework The Test Automation Framework provides the possibility to seamlessly integrate a test automation application of choice with SAP Solution Manager. Besides SAP ecatt (which can be used for automated testing of SAP GUI based applications only) there are various external test tools from Independent Software Vendors (ISV) which have been certified. Check SAP s partner directory for a list of certified partners (http://www.sap.com/ecosystem/customers/directories/searchsolution.epx > SAP-Defined Integration Scenarios: select BC-ECATT and SM-TSTR (only available after SolMan 7.1 general availability). If you have purchased a certified third party test tool the following steps are required to setup the integration with SAP Solution Manager. 2.3.1 Settings for use of ecatt in Solution Manager When executing automated tests using ecatt or any external test tool the system makes use of ecatt functionality. Therefore the following prerequisites need to be fulfilled in the Solution Manager system: The execution of ecatt scripts needs to be allowed in client settings of transaction SCC4 in the Solution Manager (as well as on the system under test) Generated user ECATT_ET_USR. To do this, run the program ECATT_GENERATE_ET_USER from transaction SE38 Role SAP_ECET needs to be assigned to this user SAP GUI 7.02 is installed on the front-end computer GUI scripting is activated on the front-end computer. To do this, click button Customize local layout (Alt+F12) from the SAP Toolbar > Options > tab Scripting : Enable scripting: Do not select Notify When a Script Page 7

2.3.2 Installation of third party test tool on client PC Please follow the installation instructions provided by the software vendor. All test tools require a client-based installation. Note: The test tool needs to be installed on each machine on which front-end based automated tests shall be executed. Some test tools can be installed on a Terminal Server. Please check the installation and licensing guidelines provided by the software vendor. 2.3.3 Work Center Test Management The Work Center Test Management is the central place to start most activities related to organizing and executing tests: There are different possibilities to access it: Page 8

Transaction SOLMAN_WORKCENTER The Solution Manager Work Center opens inplace of a SAP GUI session. Choose tab Test Management. Transaction SM_WORKCENTER The Solution Manager Work Center opens in a new browser session. Choose tab Test Management. WebDynpro application AGS_WORK_ITEST This option allows you to directly access the Test Management Work Center in a new browser session. Right click on your Favorites folder in your SAP Easy Access Menu and select Add other objects > WebDynpro Application. Enter AGS_WORK_ITEST as WebDynpro Appl. And add a description: Tip: You can also put the URL of the Test Management Work Center to your browser favorites. 2.3.4 Registration of third party test tool in SAP SolMan In Work Center Test Management go to view Administration and click on link Register 3 rd Party Test Tool : Page 9

The registration can also be accessed through the following customizing path: SPRO > SAP Solution Manager Implementation Guide > SAP Solution Manager > Capabilities (Optional) > Test Management > External Integration > External Test Tool with ecatt > Register Test Tool Add a new entry for your test tool to the list. Note: The data to be entered depends on the external test tool as well as on it s version. Please contact SAP or the software vendor to obtain the required data. Example for the registration of an external test tool: Page 10

2.3.5 Definition of a Test Case Type for automated tests In Work Center Test Management go to view Administration and click on link Test Case Types Settings : The registration can also be accessed through the following customizing path: SPRO > SAP Solution Manager Implementation Guide > SAP Solution Manager > Capabilities (Optional) > Test Management > Extended Configuration > Test Cases > Define Test Case Types Activate the entry Test Configuration/3 rd Party Test Tool by adding the Active flag: Page 11

New with Solution Manager 7.1: It is now possible to activate only those entries which are really relevant for your company. Result: In SOLAR02, tab Test Cases, only the activated entries are shown: 2.3.6 Creation of Business Partners (for Test Case Error Messages handling) For the handling of Test Case Error Messages for damaged test cases it is required to have a Business Partner setup for each User who is involved in the repair process, which are mainly the Testers, the Test Coordinator or the QA Expert and the Test Engineer. SAP Solution Manager provides the possibility to auto-generate Business Partners for users in Solution Manager as well as managed systems connect to Solution Manager. 1. Execute transaction BP_GEN (Create Business Partner). 2. Click button. 3. Select the desired system for business partner generation: Page 12

4. Select the desired system user for Business Partner generation by double clicking on the user. 5. Click button. 6. Click button. 7. Business Partners have been successfully generated: Page 13

For changing Business Partners (maintain names, contact details, ) which have already been created transaction BP (Maintain Business Partner) can be used. 2.4 Authorizations Please refer to the Security Guide for the SAP Solution Manager: http://service.sap.com/instguides SAP Components SAP Solution Manager Release 7.1 (or newest available release) Security Guide SAP Solution Manager (e.g. chapter End-User Roles for Test Management ) 2.5 Preparation of Managed Systems for Test Automation To run automated tests in a managed system, the following prerequisites need to be fulfilled: Allow scripting in managed systems. The execution of ecatt scripts needs to be allowed in client settings of transaction SCC4 on the system under test (as well as on the Solution Manager). Generated user ECATT_ET_USR. To do this, run the program ECATT_GENERATE_ET_USER from transaction SE38 Role SAP_ECET needs to be assigned to this user GUI scripting is activated on the front-end computer. To do this, click button Customize local layout (Alt+F12) from the SAP Toolbar > Options > tab Scripting : Enable scripting: Do not select Notify When a Script Solution Tools Plug-in (ST-PI) installed on managed systems For using BPCA the latest Solution Tools Plug-In add-on is required to be installed on the managed system for Business Process Change Analyzer to work, please refer to SAP note 539977 for release strategy for this Add-on. Page 14

All remote/managed systems also need to have kernel version 4.6x or 7.xx for dynamic TBOM recording. Please refer to the SAP note 1316524 for more information on the pre-requisites for BPCA. For additional information, see also SAP Note 519858 Setting Up SAP Systems to Use ecatt. Page 15

3. Definition of Automated Test Cases An automated Test Case is actually a Test Configuration of reusable objects. A Test Configuration comprises the following object types: The Test Script represents the steps of a business process which is performed by the automated test case, for example: o A sales order is entered in the CRM system. o The order is passed to the ERP system where production is scheduled. o The ERP system passes information to the SCM system where a table is updated. The Test Data Container is a reusable data object with a set of user-defined parameters. It contains multiple combinations of test data which is retrieved during execution of an automated test. It is maintained independently from the test script and therefore can be reused in different tests. The System Data Container defines the systems on which these steps are performed. A system is defined as follows: o Operational function (CRM, ERP system, for example) o Technical role (system roles such as development, test, evaluation, production system, for example) When executing a test case the system role can be switched (from development system to test system, for example) without having to adjust any system parameters or without the need to adapt the test script. Within the Test Automation Framework, the execution of an automated test case always means the execution of a Test Configuration. Page 16

3.1 Create a new Test Configuration The creation and maintenance of Test Configurations can be accessed in different ways in Solution Manager: From Work Center Test Management: In Work Center Test Management go to view Test Preparation Select a project for which you want to create or maintain a Test Configuration Click on button Configuration: The selected project is opened in transaction SOLAR02 (Project Configuration). Option: you can also directly open transaction SOLAR02 and select the relevant project. Navigate to the relevant process or process step and go to tab Test Cases Create a new Test Configuration by selecting a Test Case Type and entering a new Test Configuration ID (30 characters maximum) in the Test Case column Click the Create button or hit Enter: Page 17

From Transaction STCE (External test configuration editor): Open transaction STCE Enter a new Test Configuration ID and click button Create Object: The Create Test Configuration screen is opened. Enter a Title Enter an Application Component: Page 18

Go to the Configuration tab The Test Script name is defaulted with the name of the Test Configuration o Note: If you want to reuse an existing test script in a new Test Configuration, e.g. to execute it with different test data or in a different context, select an existing script via the selection help (F4). Enter a System Data Container (either select a previously defined SDC or create a new one from here. Details on how to create a SDC see HowTo-Guide for Test Automation Framework). Enter a Target System (as part of the SDC) o Note: It is necessary to initially indicate a Target System in which the Test Case recording shall take place. Save the Test Configuration (a Workbench Package needs to be assigned) Click the External Test button to launch the external test tool: QTP is automatically launched: Note: While the external test tool is open in integrated mode (launched from Solution Manager) the SolMan sessions are not accessible and kept in the background. To go back to a SolMan session, either (save and) close the test tool or logon to the SolMan system via a new session. Page 19

3.1.1 Delete a Test Configuration Note: The deletion of Test Configurations is not supported directly from transaction SOLAR02 for technical reasons. Removing a Test Configuration from the Test Cases tab does not delete the Test Configuration, it just removes the selected Test Configuration assignment from the process/process step. In order to delete a Test Configuration, proceed as follows: 1. Open transaction STCE 2. Enter the Test Configuration to be deleted 3. Hit the button Delete Object 4. Select the an option in the popup and hit OK. 5. A confirmation message confirms the deletion of the Test Configuration (and test script, if selected). 3.2 Test Configuration: Components In Solution Manager an automated test case is represented by a Test Configuration which consists out of a Test Script, a System Data Container and a Test Data Container. 3.2.1 Test Script A test script performs the execution of a process in one or more applications in an automated way. The test script is recorded using SAP ecatt (for SAPGUI based applications only) or an external test tool. In a second step the test data used during recording of the test script can be replaced by parameters which allows to run the test script with different variants of test data. When starting the recording of a test script from within the Solution Manager (e.g. from transaction SOLAR02) the Test Automation Framework allows to run the external test tool in integrated mode, which means it automatically opens the external test tool and hands over information (e.g. System Data Container, Test Data Container) to the external tool. Once the test script has been recorded with the test tool, it is stored in Solution Manager and linked to the Test Configuration. The test script can also be reused in different Test Configurations. If test data was replaced by parameters in the external Page 20

tool, the defined parameters are also automatically transferred to the Test Configuration where it can be used for defining different variants of test data. 3.2.1.1 Recording of a test script In order to profit from the integration provided by the Test Automation Framework, a test script is created directly from the Test Configuration. Prerequisite: You have created a Test Configuration as described in chapter Create a new Test Configuration. Note: For illustration purposes the following example is described using HP Quick Test Professional as external test tool. For details on how to use other external test tools please refer to the documentation of the test tool provider. In the Test Configuration the Test Script name is defaulted with the name of the Test Configuration Enter a System Data Container Enter a Target System (as part of the SDC) Note: It is necessary to initially indicate a Target System in which the Test Case recording shall take place. Save the Test Configuration (a Workbench Package needs to be assigned) Click the External Test button to launch the external test tool: The external test tool is automatically launched and the recording of the script can be started. Note: While the external test tool is open in integrated mode (launched from Solution Manager) the SolMan sessions are not accessible and kept in the background. To go back to a SolMan session, either (save and) close the test tool or logon to the SolMan system via a new session. Once QTP has been launched in integrated mode, the initial screen is displayed and QTP is ready to record a new script: Page 21

The following describes an example how to record a test script for the process Create ERP Sales Order (SAP GUI) using standard IDES data. 3.2.1.2 Example: Record a test script for ERP Sales Order creation (SAP GUI) with HP QTP In QTP, click the Record button The Record and Run Settings Popup appears For recording a SAP GUI based process select option Open the following SAP Gui client when record or run session begins Select the target system for recording and executing the test script from the dropdown list box Server description, in this example it s ERP system C5P client 004 Check mark Enable auto-logon Enter a User and a Password for the recording and the execution Enter the Target Client Enter the logon Language Check mark Remember password Page 22

Once all logon data is provided in the Record and Run Settings hit button Apply and OK. The recording of the process is started. Recording mode is indicated by a red blinking Recording sign in the lower right corner of QTP as well as with the scripting indicator in the SAP sessions. Note: During the recording, all activities/clicks on the screen are captured by QTP, therefore try to focus exactly on the necessary steps for execution the process and avoid any additional clicks, data entries or keystrokes. This is to assure that the script can be executed without issues later. 1. QTP automatically launches system under test, in this example C5P (ERP) and opens a session with the provided logon data 2. Open the OKCode field (click on the triangle), enter transaction code VA01 and click the Enter button. 3. On screen Create Sales Order: Initial Screen enter the following data: Order Type = OR Sales Organization= 1000 Distribution Channel = 10 Division = 00 Page 23

4. Hit Enter to continue 5. On screen Create Standard Order: Overview enter the following data: Sold-To-Party = 1000 Ship-To-Party = 1000 Material = P-100 Order Quantity = 1 6. Hit Enter 7. Save the Order by clicking button Save 8. Confirmation message Standard Order XXXXX has been saved appears in the lower left corner. 9. Leave the system by clicking button Exit twice, confirm the Logoff popup with Yes. 10. Back in QTP click button Stop to finish the recording: 11. QTP shows the recorded steps. 12. Click button Save and then Close QTP: Page 24

The test script is automatically transferred and saved to Solution Manager. 13. Back in Solution Manager, Save the Test Configuration: The Test Configuration has now been created and can be executed. Adhoc Execution of a Test Configuration Right after recording the script with QTP and saving it to Solution Manager the test configuration can be executed with the default data which was entered during the recording. Note: This kind of execution is usually done by the Test Engineer only. For the execution of automated test cases within a test cycle, the execution needs to take place using a Test Plan and Test Package with assignment to testers. In SOLAR02, select the Test Configuration and hit the Execute button: Page 25

Other option: From the Test Configuration screen, hit the Execute button: 3.2.2 System Data Container (SDC) A System Data Container (SDC) defines the systems on which automated test cases can be executed. 3.2.2.1 Concept Instead of having the target system hard-coded in the test script, the use of a SDC allows the flexible execution of one and the same test script in different target systems. When creating a SDC in the Test Automation Framework, RFC destinations to the systems under test are retrieved automatically. For executing a test case in different target systems the system role can be changed and the RFC destination is automatically adapted accordingly without additional effort. A System Data Container (SDC) defines the systems on which tests can be performed. A system in a SDC is defined as follows: Operational function (CRM, ERP system, for example) Technical role (system roles such as development, test, evaluation, production system, for example) Page 26

The systems are represented by logical components. Relevant parameters of the respective system landscape (target systems and RFC destinations) are retrieved automatically from the Solution Manager project or the solution which is assigned to the test configuration. When you execute a test case you can switch the system role (from development system to test system, for example) without having to adjust any system parameters. The systems under test usually change over the time. For example, you start by testing a certain release of a system under test. Once you have developed your test cases, you may want to use them again to test later releases of the system under test, or you want to reuse a test case in the test system which you created in the development system. By using the information which SAP Solution Manager provides about the system landscape, you can upgrade or even exchange the systems under test without modifying your test objects. 3.2.2.2 Define a SDC for a Solution Manager project Instead of manually creating a SDC (which can be done using transaction STCE) it is more convenient to have a SDC automatically created from the systems (logical components) assigned to a Solution Manager project. Prerequisites: In your Solution Manager project all systems relevant for your business processes are assigned as logical components. The definition of the system landscape for a project is done via transaction SOLAR_PROJECT_ADMIN (Project Administration) > tab System Landscape. Example: Project AGS_BS_IMP covers business processes running on an ERP and a CRM system: The logical components are usually created by the Solution Manager administration when connecting managed systems to the Solution Manager. For each system role (e.g. Development System, Quality Assurance System, Production System, etc.) a logical system is maintained (e.g. C5P:004) for which a RFC destination is maintained. Page 27

In order to check which specific RFC destination is maintained for this system and client, doubleclick on a logical system. On the Product System screen > Product Instance Selection tab, double-click on the Product Instance entry for which an Extended Assignment of Technical Systems is maintained: The RFC connection maintained in column RFC for Solution Manager is the one relevant for the SDC (and BPCA): You can directly open the details of the RFC connection by double-clicking on it. The RFC connection is opened in transaction SM59 (RFC Destinations Display/Maintain). From here a connection check and remote logon can be performed: Page 28

Define system roles relevant for Testing In order to assure that tests are only executed in non-productive systems, it is recommended to define the systems relevant for testing. Restrict the execution of test cases to noncritical system roles such as, for example, Development System, Quality Assurance System, or Evaluation System. Back in transaction SOLAR_PROJECT_ADMIN > System Landscape tab, click on button System Role Assignment and select the system roles for which the execution of test cases shall be allowed: Create a System Data Container 1. In the Project Administration switch to tab Central Objects 2. Enter a System Data Container ID and hit button Create: Page 29

The SDC is automatically generated in the background and a system message confirms the creation: 3. Double-click on the System Data Container ID to open the SDC details screen: For each logical component a Target System entry has been created Target system NONE is always added automatically (reference to own SolMan system) Checking the System Landscape Coverage of a System Data Container After the system landscape of an SAP Solution Manager project or a solution was changed (for example, logical components are added or removed), you can make sure that a system data container still covers the system landscape. You can add logical components which are missing. To perform a system landscape coverage check, click the Check Sys. Landscape Coverage button in the SDC: Page 30

3.2.2.3 Assign a SDC in the Test Configuration Once a System Data Container has been created it can be assigned to a Test Configuration: 1. Open a Test Configuration, e.g. via transaction SOLAR02 (Project Configuration) > tab Test Cases: 2. Enter the System Data Container ID: Page 31

Note: The field Target System needs only be maintained when creating a new test script from within the Test Configuration. This is necessary in order to indicate in which target system the test script shall be recorded. Otherwise, when executing a test configuration, the field Target System can stay empty. Switch system role The RFC destinations shown in the SDC depend on the system role which is currently maintained by the individual user: To switch to a different system role, go to the initial screen of the Project Configuration and select from the menu Configuration > System Role: Select the required system role: The project is now displayed for a different system role: Page 32

When opening the System Data Container from the Test Configuration, the RFC destinations are now shown for a different system role. 3.2.3 Test Data Container (TDC) A test data container is a persistent data object with a set of parameters that belong together from a business point of view. They can be maintained independently from the test script. The parameters are user-defined and have a default value. These values can have variants and are assigned to the test configuration. In automated test cases, the bulk of the test data is normally stored separate from the test scripts in test data containers. The main reasons for this are reusability and maintainability. Test data containers and a test script are brought together in the test configuration to create an executable automated test case. The simplest use of test data containers is to create a separate one for each test script. However, this does not provide the advantage of reuse. A more effective way to manage test data is to create a single test data container for a whole application or sub-application. By storing all of the test data in one container, it is easier to keep it consistent. In contrast to using a single test data container for all parameters, parameters can also be distributed over several test data containers. For example, if you have a large number of scripts, each with many parameters, you may find that using a single test data container is no longer a practical option. In this case, you could split the parameters into logical groups, each in its own test data container. As with other ecatt objects, the test data container has mandatory attributes (title, package, person responsible, and application component) as well as attributes containing administrative information. Test data containers consist of parameters and variants. The parameters describe the interface of the container and the variants store the data. Each variant contains a field for each parameter. If no value has been entered in a field, the value specified in the ECATTDEFAULT is the value of the field. Page 33

3.2.3.1 How to define a TDC Example 1: Define a simple TDC with data for single fields for VA01 Create Sales Order 1. From the Test Management Work Center, in the Navigation bar in section Common Tasks, select Easy Test Automation (opens transaction STCE - External test configuration editor) or Extended Test Automation (opens transaction SECATT - Extended Computer Aided Test Tool). Optionally, start one of the transactions directly. 2. Select option Test Data, enter an ID for the new TDC Example: ZTDC_VA01_SALES_ORDER_SIMPLE) and click Create Object: 3. Enter the following data on the Attributes tab: o Title o Application Component o System Data Container + Target System o Assigning a SDC and a target system to the TDC allows to reference to the data definition in the target system when defining the parameters in a later step. This assures data consistency and a better quality of the test data (automatic plausibility check) o Optional: Search terms. This allows easier search for certain TDC Page 34

4. On the Parameters tab, define all parameters to be used for testing: Parameter ID: Use e.g. I/E to distinguish between Import and Export parameters Description: Enter a description for each parameter (automatically retrieved if reference to target system is used) Value: optionally maintain a default value. This value will not be taken into account when executing tests with values from the Variants tab. The values are shown in the ECATTDEFAULT variant. Reference: DDIC reference in the target system. When a Target System is maintained on the Attributes tab of the TDC, the system automatically retrieves the field s description and data definition (type, length) from the target system. 5. On the Variants tab, add additional Variants with different combinations of valid test data: Tip: Before entering a set of test data, make sure the data is valid and executes correctly at least two times in the target system. Example 2: Define a complex TDC with data for multiple line items in VA01 Create Sales Order 1. Create a TDC as described in Example 1, e.g. ZTDC_VA01_SALES_ORDER_COMPLEX 2. On the Parameters tab, define all parameters to be used for testing. Page 35

3. Add an additional parameter I_STRUCTURE and reference it to the DDIC structure RV45A[]. The relevant table/structure can be found by positioning the cursor in a field of the table you want fill with test data > click F1 > Technical information. Note: Make sure you add the string [] to the Parameter Reference, otherwise it is not possible to define multiple line items within a variant. 4. Double-click on the parameter I_STRUCTURE to display the fields of the structure in the sub screen below: 5. On tab Variants define a variant and maintain the values for the single fields. 6. In order to maintain the values for the line items attached to this variant, double-click on the field for I_STRUCTURE (field is either empty or shows <INITIAL> or <VALUE> ): 7. Add line items by clicking on button Insert or Append 8. Maintain the values for each line item. In this example the Material and the Quantity: Page 36

9. Hit Enter. Additional option: you can double click on the left lower subscreen (entry 1 of I_STRUCTURE) to change the data entry form on the right lower subscreen (switch the format for data entry): 10. Add a second Variant and maintain different data for it (different material and quantity): 3.2.3.2 Import parameter definition from an external script When creating an new TDC it is also possible to auto-generate the parameters from the variables which were transmitted from the external test tool to the Solution Manager to the Variants tab on the Test Configuration. Steps: From a Test Configuration (Test Data tab) create a new TDC Enter a Title and an Application Component From the menu bar select Edit > Import Parameters Indicate the external test script from which you want to copy the parameter definitions Click button Get Parameter Page 37

Select the Parameters you want to import into the TDC Click the Attach button in the center of the split screen Click the Copy button to exit the Import Parameters screen. The parameter IDs have been copied into the TDC Note: This procedure only copies the parameter IDs, the complete parameter definition (data reference, target system etc. is not copied and needs to be maintained manually. 3.2.3.3 Assign a TDC in the Test Configuration One or more Test Data Container can be assigned to a Test Configuration on the Test Data tab: How to use the Test Data Container for executing a Test Case with various different variants of test data, see chapter Parameterization. 3.3 Parameterization of test cases Instead of executing automated tests with always the same test data (field values) as used during the recording of the script, these static values can be replaced by parameters which are populated at runtime of the execution. This allows a much more flexible use of existing test cases and a much more extensive test of business processes. 3.3.1 Parameter definition and handover from test tool The definition of parameters is handled in the external test tool. After recording the script, the field values used during the recording are replaced by parameters, e.g. replacement of Sold-To Party 1000 with parameter I_SOLD_TO_PARTY. The procedure for parameterization differs depending on the test tool. Some test tools use an automated approach and automatically provide a parameter ID for each field value. Page 38

For details regarding the parameterization in the external test tools, please refer to the documentation of the individual test tool providers. After completing the parameterization in the external test tool, when saving the test script to SAP, all defined parameters are automatically transferred to the Test Configuration in Solution Manager. The parameters can then be connected to Test Data Containers which provide multiple variants of test data which are handed over to the external test tool at the time of execution. In the example below, the following field values have been replaced by parameters in the external test tool (example with HP QTP): Sales Document Type = I_ORDER_TYPE Sales Organization = I_SALES_ORG Distribution Channel = I_DISTRIBUTION_CHANNEL Division = I_DIVISION Sold-to party = I_SOLD_TO_PARTY Ship-to party = I_SHIP_TO_PARTY Material Number = I_MATERIAL Order Quantity = I_QUANTITY The parameters which have been defined in the external test tool are automatically transferred to the Test Configuration into the Variants tab: Page 39

3.3.2 Parameterization using Variants only Note: This method is not recommended for the provisioning of test data for the test execution. But it can be helpful during the design phase of an automated test, e.g. for ad hoc testing of the test script with a few variants. In order to add additional Variants with test data on the Variants tab, click button Append Variant and maintain additional test values: Make sure to checkmark the Variants relevant for execution in the column Execute. The Test Configuration can now be executed with the different variants. The execution can be started either directly from the Test Configuration using the button Execute Test Configuration or from the Test Cases tab (make sure the field Variant is maintained, see field help for options): On the Start Options screen, select Error Behavior = Termination, Continue with Next Variant, in order to execute all variants, even if one of them fails: Page 40

The execution of the test configuration will be performed for each of the selected Variants. After completion, the result is displayed (SAP internal log): Page 41

3.3.3 Parameterization using Test Data Container For the storage and maintenance of test data for automated tests it is recommended to use one or more Test Data Containers (TDC). The test data in the TDC can be linked to a Test Configuration by defining multiple variants which contain a reference to the single values in the TDC. Prerequisite: You have created a Test Data Container which contains test data variants relevant for the business process to be tested. Parameters have been defined in the external test tool and have been transferred to the Variants tab of the Test Configuration: 1. In the Test Configuration, go to tab Test Data and add a Test Data Container by clicking on button Append Row : 2. Go to tab Variants and click on button Variant Maintenance Assistant : Page 42

3. In the Variant Maintenance Assistant the screen is split into two parts. On the left side the content of the Test Data Container is displayed. On the right side the Variants of the Test Configuration are displayed: 4. In order to create Test Configuration variants from the TDC variants, select the variants of the TDC which you want to take over to the Test Configuration and hit button Attach as Variant(s) : Use key combination Shift+Click to select more than one entry. Tip: It is strongly recommended to name the parameters in the TDC in the same way as in the test script. If this is the case, the variants from the TDC can be mapped easily to the parameters defined in the Test Configuration using the Attach as Variant(s) functionality. Otherwise parameter names need to be mapped individually using the Link Single Field option, which requires more effort and which can be quite complex if many parameters need to be mapped. 5. The selected variants from the TDC is copied to the Test Configuration. 6. It is possible to toggle between the reference and the real value (as maintained in the TDC) by using the Toggle button: The Test Configuration can now be executed with the different variants getting the values from the TDC. The execution can be started either directly from the Test Configuration using the button Execute Test Configuration or from the Test Cases tab (make sure the field Variant is maintained, see field help for options): Page 43

On the Start Options screen, select Error Behavior = Termination, Continue with Next Variant, in order to execute all variants, even if one of them fails: The execution of the test configuration will be performed for each of the selected Variants. After completion, the result is displayed (SAP internal log): Page 44

3.4 Definition and Use of Generic Attributes of a Test Case Generic attributes are attributes which the test organizer can assign manually to a test case. Generic attributes can, for example, provide additional criteria to classify causes of failed test executions or they can define conditions under which test cases are allowed to be executed, for example, if special user authorizations are required. Which attributes are displayed depends on how your system is configured. In the Test Automation Framework, the generic attribute DAMAGED is predefined. As a QA expert, you can assign the value X to the attribute DAMAGED if you identified a damaged test case. Note: The generic attribute DAMAGED is not technically linked to the Damaged Test Case Worklist. 3.4.1 Definition of Generic Attributes Prerequisite: You have authorization as an administrator. Page 45

Procedure: In the Test Management work center choose view Administration. Choose the Generic Attributes Definition link. Go to the Display View Generic Attributes for a Test Case > Choose Change. Change selected generic attributes or create new ones. Note: If you delete a generic attribute which is assigned to a test case, the assignment is stored. But it is no longer possible to assign the generic attribute to test cases. Test Engineers can now assign the generic attributes to test cases and enter values. 3.4.2 Maintenance of Generic Attributes for a test case Prerequisites: You have authorization as a developer. A test configuration has been executed. Procedure: 1. In the Test Management Work Center in the Common Tasks area, choose Test Automation. 2. Go to the SAP Solution Manager Test Automation Initial Screen. 3. Select a test configuration. 4. Choose the Generic Attributes Maintenance icon. 5. Go the Generic Attributes Maintenance screen. 6. To maintain the generic attributes of the test configuration, you can do the following: o To change the value of an existing attribute, choose the Attribute Value column of the respective attribute. o To add a new attribute, choose the Add pushbutton. o To delete an attribute, select the attribute and choose the Delete pushbutton. 7. Enter the required values. 8. Choose the Check Entries pushbutton to identify possible entry errors. 9. Save your entries. Page 46

4. Test Planning of Automated Tests The test planning consists of the identification of the required test scope and definition of test plans and test packages as well as the assignment of test packages to testers. The Test Automation Framework supports this process by providing several reports for coverage and consistency checks. The assigned test packages appear in the Tester Worklist of the Tester and can be executed directly from there or scheduled for execution at a specific time and even on remote machines. 4.1 Prerequisites for executing automated tests Automated tests are handled the same way as manual test cases. In order to provide automated test cases to testers it is required to create a test plan, a test package and assign this package to one or more testers. 4.1.1 Test Plan For creating a Test Plan for automated test, the following steps are required: In the Test Management Work Center select Test Plan Management Click button Test Plan > Create Test Plan: Maintain the Central Attributes (enter at least a Title) and hit Next twice: Page 47

Select the automated test cases relevant for your test plan and press button Test Plan : The Test Plan will be generated. 4.1.2 Test Package & Assignment of Testers For creating a Test Package and assignment of testers, the following steps are required: In the Test Management Work Center select Test Plan Management Select your newly created Test Plan and click Test Package Management: Select your newly created Test Plan and click Test Package Management: Page 48

Click button Create Test Package : Select the automated test cases relevant for this test package and press button Test Package : Select the newly created Test Package and click button Assign Tester : Search and select the User names you want to assign to the test package. The Test Package is now displayed in the Tester Worklist of the assigned Testers and ready for execution or scheduling. Page 49

4.2 Coverage & Consistency checks for Test Plans The Test Automation Framework supports the test planning with useful reports for validating the complete coverage and the consistency of test plans. 4.2.1 Test Case Coverage for Business Processes Goal: Check to what extent business processes are covered by test cases in order to identify potential gaps in the test scope. Benefit: Ensure transparency during test scope definition and test planning to gain reliable test results. How to generate the report: 1. Call up transaction SOLMAN_WORKCENTER to access the work center. 2. From the navigation bar, choose the Test Management work center. 3. From the navigation area on the left of the screen, choose Test Preparation and select the Projects view. 4. From the content area, choose either the My Projects or the All Projects query. 5. Click on Refresh to refresh the active query. Depending on the selected query, a list of all projects assigned to you or the complete list of projects in the relevant SAP Solution Manager system is displayed. 6. From the list of results, highlight the desired project by clicking on the appropriate row. 7. Choose the Evaluate pushbutton. This opens the Evaluate Transactions / TBOMs / Testcases screen. Page 50

8. At the bottom of the screen in the Test Cases section, select the Nodes without Test Cases radio button. 9. At the top of the screen, choose Execute ( ). The results screen opens. Select the topmost element in the Project Structure column and choose Expand subtree ( ). All business processes that have no test case assigned to them (no X in Test Cases column) are displayed. This allows you to see at a glance what still needs to be done to complete the test scope definition. Page 51

4.2.2 Check Assignment of Test Cases to Test Plans and Test Packages Goal: Find out whether there are test cases which are not included in a test plan or test package. Benefit: Mm How to generate the report: To create a negative list of test cases that are not assigned to a test plan or test package, proceed as follows: 1. Call up transaction SOLMAN_WORKCENTER to access the work center. 2. From the navigation bar, choose the Test Management work center. 3. From the navigation area on the left of the screen, choose Reports. 4. In the content area, go to the Description column and drill down to Test Project Status Analyses. 5. In the Type column, click on Report. This opens the Test Case Status Analysis screen. 6. In the Project field, make sure the correct project name is entered. Page 52

7. In the System Role field, verify that the desired system role is selected. 8. In the Status Attributes section, select the Not Assigned to a Test Package and Test Case in No Test Plan checkboxes. 9. At the top of the screen, choose Execute ( ). The results screen opens. 10. Select the topmost element in the Project Structure column and choose Expand subtree ( ). A list of test cases without assignment to test plans or test packages is displayed. A remark in the Status Text column indicates what kind of assignment is still missing for the relevant test case. 4.2.3 Inconsistency Check for Test Plans Goal: Determine whether the business process structure and/or test case descriptions has been changed after the relevant test plan was generated. Identify test plans that are affected by changes in the business process hierarchy and test documents. Benefit: Ensure that test execution is based on the most up-to-date process and test descriptions. How to generate the report: To perform an inconsistency check for test plans proceed as follows: 1. Call up transaction SOLMAN_WORKCENTER to access the work center. Page 53

2. From the navigation bar, choose the Test Management work center. 3. From the navigation area on the left of the screen, choose Reports. 4. In the content area, go to the Description column and drill down to Test Inconsistent Test Plans. 5. In the Type column, click on Report. This opens the Inconsistent Test Plans screen. 6. In the Project field, enter the name of the project for that you want to perform the inconsistency check. 7. Choose Execute ( ). The Inconsistent Test Plans screen opens, where you can see at a glance, which test plans within the selected project are inconsistent. 8. Double-click on a test plan that is marked as inconsistent. A dialog box opens to inform you that the selected test plan is obsolete and needs to be regenerated. Page 54

9. Confirm the dialog box by choosing Continue. Another dialog box opens to inform you that the selected project has been changed. 10. Confirm the dialog box by choosing Continue. The test plan maintenance screen opens. 11. In the Test Plan Structure pane on the left of the screen, click on the little black triangle next to the binocular icon (Find) and choose the option Next Project Change from the context menu. The next changed item within the business process structure is highlighted. An icon is displayed next to the changed structure element to indicate the type of change (e.g. Structure element was added to the project). 12. Select the checkbox if you want to include the changed item into the test scope. Page 55

13. Repeat steps 11 and 12 as often as required. 14. Choose Generate Test Plan ( ) to regenerate the test plan so that it includes the changed items. You will automatically return to the Inconsistent Test Plans screen. Page 56

5. Execution of Automated Test Cases 5.1 The Tester Worklist The Tester Worklist in SAP Solution Manager is the central place for the execution of all test cases within a test cycle, no matter if manual or automated test cases. A tester can execute all test cases which are assigned to his Test Package. The Tester Worklist provides an immediate overview of the status of Test Packages and Test cases and serves as a central place to enter problem messages for failed test cases. In addition, automated test cases can be scheduled for execution and test case errors can be reported. The Tester Worklist can be opened by launching the Test Management Work Center (transaction SOLMAN_WORKCENTER) and selecting view Tester Worklist : For the handling of automated test cases, the following functionality is integrated into the Tester Worklist: 1. Execution of automated test cases o single test case execution o collective execution of all automated test cases in a test package 2. Reporting of Test Case Errors for repair by a Test Engineer Page 57

3. Scheduling of automated test cases 4. Direct access to execution logs 5. Overview on related Error Messages and Support Messages (Test Case Errors) 5.2 Execution of automated tests from the Tester Worklist Prerequisites: In order to execute automated test cases from the Tester Worklist, a user needs at least the standard authorization roles for Testers (see appendix). 5.2.1 Single Test Case execution Steps for execution of a single automated test case: 1. In the Tester Worklist select a Test Package. 2. In the Assigned Test Cases area, select an automated test case (Type / Test Configuration) and click button Run : 3. The Start Options screen comes up (for details regarding the different start options refer to chapter Start Options for Automated Tests ). Select the appropriate start options. 4. Verify the defaulted System Role and System Data Container. 5. Click button Execute (F8). 6. The external test tool is automatically launched and the automated test execution takes place. 7. After the execution has finished the log of the automated test case is displayed. Check the log an close it. 8. Refresh the Tester Worklist to update the status of the test case: If the option Copy Status to TWB was selected on the start options screen (default setting) the status is automatically changed in the Tester Worklist. Otherwise, maintain the status manually by clicking on the status icon. 9. If the test execution failed create message: Page 58

In case of an application error create an Error message. Click on the status icon to open the Status Maintenance screen. On the Messages tab click on Create Message. In case of a Test Case defect create a Test Case Error Message: Select the package and click on the button Report Test Case Error. See chapter Repair of Damaged Test Cases/Report a Test Case Error for a detailed description. 5.2.2 Collective execution of Test Cases The collective execution of automated test cases allows to execute multiple test cases of a test package at once. Steps for collective execution of multiple automated test cases: 1. In the Tester Worklist select a Test Package. 2. Click button Run Test 3. The Perform Test screen comes up. 4. Click button Tabular Display: 5. Click button Automatic Test: Page 59

6. Select all test cases to be executed in the collective mode: 7. Click the Copy button. 8. The Start Options screen comes up (for details regarding the different start options refer to chapter Start Options for Automated Tests ). Select the appropriate start options: Page 60

9. Verify the defaulted System Role and System Data Container. 10. Click button Execute (F8). 11. The external test tool is automatically launched and the automated test cases are executed one after the other. 12. After the execution has finished the SAP internal log is displayed. Check the log an close it. 13. Refresh the Tester Worklist to update the status of the test case: If the option Copy Status to TWB was selected on the start options screen (default setting) the status is automatically changed in the Tester Worklist. Otherwise, maintain the status manually by clicking on the status icon. 14. If the test execution failed create message: In case of an application error create an Error message. Click on the status icon to open the Status Maintenance screen. On the Messages tab click on Create Message. In case of a Test Case defect create a Test Case Error Message: Select the package and click on the button Report Test Case Error. See chapter Repair of Damaged Test Cases/Report a Test Case Error for a detailed description. 5.2.3 Handover of System Data for test execution The system in which the automated test is executed is determined by the System Role defined in the Test Plan: Page 61

The system role can be changed via Menu Test Plan > System Role During runtime of the test case execution the connection to the respective target system is automatically determined through the System Data Container (SDC) assigned to the Test Configuration: On the Test Configuration screen double-click on the System Data Container to open it. (Alternatively you can display a SDC via transaction STCE or SECATT). The Logical Component assigned the Target System contains the assignment of a specific System/Client to a System Role: Page 62

Double-click on the Logical Component to display or maintain the system assignments: 5.2.4 Start Options for Automated Tests The start options available on the Start Options screen depend on the context from where the execution is triggered and the test tool: Execution from the Tester Worklist Execution from SOLAR02 Execution of scheduled automated tests Page 63

The most commonly used start options are the following: Error Behavior: You can specify how ecatt reacts to an error in a test. You can choose from the following: Termination. Execution continues with the next variant. Termination. Execution continues with the next test configuration. Termination of the start process. Execution does not continue. No termination. Execution continues with the next script command. Debugging Mode: You can specify if and when ecatt executes in the ecatt debugger. You can choose from the following: Normal Breakpoint Handling, Stop at BREAK Page 64

Execution with Immediate Debugging Stop When an Error Occurs Ignore Breakpoints (Default for Collective Execution) Execution Control: When you select Execution Control, a dialog is available during replay in which you can pause or stop the script, or jump into the debugger. Any such user interaction will be recorded in the log. System Data: When starting a test, you can choose to use a system data container other than the one specified in the test configuration or test script. You can also choose a different target system instead of the default target system. The default target system is: The target system of the test configuration when executing a test configuration. The maintenance system of the test script is not relevant. Logs: If you want the log to be displayed automatically at the end of a test, select Display Log. If you want the archive flag to be set for the generated log, select Archive. RFC: You can specify that RFC connections be closed after a script or variant has been executed. You can specify whether synchronous or asynchronous RFC should be used for remote access. Copy Status to TWB (Test Workbench): This setting automatically updates the status of the test case in the Test Workbench (traffic light). This setting is set by default. Activate TBOM recording: This setting triggers the TBOM recording used for the Business Process Change Analyzer. Note: As a prerequisite the test case must have been assigned for TBOM recording in SOLAR02 > Transactions tab > button Attributes > tab TBOM > mark the test cases suitable for TBOM creation as Assigned to TBOM 5.3 Scheduling of Automated Tests for unattended execution on a remote machine The Test Automation Framework provides functionality which allows to schedule the execution of automated test for a specific time, e.g. at night time (so called light-out tests ) and on remote machines (either physical PCs or virtual machines). Page 65

Steps for the scheduling and executing automated tests on a remote PC: Page 66

1. The Test Engineer/Coordinator schedules a job for execution of a test package in the Solution Manager on his own local PC. 2. He/she then logs on to the remote PC (or virtual machine) and registers and activates a Solution Manager session which listens periodically if a scheduled job needs to be executed. 3. Once the job execution has started, the automated tests contained in the test package are executed. 4./5. The external test tool executes the scripts and automatically logs on the relevant system under test. 6. When finished, the test results are returned and stored in Solution Manager and the Test Engineer/Coordinator can follow-up with an analysis of the test results and initiate further activities (e.g. create support messages or report a test case error) if needed. 5.3.1 Prerequisites The following prerequisites need to be fulfilled for scheduling the execution of unattended tests on a remote machine: One or more physical clients or a Terminal Server/Citrix client are available The following software must be installed on the remote machines: o SAPGUI. Note: All Systems under test need to be maintained in the SAP Logon so they can be called by the external test tool. Enable scripting in the SAPGUI settings. o The external Test Tool. The machines need to be accessible remotely. Adjust the system settings of the remote machine if needed after consultation with your IT security department. The Remote Settings can be change via Start > Control Panel > System > Remote Settings > Remote Desktop: Click an option and specify who can connect, if needed. You need access rights (user and password) to logon to the remote machine. You need to know the Computer name of the remote machine on which the execution shall take place. The computer name of a windows computer can be found e.g. via Start > Control Panel > System. The scheduling of the job and the registration of the session on the remote machine need to be performed using the same User-ID. 5.3.2 How to schedule the unattended execution 1. In the Tester Worklist, select a test package and click button Schedule: Page 67

2. The Scheduling screen is displayed. Enter a Job Name and select Execution in Foreground. Click Execute: 3. Enter a Start Time, e.g. a Date/Time and click Save: Page 68

4. A confirmation message is displayed: 5. Go back to the Tester Worklist and do a Refresh. The scheduled test package is marked with the Scheduled icon: 6. Logon to the remote machine on which the test cases shall be executed. This can be done e.g. using Windows program Remote Desktop Connection.Under Windows Vista this program can be found via Start > All Programs > Accessories > Remote Desktop Connection: Page 69

7. Enter the Computer name of the remote machine and click Connect: 8. Logon to the remote machine: 9. On the remote machine, start SAP Logon and logon to the same Solution Manager system on which you scheduled the job for the automated execution: Page 70

Important: The logon and the following registration needs to be performed with the SAME user which was used for scheduling the job. The User-ID is the sole connection between the scheduled job and the session on the remote machine. 10. Start transaction STPFE (Foreground Scheduler): 11. In the Foreground Scheduler click button Register: 12. In the Foreground Scheduler click button Register: Page 71

13. A system confirmation message is displayed: This SolMan session is now registered and active and checks every 60 seconds if a job needs to be executed which was scheduled by the same user. This round-trip from the remote session to the SolMan server keeps the session alive. Therefore the session does not time-out after the usual period of inactivity. 14. Remote execution Once the start time has been reached the registered session on the remote PC executes the scheduled test cases: The external test tool is automatically launched and the individual tests and variants are automatically executed on the remote PC. 15. After the execution has finished, refresh the Tester Worklist. The test package is indicated with an icon confirming that the job was finished: 5.4 Execution log Execution logs can be viewed from different locations in Solution Manager. a) Directly after the execution of an automated test case In the Start Options screen for the test case execution mark the Option Log Display : Page 72

This option will bring up the execution log right after the execution of the automated test case. b) Work Center Test Management > Logs In the Work Center Test Management go to view Logs : It is possible to search for logs by various search criteria. c) In SOLAR02 Select a Test Configuration which was executed at least once and click button Log It is possible to open the Test Configuration Log (ecatt log) or the Test Tool Log (log display of external test tool): Page 73

d) STCE or SECATT > Log selection Open transaction STCE or SECATT Click button Logs Enter selection criteria Hit Execute The result list displays all relevant logs with various data like status, start date & time, etc.: 5.5 Notification emails Page 74

Testers can receive notification emails about the execution of test cases and the test results. Notification e-mails can be sent in two cases: A failure occurs during the execution of a test case (only the first error triggers a notification email). The execution is finished. To receive notification emails, the user must be registered. To register for receiving notification emails means that one of the following roles in the testing process must be assigned to the user: Tester Test Plan owner Test Package owner Typically, the role Tester is used. You can use the additional roles Test Plan owner or Test Package owner if the testing process in your organization requires to do so. During development, for example, it can be useful that a user can appear in different roles: as a tester in test plan 1 and test package owner in test plan 2. Note: The roles Test Package owner and Test Plan owner are attributes of the respective objects (Test Package or Test Plan, respectively). There is no relation to SAP authorization roles. Prerequisites: You have authorization as an administrator. A business partner with a valid e-mail address is assigned to the user. 5.5.1 Register users for receiving notification emails when test executions fail The sending of notification emails is setup individually for each user by maintaining a certain user parameter (AGS_SMT_NOTIFICATION) in the user data (SU01). 1. In the Solution Manager system call transaction SU01. 2. Select the user for which you want to activate notification emails. 3. Open the user data in change mode 4. Go to the Parameters tab. 5. Add Parameter AGS_SMT_NOTIFICATION. Enter parameter values depending on the role of the user in the test management. The attribute value has three digit positions. If the user is a Tester, enter an X on the first position. The Tester is notified each time the user executes the test. If the user is the Test Plan owner, enter a blank on the first position and an X on the second position. The Test Plan owner is notified each time someone executes a test from a test plan which is assigned to the Test Plan owner. If the user is the Test Package owner, enter blanks on the first and second position and an X on the third position. The Test Package owner is notified each time someone executes a test from a test package which is assigned to the Test Package owner. Page 75

If you want to be notified in every case, enter X on all three positions. Example (for notification in all cases): 6. Save your entries. 5.5.2 Change templates for notification emails The templates used for the test management notification emails are based on SAP Smartforms technology. The following standard templates (Smartforms) are delivery by SAP: Test Execution Completed (Smartform ID AGS_SMT_NOTIFY_EXECUTED) Test Failure Occurred (Smartform ID AGS_SMT_NOTIFY_FAILED) Page 76

In order to adapt the notification templates to your needs, first copy the standard smartforms to the customer namespace and then change the assignment in customizing. Prerequisites: You need authorization to execute transaction SMARTFORMS. 1. In Solution Manager open transaction SMARTFORMS 2. Search for one of the above standard templates and copy it to the customer namespace (Z*) 3. Adapt the smartform to your needs (please refer to the Smartforms documentation for more details regarding this technology) 4. Replace the smartforms assignment in customizing: Open the Test Management Work Center > go to Administration > open link Test Case Execution Smart Form Settings (optional path via Customizing: SPRO > SAP Solution Manager > Capabilities (Optional) > Test Management > Test Capability Extensions > Assign Form for E-mail during Testing): Page 77

6. Business Process Change Analysis (BPCA) Business Process Change Analyzer is an application which helps in executing a change impact analysis and allows to do a risk based test planning and execution. It is part of the end to end Integration Testing standard for SAP Solutions. The below picture shows the different phases of Business Process Change Analyzer: Within the Test Automation Framework, BPCA is used for risk-based test scope optimization as well as for change impact analysis during the repair process of damaged test cases resulting in an accelerated maintenance of damaged test cases. The information provided in this document focuses on BPCA in the context of the Test Automation Framework, especially how to make use of automated test cases for recording of TBOMs (Technical Bill Of Material). By recording TBOMs when executing automated tests significant time savings can be realized compared to manual recording of TBOMs. 6.1 Generating a TBOM (Technical Bill Of Material) A prerequisite for doing a Business Process Change Analysis is the availability of TBOMs for process steps. TBOMs are collected for each transaction associated with various business process steps in SOLAR02 > Transactions tab. While executing these business process steps, a trace is running in the background which collects information of all SAP objects touched during this execution. This is a mandatory documentation step which is needed for all critical business process steps for evaluating them against any changes using BPCA. Page 78

TBOMs can be generated manually (while a user executes the process step) or automatically during execution of a test case related to the process step. The automatic recording of TBOMs is available with the introduction of the Test Automation Framework with Solution Manager 7.1. Also with Solution Manager 7.1 it is possible to create TBOMs for business processes which span across multiple systems: This feature will eliminate the limitation of not being able to create TBOMs when business process steps are executed on more than one system. 6.1.1 Manual recording of a TBOM In order to manually record a TBOM for a transaction execution, the following steps are required (example for transaction VL01N Create Delivery): 1. Go to Test Management Work Center in Solution Manager, e.g. using the transaction SOLMAN_WORKCENTER 2. Go to Test Preparation view. 3. Select the relevant project 4. Click on button "Configuration. The project is opened in transaction SOLAR02. 5. Navigate to the business process step in the project hierarchy, e.g. in this example O2C Order to cash implementation project-> Business Scenarios->Business Processes-> Order to Cash- >Create Delivery 6. Go to the Transactions tab 7. Select the transaction VL01N (example) 8. Click on button Attributes Page 79

9. In the "Attribute Maintenance" screen, go to "TBOM" tab: 10. Click "Create new" button. The Create TBOM screen appears 11. Select the "Dynamic" check box: 12. Click the "Ok" button. You will be taken to the VL01N transaction. Create a delivery using that transaction. 13. TBOM will be created and a success message is displayed: Page 80

6.1.2 Automatic recording of a TBOM For automatic recording of a TBOM using an automated test case, the following steps are required (example for transaction VA21 Create Quotation): Activate a test case for automatic TBOM recording: 1. Go to Test Management Work Center in Solution Manager, e.g. using the transaction SOLMAN_WORKCENTER 2. Go to Test Preparation view. 3. Select the relevant project 4. Click on button "Configuration. The project is opened in transaction SOLAR02. 5. Navigate to the business process step in the project hierarchy 6. Go to Test Cases tab: Make sure an automated test case is assigned which covers the transaction for which the TBOM needs to be created. 7. Go to the Transactions tab 8. Select the transaction VA21 (example) 9. Click on button Attributes 10. In the "Attribute Maintenance" screen, go to "TBOM" tab. 11. In the area Assigned Automated Test Cases all automated test cases (as maintained on the Test Cases tab) are listed. 12. Add a flag in the Assigned for TBOM box for each test case you would like to enable for automated TBOM recording: Page 81

Execute a test case with automatic TBOM recording: Note: The execution of an automated test case with TBOM recording is only possible from within a test package. It is therefore required that a test plan and a test package have been created and assigned to a tester. From the Tester Worklist, the execution with TBOM recording can be triggered: 1. Go to Test Management Work Center in Solution Manager, e.g. using the transaction SOLMAN_WORKCENTER 2. Go to Tester Worklist view. 3. Select the relevant test package and test case which shall be executed 4. Click on Run 5. On the Start options screen, mark the option Activate TBOM Recording 6. Start the execution of the test case. 7. The TBOM is automatically created in the background. You can verify the recording of the TBOM by checking the execution log or directly in SOLAR02 > Transactions > Attribute > TBOM tab. 6.1.3 Prerequisites and additional information on BPCA For detailed information regarding the BPCA concept, prerequisites, setup and execution please see HowTo-Guide for BPCA, available in the SAP Service Marketplace: http://service.sap.com/testing > Additional Information > Test Management > How to guide - Business Process Change Analyzer. Page 82

7. Reporting Regarding consistency and gap reports for Test Plans please refer to chapter Test Planning of automated tests > Coverage & Consistency checks for Test Plans. 7.1 Status Reporting 7.1.1 Check Status for Current Test Phase Goal: Check the status for the current test phase. Benefit: The Status Info System within SAP Solution Manager offers an efficient and flexible way of getting a snapshot of current test activities and related messages. How to generate the report: To create a negative list of test cases that are not assigned to a test plan or test package, proceed as follows: 1. Call up transaction SOLMAN_WORKCENTER to access the work center. 2. From the navigation bar, choose the Test Management work center. 3. From the navigation area on the left of the screen, choose Test Evaluation. The view that opens contains an overview of all test plans and the status of the corresponding test cases on an aggregated level. To evaluate the test plans on a more granular level, various tools are available, which will be explained in more detail below. Note: The Test Evaluation area within the Test Management Work Center is the central place to access most of the test reporting tools. The Work Center provides a high degree of flexibility Page 83

when it comes to personalization and the definition of own queries. 4. In the content area, search for the desired test plan and highlight the appropriate row. If required, use the filter functionality to find your test plan. 5. Choose Goto Status Overview. This takes you to the Status Overview Test Organizer screen. This view provides you with high-level status information on the results of the selected test plan and its associated test packages. It also indicates whether problem messages have been created for the test phase. Recommendation: You can toggle between absolute values and percentages: From the menu bar, choose Utilities Settings Status and select the desired radio button. Further Options - Detailed Status Analysis: 6. To obtain more detailed information place the mouse pointer on either the test plan (top level node) or a test package in the structure. Page 84

7. Choose the Status Analysis pushbutton ( ). This opens the Status Analysis screen for the selected test plan/test package. The Status Analysis screen provides you with all kinds of test-related data (such as test status, result documentation, availability of messages and notes, etc.) and allows you to drill down to individual test cases. 7.2 BI Reporting You can analyze test management using the BI reporting analyses which allow you to access various graphic overviews and extensive filter capabilities. You also have access to the functions of the BI system. These tools are particularly useful for quality managers and test organizers. 7.2.1 Activation of BI Reporting for Test Management In Work Center Test Management go to view Administration and click on link Reporting (Analytics) Settings : Page 85

The following settings are required: Page 86

RFC connections between the SAP Solution Manager and BW systems The RFC connections are created when the managed systems are configured, in the SAP Solution Manager basic configuration. Alternatively, get the SAP Solution Manager and BW system RFC destinations from the transaction SM59. If the BW client is in the SAP Solution Manager system, use the value NONE. Time zone for BW data timestamp Every timestamp is based on this time zone. BW administration user In the SAP Solution Manager basic configuration, you specify the BW system user who can activate the BI content. Forced BI Content Activation By default, the flag to force BI content activation is set in initial configuration, or after an upgrade. Note: When you upgrade to the current release, you must migrate your BW data, if you already use BW reporting in test management. Data must be migrated so that you can continue to use your existing BW data in the updated BI content structures. SAP Note 1433304 contains further information. You can display the set-up settings made, in the log. Data Extraction Settings Specify the interval for the data extraction from the SAP Solution Manager system. By default, extraction is daily at 23:30, so analyses in the BW system are based on the latest day's data. If the interval is not sufficient for the data processing, it is automatically adjusted. Calculating the memory required for BW data You can calculate approximately how much additional memory you will need monthly for data records in the BW system, from various criteria (e.g. number of test plans to be analyzed at the same time, test plan scope). Health Check Various self-checks in the SAP Solution Manager and BW system check the status of the BW reporting settings. The self-check statuses are aggregated to an overall status. If error messages are sent, you get further information about the cause of the error. See also SAP Note 1333715 - Central note for Test Workbench BI Reporting. This is the central note for Test Workbench reporting. It contains the current information about known problems. Page 87

7.2.2 Status Report Goal: Display an overview of the status of selected test plans including a message overview. Benefit: Efficient and flexible way to visualize the test status on a day-to-day basis. How to generate the report: 1. Call up transaction SOLMAN_WORKCENTER to access the work center. 2. From the navigation bar, choose the Test Management work center. 3. From the navigation area on the left of the screen, choose Test Evaluation. 4. In the content area, select the test plan for that you want to perform the status reporting. 5. Choose the Status Report pushbutton and, from the context menu, select the option Test Plans. The BI report for the current status of the selected test plan is displayed in a new window. The report also includes a message overview for priority 1 3 messages. Page 88

By default, data is displayed for the date of the last data extraction. Using drilldown and filter functionalities, you can adjust the view on the data to obtain different levels of granularity. In addition, detailed information is displayed in a tabular overview at the bottom of the screen. 7.2.3 Progress Report Goal: Display the progress of the test case status over a certain period to support project leads and test coordinators in detecting potential delays. Benefit: Efficient and flexible way to visualize the test progress on a day-to-day basis. How to generate the report: 1. Call up transaction SOLMAN_WORKCENTER to access the work center. 2. From the navigation bar, choose the Test Management work center. 3. From the navigation area on the left of the screen, choose Test Evaluation. Page 89

4. In the content area, select the test plan for that you want to perform the status reporting. 5. Choose the Progresss Report pushbutton and, from the context menu, select the option Test Plans The BI report for the test progress of the selected test plan is displayed in a new window. By default, the last 30 days are set as filter. data is displayed for the date of the last data extraction. Using drilldown and filter functionalities, you can adjust the view on the data to obtain different levels of granularity. In addition, detailed information is displayed in a tabular overview at the bottom of the screen Page 90

7.2.4 Messages Report Goal: Display an overview of the number and status of test-related messages for a selected project or test plan. Benefit: Efficient and flexible way to analyze message-related data.. How to generate the report: 1. Call up transaction SOLMAN_WORKCENTER to access the work center. 2. From the navigation bar, choose the Test Management work center. 3. From the navigation area on the left of the screen, choose Test Evaluation. 4. In the content area, select the test plan for that you want to perform the status reporting. 5. Choose the Progresss Report pushbutton and, from the context menu, select either the option Test Plans or Projects/Solutions. The BI report for test-related messages is displayed in a new window. Page 91

The messages report offers both an overview of messages by status and an overview of messages by priority. In addition, it provides a list of messages with links allowing you to directly access a message in order to obtain further details. 7.2.5 Test Effort Report Goal: Display an overview of the test effort and show if the planned effort is sufficient or whether it will be exceeded. Benefit: The test effort report allows you to analyze the ratio between planned effort, actual effort, and expected total effort. It can support project leads and test coordinators in identifying potential resource bottlenecks. How to generate the report: 6. Call up transaction SOLMAN_WORKCENTER to access the work center. 7. From the navigation bar, choose the Test Management work center. Page 92

8. From the navigation area on the left of the screen, choose Test Evaluation. 9. In the content area, select the test plan for that you want to perform the status reporting. 10. Choose the Test Effort Report pushbutton and, from the context menu, select the option Test Plans. The BI report for test effort is displayed in a new window. The test effort report indicates the progress of the test status and visualizes the evolution of the test effort. Apart from that, the report provides a graphic representation of effort that is above and below plan. The test effort report also allows you to compare planned effort, actual effort, and expected total effort. To detect deviations between actual effort and expected effort, proceed as follows: 11. On the Overview: Test Effort screen, go to the Test Plans / Test Packages / Nodes tab. Page 93

12. From the dropdown list, select the level for that you want to display the effort data. The following options are available: o o o Drilldown by Test Plans Drilldown by Nodes Drilldown by Test Packages The bar chart that is displayed allows you to compare the expected total effort for all test cases, the actual effort, and the planned effort for test cases that have already been processed. Page 94

8. Repair of Damaged Test Cases The Test Automation Framework supports the repair process for damaged test cases by providing several new functionalities: A workflow from the Test Executor to the Test Engineer to request the repair of a test case A central repair environment for the Test Engineer to perform a problem analysis and checks, to edit and run test scripts and to perform a detailed system change analysis Change Impact Analysis (SAP Solution Manager BPCA) integrated into test case maintenance To accelerate the repair of automated test cases, the following features are available for the Test Engineer (see next chapters for details): 1. Complete information about execution environment (Tester, Test Package/Plan, System under Test, System Role, Date & time, Project) 2. Directly Run/Display/Edit Test Configuration 3. Directly Display/Edit Test Script in external tool 4. Directly display Execution Logs (internal and test tool log) 5. Log messages overview 6. Directly open Usage Location of the Test Configuration 7. Directly show all related messages (support messages and test case error messages) 8. Directly initiate a Change Analysis Page 95

8.1 Workflow to report a Damaged Test Case The failure of an automated test case execution can have various reasons. In case of an application error, the Tester/QA Expert creates a support message. If the failure is rather related to a problem within the test configuration itself, a Test Case Error Message is created. The Test Case Error Message is automatically send to Damaged Test Case Worklist of the responsible Test Engineer who analyses and repairs the test case and initiates a re-test by the Tester. 8.1.1 Prerequisites Role SAP_STWB_WITC_CREATE (Role for Work Item Test Case (WITC) Creator) needs to be assigned to the user. A business partner has been created and is assigned to the user who creates the work item as well as for the Test Engineer to whom the work item is assigned (see chapter Creation of Business Partners ). A business partner needs to be created for all persons who shall be assigned to the work item as processor. In the Tester Worklist of the Test Management work center, you have performed a test case which failed. The status shows red (Error). 8.1.2 Create a Test Case Error Message 1. In the Tester Worklist, select a test package which contains failed test cases. 2. Click button Report Test Case Error. 3. The Report Test Case Error screen appears. Per default all test cases with status Error are listed and selected: Page 96

o Button Create : Immediately creates a Test Case Error Message for each of the selected test cases and assigns them to the corresponding Test Engineer (default is the Person Responsible maintained in the test configuration). o Button Mark Default selection : Switches the selection to the initial system default (all test cases in red status for which no message has been created yet). o Button Show All : Lists all test cases contained in the test package. It is also possible to create messages for test cases which did not fail, e.g. if a general check should be performed by a Test Engineer. o Button Create with ui : Displays all values which are used for creating the message: The values can be changed manually if needed. By clicking OK the message is created. 4. Select all test cases for which a Test Case Error Message is to be created and click button Create. 5. In the Tester Worklist, do a refresh. 6. All test cases with a (not completed) Test Case Error are indicated with a Damaged icon: Result: The Tester sees at a glance for which Test Cases a Test Case Error has been created and is in process. Page 97

Note: As long as the test case has not been classified as damaged by a Test Engineer the Damaged flag is only visible for the Tester who created the message. A Test Engineer has the possibility to distribute the damaged flag so the test case get marked as damaged in the Test Packages of all Testers who have it assigned in their Test Packages. 8.2 Central repair environment for Test Engineers Once a Test Case Error Message has been created by the Tester the indicated Test Engineer automatically receives the message in its Damaged Test Case Worklist. 8.2.1 Damaged Test Case Worklist The Damaged Test Case Worklist supports the administration of the repair process of damaged test cases. Test Engineers and QA Experts use the Damaged Test Case Worklist for monitoring the processing status of Test Case Error Messages. The following actions are possible directly from the Damaged Test Case Worklist: 1. Run Test Case: Directly executes the Test Configuration (opens start options screen) 2. Display: Directly opens the Test Configuration in display mode 3. Repair: Opens the Repair Test Case screen which displays all details of Test Case Error Message and provides various analysis tools and repair options (see chapter below for details) 4. Test Script > Display: Opens the Test Script in display mode in the external test tool 5. Test Script > Change: Opens the Test Script in edit mode in the external test tool and allows immediate repair or adaptation of the test script 6. Goto > Usage Location: Directly opens the location (process step) in the corresponding SolMan project (transaction SOLAR02) and show the Test Configuration on the Test Case tab Page 98

7. Goto > Status Maintenance: Opens the Status Maintenance screen of the Test Case (display mode only): shows the test case execution status and a list of all related messages (support messages and test case error messages) 8.2.1.1 Prerequisites for handling Test Case Error Messages The following authorization roles exist and need to be assigned to the respective users: o SAP_STWB_WITC_ADMIN Role for Work Item Test Case (WITC) Administrator o SAP_STWB_WITC_CREATE Role for Work Item Test Case (WITC) Creator o SAP_STWB_WITC_DIS Role for Work Item Test Case (WITC) Display o SAP_STWB_WITC_EXE Role for Work Item Test Case (WITC) Processor A business partner has been created and is assigned to the user who creates the error message as well as for the Test Engineer to whom the work item is assigned (see chapter Creation of Business Partners ). A business partner needs to be created for all persons who shall be assigned to the work item as processor. The Test Engineer has assigned all relevant roles needed for analyzing, executing and maintaining automated test cases. 8.2.2 Test Case Error Message In order to analyze and repair a Damaged Test Case the Test Engineer selects an entry from the Damaged Test Case Worklist and clicks button Repair. The Repair Test Case screen is opened in display mode. This view provides a comprehensive environment for Test Engineers to analyze and repair damaged test cases: Page 99

To edit the Test Case Error message switch to change mode (button Edit ). To save the changes click on Save and exit the message (button Close ). The following data can be maintained in the message: Status: The status of the Test Case Error Message (see chapter Customizing of the transaction type for details) Description: The description of the Test Case Error Message. Test Engineer: The Test Engineer to whom this message is assigned. To forward the message to a different Test Engineer change the assignment to a different Business Partner using the search help. Category: The category hierarchy (Level 1 Level 4) depends on the customer specific customizing (see next chapter Customizing of the transaction type for details). Page 100

Comments: On the Comments tab all text comments added by involved processors are logged and additional text can be added. All actions should be documented for later reference. The following actions are possible directly from the Repair Test Case screen (see following chapters for details): 1. Open the Test Configuration: Directly opens the Test Configuration 2. Run Test Configuration: Directly (re-)executes the Test Configuration 3. Display Test Script: Opens the Test Script in display mode in the external test tool 4. Edit Test Script: Opens the Test Script in edit mode in the external test tool and allows immediate repair or adaptation of the test script 5. Test Configuration Log: Opens the log display of the last execution (SAP internal log) 6. Open the Test Tool Log: Directly opens the log of the last execution in the external test tool 7. Open the Project: Directly opens to the usage location (process step) in the corresponding SolMan project (transaction SOLAR02, Test Case tab) 8. Log messages tab: Provides an immediate overview of all error messages automatically retrieved from the SAP internal execution log 9. Change Analysis tab: Allows to immediately run a Business Process Change Analysis 10. Action Log tab: Shows when and by whom the message was created and last changed. 8.2.2.1 Open Test Configuration Click on the Test Configuration ID to directly open the Test Configuration: From here all components of the Test Configuration can be accessed: Test Script, System Data Container, Test Data Container. Check the Variants used in the Test Configuration Page 101

Directly execute the Test Configuration Access all previous execution logs Open directly the test script in the external tool Access Generic Attributes and Execution Attributes Etc. 8.2.2.2 Run Test Configuration Directly (re-)executes the Test Configuration (opens start options screen): On the start options screen additional analysis features can be activated, e.g. Debugging Mode, Breakpoints. 8.2.2.3 Display Test Script Opens the Test Script in display mode in the external test tool (example with HP QTP): Check or execute the test script from within the test tool. Note: It is not possible to switch to edit mode after opening the script in change mode. This is for technical reasons in order to keep the linkage to Solution Manager when doing changes in a script. Page 102

8.2.2.4 Edit Test Script Opens the Test Script in edit mode in the external test tool (example with HP QTP): Allows immediate repair or adaptation of the test script Make use of repair and maintenance features provided in the external test tool If supported by the test tool the results from the Change Analysis can be used to detect damages (test tool needs to support SM-TSTR interface functionality) 8.2.2.5 Open Test Configuration Log Opens the log display of the last execution (SAP internal log): Browse through the SAP internal log (ecatt format) and display errors. Open external log in external test tool 8.2.2.6 Open Test Tool Log Click on the Log ID to directly open the log of the last execution in the external test tool: Page 103

Make use of analysis features provided in the external test tool 8.2.2.7 Open Project Click on the Project ID to directly go to the location (process step) in the corresponding SolMan project (transaction SOLAR02) and show the Test Configuration on the Test Case tab: Analyze the project environment of the test case Open, execute or change the Test Configuration Check the assigned transaction and it s TBOM (if available) Go to display or change mode of the test script in the external tool Open the SAP internal log or directly open the external log Etc. 8.2.2.8 Log messages The log messages tab in the Test Case Error Message provides an immediate overview of all error messages automatically retrieved from the SAP internal execution log: All error messages (status = red) are listed for immediate review 8.2.2.9 Change Analysis Run a BPCA analysis to identify objects which are used in the script and which have been impacted by a recent change. For details see separate chapter Change Analysis for Damaged Test Cases. Page 104

8.2.2.10 Action Log Shows when and by whom the Test Case Error Message was created and last changed: 8.2.3 Customizing of the transaction type for Test Case Errors The Damaged Test Case Work Item is based on a CRM business transaction type. The default transaction type delivered by SAP and maintained for the creation of Damaged Test Case Work Items is SMDT Test Case Error. The assignment of the transaction type can be changed via Work Center Test Management > View Administration > Central Test Workbench Settings: Select entry Transaction-Type for TWB Service-Desk-Messages : Page 105

The transaction type relevant for Damaged Test Cases is maintained for Application TWBDTCTAB : You can either use the standard transaction type SMDT Test Case Error or you customize your own transaction type by copying transaction type SMDT to the customer name space and adapt it to your needs, e.g. by defining your own status profile, partner profile, text profile, categorization and more. Transaction type customizing can be done via SPRO > SAP Solution Manager Implementation Guide > SAP Solution Manager > Capabilities (Optional) > Service Desk > Transactions. In order to copy the standard transaction type SMDT (as delivered by SAP) to the customer name space proceed as follows: 1. SPRO > SAP Solution Manager Implementation Guide > SAP Solution Manager > Capabilities (Optional) > Service Desk > Transactions > Define Transaction Types: Search for Transaction Type SMDT and copy it to the customer name space, e.g. ZSMD Page 106

2. SPRO > SAP Solution Manager Implementation Guide > SAP Solution Manager > Capabilities (Optional) > Service Desk > Transactions > Specify Several Transaction Types: a) Specify Transaction Type Copy the standard entry for transaction type SMDT and adapt it to your new transaction type. Increase the Seq.No. by 1: b) Classify Transaction Type Copy the standard entry for transaction type SMDT and adapt it to your new transaction type. 3. Assign the newly created Transaction Type in the Central Test Workbench Settings as described above (replace SMDT with your own one, e.g. ZSMD): Please refer to the CRM transaction type customizing documentation for further details. 8.2.3.1 Status Customizing In order to adapt the Status profile to your needs, proceed as follows: 1. Copy the standard status profile SMDT_STD to the customer name space: SPRO > SAP Solution Manager Implementation Guide > SAP Solution Manager > Capabilities (Optional) > Service Desk > Status Profile > Define Status Profile for User Status: Page 107

Search for standard status profile SMDT_STD and copy it to the customer name space, e.g. ZSMD_STATUS: Adapt the new status profile to your needs. (See customizing documentation or online documentation for further details.) 2. Assign the newly created status profile to your transaction type: SPRO > SAP Solution Manager Implementation Guide > SAP Solution Manager > Capabilities (Optional) > Service Desk > Transactions > Define Transaction Types: Open transaction type ZSMD and replace the standard status profile with the new one. 8.2.3.2 Category Customizing The Category of a Test Case Error message allows to classify the reason for a damage in a structured way. The so-called multi-level categorization can contain up to 4 Levels: Page 108

The category is important for the handling of Test Case Error Messages for several reasons: It categorizes the message in a structured and standardized way It can be used for the determination of responsibilities and the dispatching of messages It is important for later reporting (e.g. What are the most common reasons for damaged test cases?) SAP does not deliver a standard Categorization Schema for Test Case Error Messages. Customers can setup their own Categorization Schema. How to create a Categorization Schema Instructions on how to create a Categorization Schema for Test Case Error Messages can be found in the IMG: SPRO > SAP Solution Manager Implementation Guide > SAP Solution Manager > Capabilities (Optional) > Test Management > Extended Configuration > Test Cases > Categorization of Test Case Errors (see documentation for all assigned customizing steps). 1. Map Transaction Types to Catalog Categories Under Transaction Types to Catalog Categories: If you have created your own transaction type for Damaged Test Cases (e.g. ZSMD) copy the entry for standard transaction type SMDT for your new transaction type. Make sure the Catalog Category is Defect Locations/Object Parts : Page 109

2. Create a Categorization Schema The creation, activation and maintenance of Categorization Schemes is done in the Category Modeler. There two different ways to access the Category Modeler. a) Via BSP Application In the favorites of your Easy Access Menu, add an entry of type SAP CRM People Centric UI Application, Application = CRMM_ERM_CAT, description = Category Modeler. Prerequisite: The service CRM_BSP_FRAME needs to be activated via transaction SICF. b) Via IT Service Desk The Category Modeler can also be accessed via the CRM WebUI, Business Role SOLMANPRO Solution Manager ITSM > Service Operations > Categorization Schemas Page 110

Create a new Categorization Schema. Indicate Application "Service Request/Incident" with Parameter "Transaction Type/Catalog category and the value: <Description of Transaction Type for Test Case Error Messages> and <Defect Locations/Object Parts>. Define your multi-level categorization entries. Save and activate your new Categorization Schema. For additional information regarding the use of the Category Modeler, see also online help: http://help.sap.com/saphelp_crm70/helpdata/en/48/bbe9add6b3356be10000000a421937/frameset.ht m Page 111

8.3 Change Analysis for Damaged Test Cases To check whether the failure of an automated test case was caused by changes in the respective system, a Business Process Change Analysis can be run directly from the Test Case Error Message: Target System: The target system indicates the system against which the analysis shall be executed. It is defaulted with the system in which the test case was executed. Change Interval: The change interval start date is the date of the last successful execution of the test case. The change interval end date is the date of the failed execution of the test case and for which damaged test case work item was created. Test Case Created on: Indicates when the Test Case (Test Configuration) was created. Analysis Description: The Analysis Description is defaulted with a prefix and the message ID. Additional text can be added. To start the generation of the analysis click the Run button. Refresh the list (button Refresh) to check if the generation has been completed. Once the BPCA result is created, display the result by clicking on the respective result ID. The BPCA Result screen comes up. The system changes from the date of the last successful execution to the date, when the execution of the test case failed, are displayed. For more information, please see the HowTo-Guide for BPCA, available in the SAP Service Marketplace: http://service.sap.com/testing > Additional Information > Test Management > How to guide - Business Process Change Analyzer. Page 112

8.3.1 Example: Change Analysis indicating UI change The following example shows how a Business Process Change Analysis can help identify the reason for a test case failure. In this case an automated test of the Create Sales Order (transaction VA01) process failed for unknown reasons and the Tester created a Test Case Error Message. The Test Engineer does a change analysis and discovers a recent change: On the Sales Order screen the Purchase Order field was defined as mandatory. In the test script this field is not maintained which lead to the failure of the test case. He corrects the test script (adds the PO number) and initiates a retest. 1. Open the Test Case Error Message and go to tab Change Analysis. Enter a Change Interval and an Analysis Description and hit the Run button: 2. Refresh the result list and open the analysis result by clicking on the Result ID: Page 113

3. The BPCA Result screen comes up. Click on button Display Intersection: 4. On the BPCA Intersection Result Display screen, drill down the hierarchy and search for potential changes. Package VA0C was impacted by a change which is contained in transport request C5PK000152: Page 114

5. Click on the Request number. The transport will be displayed directly in the target system. (Alternative way: Logon manually to the target system and open transaction SE01 (Transport Organizer), enter the Request number and click Display): 6. The transport request indicates a change in the Incompleteness Procedures (00411VBKD BSTKD). Click on IMG Activity: Define Incompleteness Procedures: Page 115

7. The corresponding customizing path is directly displayed: 8. Check the corresponding customizing and search for a change. In this example, field PO number was marked as mandatory (Warning = checked) which was the reason for the test case failure: 9. Go back to the Test Case Error Message. 10. Directly open the test script in the test tool by clicking button Edit Test Script : Page 116

11. Adapt the test script to the new system behavior by adding field PO number (example with HP QTP): 12. Save the corrected test script and return to the Test Case Error Message. 13. Directly from here the test configuration can be executed (button Run Test Configuration) and checked if it now executes successfully: Page 117

14. After successful test the Test Engineer adds a final comment (tab General Data) and sets the status of the message to e.g. Completed (status values depend on customer-specific customizing): 15. The repair process has been completed and the test case is ready for use for further tests. Page 118

9. Appendix 9.1 Further documentation For further help on Solution Manager and Test Management please refer to the following links (some of the links are accessible only to SAP Customers and Partners) SAP Standard Help - SAP Solution Manager -> Test Management o http://help.sap.com/saphelp_smehp1/helpdata/en/b3/64c33af662c514e10000000a11408 4/frameset.htm Ramp-up knowledge transfer - SAP Solution Manager 7.0 - EHP1: Build, Test and Deploy with SAP Solution Manager. Note: the link to RKT material for Solution Manager 7.1. was not yet available at the time of writing the document. o http://service.sap.com/~form/sapnet?_shortkey=01100035870000718324&_scenar IO=01100035870000000202& Presentation on integration testing with BPCA o https://websmp108.sap-ag.de/~sapidb/011000358700001927462008e SAP Standard for Test Management o http://service.sap.com/supportstandards E2E Integration Testing o http://service.sap.com/testing SAP Solution Manager o http://service.sap.com/solutionmanager SAP Solution Manager e-learning material o http://service.sap.com/rkt-solman Page 119