8-Test Automation Framework 20160729

Download as pdf or txt
Download as pdf or txt
You are on page 1of 21

Customer

SAP Solution Manager – Test Suite


Test Automation Framework and CBTA
Digital Business Services, SAP SE
Disclaimer

This presentation outlines our general product direction and should not be relied on in making a
purchase decision. This presentation is not subject to your license agreement or any other agreement
with SAP. SAP has no obligation to pursue any course of business outlined in this presentation or to
develop or release any functionality mentioned in this presentation. This presentation and SAP’s
strategy and possible future developments are subject to change and may be changed by SAP at any
time for any reason without notice. This document is provided without a warranty of any kind, either
express or implied, included but not limited to, the implied warranties of merchantability, fitness for a
particular purpose, or non-infringement. SAP assumes no responsibility for errors or omissions in this
document, except if such damages were caused by SAP intentionally of grossly negligent.

© 2016 SAP SE or an SAP affiliate company. All rights reserved. Early Knowledge Transfer Customer 2
SAP Solution Manager – Test Suite
Capabilities

Solution Change Impact


Test Planning Test Execution and Reporting
Documentation Analysis

Solution Documentation Test Plan Management Test Execution Test Management Analytics
• Executable Library • Test Plan • Manual Test Execution • Gap reports
• Process Step Library • Test Packages • Automated Test Execution • Status reports
• Business Processes • Test Sequences • Defect Management • Progress reports
• Test Cases • Tester assignment • Dashboard

Test scope estimation Test Automation Framework


Scope and Effort
before upgrade Analyzer (SEA)
CBTA (Component Based Test Automation) eCATT

HP UFT Worksoft Certify other 3rd party test automation tools


Test scope optimization Business Process
during upgrade Change Analyzer Supported UI technologies by SAP test tools: SAPGUI, WebDynpro, CRM Web-Client, SAPUI5, Fiori, …
(BPCA) Partner test tools: all other UI technologies

= optional 3rd party software


© 2016 SAP SE or an SAP affiliate company. All rights reserved. Early Knowledge Transfer Customer 3
Test Automation
Creation of automated Tests

Creation of Automated Tests


• Definition of automated test scripts using applications
from SAP (CBTA) and/or partners (HP-UFT, WS Certify) Business Process Expert
• Integration to SAP Solution Manager via open interface
Test Automation Framework
Execution of business transaction
• Assignment of Test Configuration to Executable, Process
Step or Business Process Business Quotation Sales Order Delivery
Process
Changes with SAP Solution Manager 7.2
• New attribute „Test Classification“, e.g. Single Functional Test,
Integration Test, Regression Test
Test Script embedded in Test Configuration
• System Data Container (SDC) is generated automatically – no
manual activity

© 2016 SAP SE or an SAP affiliate company. All rights reserved. Early Knowledge Transfer Customer 4
Automated Tests
Test Configuration and its building blocks

Business Process Test Configuration

Test Script Test Data System under Test


CBTA, eCATT Order Type Customer Product
OR C1000 P-100
HP UFT
OR C2000 P-200
Certify
Launch creation or maintenance
of automated tests other ISV test Test Data Container
automation tools

Composite Tests for E2E business processes covering SAP and non-
SAP process steps CBTA 1 CBTA 2 HP UFT 3 CBTA 4

SAP customers have a choice of test automation tools integrated with SAP Solution
Manager through the Test Automation Framework
© 2016 SAP SE or an SAP affiliate company. All rights reserved. Early Knowledge Transfer Customer 5
Test Automation with CBTA

CBTA (Component-based Test Automation) is part of SAP Solution Manager and


provides test automation for all major SAP UI technologies

Component-based Test Automation (CBTA) Test Composition Environment (TCE)

Business Analyst executes business  Business Transaction


Attributes  Systems under Test
transaction via CBTA
 Parameters for test data inputs
Parameters  Dynamic handover between scripts

Script  SAP delivered test components


 On the fly generated components
Components
CBTA creates test script based on test
 Data defined in Test Data Container
components during execution Test Data  Test Data Assignment Wizard

© 2016 SAP SE or an SAP affiliate company. All rights reserved. Early Knowledge Transfer Customer 6
Typical pain points with test automation

Paint points SAP Solution


 Test Scripts gets outdated due to  CBTA allows efficient update via inspection of changed UI.
changes in UI

 Requires high effort and expert skills to repair  Re-use of test components allow automated update of test
scripts that use same components

 Test Data variant get outdated due to changes in SUT  Test data management via central Test Data Container
master data assigned to test script allows central update of data without
the need to change each test data variant.

© 2016 SAP SE or an SAP affiliate company. All rights reserved. Early Knowledge Transfer Customer 7
Advantage via re-use of test data via TDC

Test Data
Test Configuration 1
Variant 1 Test Script SAP ERP

DEV

Test Configuration 2 TST


Test Data
Variant 2 Test Script
Material-ID
ABC-1
ABC PRD

Test Configuration 3
Test Data
Variant 3 Test Script

Test Data
Test Configuration 4
Variant 4 Test Script
1. ‘Material ID’ has been changed in managed system

2. Multiple test configurations which uses this Material ID


get outdated Test Configuration 5
Test Data
Variant 5 Test Script

Test Data Test Configuration 6


Variant 6 Test Script

© 2016 SAP SE or an SAP affiliate company. All rights reserved. Early Knowledge Transfer Customer 8
Advantage via re-use of test data via TDC

Test Data
Test Configuration 1
Variant 1 Test Script SAP ERP

DEV

Test Data Container Test Configuration 2 TST


Test Data
Variant 2 Test Script
Material-ID
ABC-1
ABC PRD
MATERIAL ID QTY S2P

ABC 13 100

DFG 2 200 Test Configuration 3


Test Data
Variant 3 Test Script

Test Data
Test Configuration 4
Variant 4 Test Script
1. ‘Material ID’ has been changed in managed system

2. Multiple test configurations which uses this Material ID


get outdated Test Configuration 5
Test Data
Variant 5 Test Script
3. A central Test Data Container allows to maintain test
data for multiple tests

Test Data Test Configuration 6


Variant 6 Test Script

© 2016 SAP SE or an SAP affiliate company. All rights reserved. Early Knowledge Transfer Customer 9
Advantage via re-use of test data via TDC

Test Data
Test Configuration 1
Variant 1 Test Script SAP ERP

DEV

Test Data Container Test Configuration 2 TST


Test Data
Variant 2 Test Script
Material-ID
ABC-1
ABC PRD
MATERIAL ID QTY S2P

ABC
ABC-1 13 100

DFG 2 200 Test Configuration 3


Test Data
Variant 3 Test Script

Test Data
Test Configuration 4
Variant 4 Test Script
1. ‘Material ID’ has been changed in managed system

2. Multiple test configurations which uses this Material ID


get outdated Test Configuration 5
Test Data
Variant 5 Test Script
3. A central Test Data Container allows to maintain test
data for multiple tests
4. Single update in Test Data Container is immediately
Test Data Test Configuration 6
reflected in all related Test Data variants
Variant 6 Test Script

© 2016 SAP SE or an SAP affiliate company. All rights reserved. Early Knowledge Transfer Customer 10
Test Data Assignment Wizard
to assign test data stored in TDC data to Test Configuration

Test Data Assignment Wizard


• Powerful and easy to use wizard
to find suitable Test Data
Container(s) and
• Mapping of Parameters between
Test Configuration (automated
test) and TDC
• Selection of test data for
automated test stored in TDC

© 2016 SAP SE or an SAP affiliate company. All rights reserved. Early Knowledge Transfer Customer 11
Test Data Management
Example how to use Test Data Container for multiple tests

Test Configuration 1 – Create Sales Order Test Configuration 2 – Create Delivery


Test Script 1 Test Script 2

Enter <Sales Org> Enter <Sold-to-party>


Enter <Sold-to-party> Enter <Material>
….. …..
Variant Sales Org Sold-to-party Material Variant Plant Storage Location
V1 <V1000_1> <V1000_1> <V1000_1> V1 <V2000_1> <V2000_1>
V2 <V1000_2> <V1000_2> <V1000_2> V2 <V2000_2> <V2000_2>

Test Data Container - Logistics The Test Data Container provides


the central management of test data
which re-used as a reference in
Variant Sales Org Sold-to-party Material Plant Storage Location
several Test Configurations.
V1000_1 1000 454545 P-1000 5000 0088
V1000_2 1000 454545 P-2000 6000 0099
This allows a central update of
V2000_1
V2000_2
2000
2000
656656
656656
M-5400
M-5500
5400
5400
0100
0100
values in the test data container that
V3000_1 3000 222222 U-1111 6400 0200 is immediately reflected in all related
V3000_2 3000 222222 U-1112 6400 0200
Test Configurations.

© 2016 SAP SE or an SAP affiliate company. All rights reserved. Early Knowledge Transfer Customer 12
Test Data Management – Step by Step

Test Data Design  Identify Test Configurations that uses same or similar test data parameters
 Create Test Data Container (TDC)
 Import parameters from Test Scripts or create them manually
Test Data Definition
 Get test data variants based on current data in System under Test
 Enter data variants in Test Data Container or upload via spread sheet
 Good naming convention for TDCs and variants will help for later assignment
Test Data
 Assign Test Data Container to Test Configuration
Assignment
 Mapping of parameters between Test Data Container and Test Configuration
 Assign TDC variants to Test Configuration variants

Execute tests

Update Test Data


 Execution log reports outdated test data or changed data in system under test
 Update value in data variant of Test Data Container

© 2016 SAP SE or an SAP affiliate company. All rights reserved. Early Knowledge Transfer Customer 13
Advantage via re-use of screen components
Screen-Header 1
Test Data
Test Configuration 1 Test Component 1
Variant 1 Test Script

Sub-Screen 1
Test Component 2
Test Configuration 2
Test Data
Variant 2 Test Script

Test Component 3

Test Configuration 3
Test Data
Variant 3 Test Script
Test Component 4

Test Data
Test Configuration 4
Test Component 5
Variant 4 Test Script
1. ‘Subscreen 1’ has been changed in managed system

2. Multiple test scripts that process this Subscreen get outdated Test Component 6
Test Configuration 5
Test Data
Variant 5 Test Script

Test Component 7

Test Data Test Configuration 6


Variant 6 Test Script

Screen Components are available for SAP GUI, CRM Web UI, ABAP WebDynpro
© 2016 SAP SE or an SAP affiliate company. All rights reserved. Early Knowledge Transfer Customer 14
Advantage via re-use of screen components
Screen-Header 1
Test Data
Test Configuration 1 Test Component 1
Variant 1 Test Script

Sub-Screen 1
Test Component 2
Test Configuration 2
Test Data
Variant 2 Test Script

Test Component 3

Test Configuration 3
Test Data
Variant 3 Test Script
Test Component 4

Test Data
Test Configuration 4
Test Component 5
Variant 4 Test Script
1. ‘Subscreen 1’ has been changed in managed system

2. Multiple test scripts that process this Subscreen get outdated Test Component 6
Test Configuration 5
Test Data
Variant 5 Test Script
3. For Test Script 1 inspection is triggered and Test Component
2 and all related test scripts are updated
Test Component 7

Test Data Test Configuration 6


Variant 6 Test Script

Screen Components are available for SAP GUI, CRM Web UI, ABAP WebDynpro
© 2016 SAP SE or an SAP affiliate company. All rights reserved. Early Knowledge Transfer Customer 15
New simplified adjustment of existing CBTA scripts

Execute To Step and Record additional steps to be inserted or replace existing steps

© 2016 SAP SE or an SAP affiliate company. All rights reserved. Early Knowledge Transfer Customer 16
Improved Test Composition for CBTA scripts

New possibility to reference existing CBTA scripts as child in a parent CBTA script

Allows to use IF and LOOP Default Components for CBTA not only inside CBTA scripts but also
on top of CBTA scripts.

Composite Test Scripts are still required to compose scripts with different test tools (e.g. 3rd party)

© 2016 SAP SE or an SAP affiliate company. All rights reserved. Early Knowledge Transfer Customer 17
Test Automation Framework in SAP Solution Manager
Steps to create automated test script using HP UFT

SAP Solution Manager HP UFT

Test Configuration
Test Script Test Data System Data Test System

1 Start of HP UFT recorder


Non SAP
4 Test Script with Parameters
stored in SAP Solution Manager
Test script recording
2 during business
Automatic parameter creation for input process execution
3
fields of the business transaction

Convenient test script creation through seamless integration between SAP Solution
Manager and partner test automation tools
© 2016 SAP SE or an SAP affiliate company. All rights reserved. Early Knowledge Transfer Customer 18
Test Execution
Execution of automated Tests

Execution of automated Tests


• Test execution of automated test triggered by
Test Coordinator or scheduled job
• Composite tests for testing of E2E business
processes using 1 or combination of test
automation tools.
• Scheduling of multiple test in unattended mode
in bulk at selected time, e.g. during the night to
allow mass execution
• Test results available from SAP and partner test
tools in SAP Solution Manager for reporting

© 2016 SAP SE or an SAP affiliate company. All rights reserved. Early Knowledge Transfer Customer 19
Test Automation Framework
Typical approach to execute unattended Automated Tests

Register and activate Trigger


Frontends to be used for Evaluate Test
Schedule Test execution of E-Mail
test execution Status and Follow-Up
Packages automated tests notification
Results
(T-Code: STPFE) on front ends

Frontends
- Physical Client PCs, Laptops
- Windows Terminal Server / Citrix clients / virtual machines
with installed SAPGUI , Internet Explorer, CBTA, optional 3rd party tool

Execution performed
unattended e.g.
during night

Systems under Test

© 2016 SAP SE or an SAP affiliate company. All rights reserved. Early Knowledge Transfer Customer 20
© 2016 SAP SE or an SAP affiliate company. All rights reserved.

No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP SE or an SAP affiliate company.

SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE (or an SAP affiliate
company) in Germany and other countries. Please see http://global12.sap.com/corporate-en/legal/copyright/index.epx for additional trademark information and notices.

Some software products marketed by SAP SE and its distributors contain proprietary software components of other software vendors.

National product specifications may vary.

These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or warranty of any kind, and SAP SE or its
affiliated companies shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP SE or SAP affiliate company products and
services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as
constituting an additional warranty.

In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or any related presentation, or to develop
or release any functionality mentioned therein. This document, or any related presentation, and SAP SE’s or its affiliated companies’ strategy and possible future
developments, products, and/or platform directions and functionality are all subject to change and may be changed by SAP SE or its affiliated companies at any time
for any reason without notice. The information in this document is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. All forward-
looking statements are subject to various risks and uncertainties that could cause actual results to differ materially from expectations. Readers are cautioned not to place
undue reliance on these forward-looking statements, which speak only as of their dates, and they should not be relied upon in making purchasing decisions.

© 2016 SAP SE or an SAP affiliate company. All rights reserved. Early Knowledge Transfer Customer 21

You might also like