Vous êtes sur la page 1sur 50

Automatic Test of Queries with RS Trace Tool

Tobias Kaufmann
SAP AG Walldorf, August 2007

Overview Prerequisites Trace CATT Trace Test Package Test Job Test Result Summary

Motivation Current Situation SAP ensures correctness of standard test cases Standard test cases do not cover all customer test cases Customer test cases require testing in customer system Proposed Situation Trace Tool is used to record navigation steps and data of customerspecific Queries Trace Tool is used to compare actual data with recorded reference data Reduce manual test effort for customer

SAP AG 2007, Automatic Test of Queries / Tobias Kaufmann / 3

Use cases After applying Notes or Support Packages Ensure runnable Queries (no syntax error) Ensure correctness of Query results After loading Data (InfoProvider and Master Data) Ensure correctness of cache and/or BI Accelerator Warm-up OLAP cache

SAP AG 2007, Automatic Test of Queries / Tobias Kaufmann / 4

Automatic Test of Queries General Procedure 1. Prepare Test by recording navigation steps and reference data 2. Apply Notes or Support Packages 3. Replay Test Transaction RS Trace Tool (transaction code RSTT) Definitions
Trace is a sequence of navigation steps with Checkable Program Objects CATT Trace is a Trace with recorded Reference Data Test Package bundles several CATT Traces Test Job is a scheduled job with Test Package Trace CATT Trace Test Package Test Job

SAP AG 2007, Automatic Test of Queries / Tobias Kaufmann / 5

Reference Data and Focus of Test Comparison of Reference Data and actual Data
Fix Master and InfoProvider Data is required Fix Metadata (definition of Query, InfoObject, etc.) is required Restrict to specific date (e.g. restrict to 2006 or 2005) Restrict to specific characteristic values (master data)

Scope of Test
OLAP functionality (incl. figures and ABAP syntax) Productive or test system No BEx Web (ABAP and Java Runtime) functionality No BEx Analyzer (Excel) functionality Use transaction RSRT2 (HTML view) to record navigation steps

SAP AG 2007, Automatic Test of Queries / Tobias Kaufmann / 6

Detailed Procedure (1)


2. Record navigation steps 3. Create CATT Trace based on Trace

Query

Trace
1. Activate User for Tracing

7. Load InfoProvider or Master Data

InfoProvider / Master Data


9. Running Test Job 12. Check erroneous CATT Trace manually

Test Job
10. Analyze Log of Test Job 11. Identify erroneous CATT Trace

CATT Trace
4. Record Reference Data

Notes Support Packages


8. Apply Notes or Support Packages

6. Schedule Test Package in Test Job

Test Package
SAP AG 2007, Automatic Test of Queries / Tobias Kaufmann / 7

5. Bundle CATT Traces to Test Package

Detailed Procedure (2)


Prepare Test
1. Activate User for Tracing using transaction RSTT 2. Record navigation steps in query as Trace 3. Create CATT Trace based on Trace 4. Record Reference Data of CATT Trace 5. Bundle CATT Traces to Test Package 6. Schedule Test Package in Test Job

Trace Query CATT Trace Test Package Test Job Data Support Packages

Change System
7. Load InfoProvider or Master Data 8. Apply Notes or Support Packages

Execute Test
8. Check CATT Traces by running Test Job 9. Analyze Log of Test Job 10. Identify erroneous CATT Trace with log and reporting 11. Check erroneous CATT Trace manually
SAP AG 2007, Automatic Test of Queries / Tobias Kaufmann / 8

Test Job CATT Trace

Overview Prerequisites Trace CATT Trace Test Package Test Job Test Result Summary

Prerequisites Technical Content


Used to stored Test Results InfoCube 0RSTT_C01 Query 0RSTT_C01_Q002 These objects are activated automatically Master data (text of messages) must be activated manually with report RSTT_TCT_MDLOAD

Basic Settings
Start transaction RSTT for one time initialization 1. Press Basis Settings 2. Choose Reporting, Planning and OLAP Technology as Application Area 3. Check on Trace Execution in New Roll Area
SAP AG 2007, Automatic Test of Queries / Tobias Kaufmann / 10

1 2 3

Overview Prerequisites Trace CATT Trace Test Package Test Job Test Result Summary

User Activation with Transaction RSTT


Trace is a sequence of navigation steps 3 1. Press Trace Tool 2. Check on Activation for Test Generation 3. Press Activate 4. User will appear in list of Trace Users 4 1 2

Trace CATT Trace Test Package Test Job


SAP AG 2007, Automatic Test of Queries / Tobias Kaufmann / 12

Record Navigation Step of Query as Trace (1)


1. Start transaction RSRT2 2. Enter Query 3. Choose HTML as Query Display 4. Press Execute Using Value help creates additional Trace with own Trace ID 4 1

Trace CATT Trace Test Package Test Job


SAP AG 2007, Automatic Test of Queries / Tobias Kaufmann / 13

Record Navigation Step of Query as Trace (2)


1. Navigate 2. Drill down 3. Filter 4.

Trace CATT Trace Test Package Test Job


SAP AG 2007, Automatic Test of Queries / Tobias Kaufmann / 14

View Trace (1)


1. Select Traces 2. New Trace appears in History 3. Press Display to view details 1 Traces shows History of current user Trace Collection shows complete list of all Traces 2 3

Trace CATT Trace Test Package Test Job


SAP AG 2007, Automatic Test of Queries / Tobias Kaufmann / 15

View Trace (2)


Traces contain a sequence of navigation steps Each navigation step is represented by one or more Checkable Program Objects Traces without Checkable Program Objects could not be used for testing (e.g. RRW3_WEBRFC)

Trace CATT Trace Test Package Test Job


SAP AG 2007, Automatic Test of Queries / Tobias Kaufmann / 16

Overview Prerequisites Trace CATT Trace Test Package Test Job Test Result Summary

Create CATT Trace using Wizard


CATT Trace is a Trace with recorded Reference Data 4 1. Press CATT Tool 2. Click on Wizard 3. Select Trace 4. Press Next step 3 1 2

Trace CATT Trace Test Package Test Job


SAP AG 2007, Automatic Test of Queries / Tobias Kaufmann / 18

Specify Standard Attributes


1. Enter Trace ID (*) 2. Enter Description 3. Choose BI Business Explorer as Application Layer 4. Choose OLAP Trace as Trace type (required to specify Test Context; see next step) 5. Press Next step (*) Own Trace ID helps to work with wildcards (see Test Package) 5

1 2 3 4

Trace CATT Trace Test Package Test Job


SAP AG 2007, Automatic Test of Queries / Tobias Kaufmann / 19

Specify Test Context (optional)


1. Choose Topic of Test and related Functionality 2. Press Insert 3. Press Next step

Optional
2

Trace CATT Trace Test Package Test Job


SAP AG 2007, Automatic Test of Queries / Tobias Kaufmann / 20

Select Data Object (optional)


Usage of default setting is recommended 4 1. Select Program Object 2. Press Display 3. View Data Objects 4. Press Next step 1 2

Trace CATT Trace Test Package Test Job


SAP AG 2007, Automatic Test of Queries / Tobias Kaufmann / 21

Default setting no action required

Record Reference Data


1. Press Record 2. Status will change to green and Program Objects will have content 3. Press icon to view Reference Data (see next slide) 4. Press Next step

3 4 2

Trace CATT Trace Test Package Test Job


SAP AG 2007, Automatic Test of Queries / Tobias Kaufmann / 22

View Reference Data


1. Choose Previous or Next Check Position 2. Press Back to return to Wizard 2 1

Trace CATT Trace Test Package Test Job


SAP AG 2007, Automatic Test of Queries / Tobias Kaufmann / 23

Save CATT Trace


1. View summary of settings 2. Press Save 2

Trace CATT Trace Test Package Test Job


SAP AG 2007, Automatic Test of Queries / Tobias Kaufmann / 24

Working with CATT Traces


1. Click on CATT Traces 2. Press button to perform action Check executes CATT Trace in Check Mode (run query and compare to Reference Data) Useful for problem analysis Change allows recording of Reference Data again Accept new state 2

Trace CATT Trace Test Package Test Job


SAP AG 2007, Automatic Test of Queries / Tobias Kaufmann / 25

Overview Prerequisites Trace CATT Trace Test Package Test Job Test Result Summary

Create Test Package


Test Package bundles several CATT Traces 1. Press CATT Tool 2. Click on Test Packages 3. Enter name of Test Package 4. Press button Create 1 4

Trace CATT Trace Test Package Test Job


SAP AG 2007, Automatic Test of Queries / Tobias Kaufmann / 27

Trace Selection
1. Enter Description 2. Enter Trace ID or 3. Use Multiple Selection to choose several Trace IDs 1 Wildcards are possible and resolved into several Trace IDs at execution time, i.e. new Trace IDs will be added automatically See register Trace List

Trace CATT Trace Test Package Test Job


SAP AG 2007, Automatic Test of Queries / Tobias Kaufmann / 28

Play Mode Selection


1. Click on register Play Mode Selection 2. Choose one or more combination of Read, Cache and Aggregate Mode Play Mode determinate under which conditions a Trace is performed If fields left empty, all modes are executed (i.e., 3 * 3 * 3 = 27 combinations are executed)

1 2

Trace CATT Trace Test Package Test Job


SAP AG 2007, Automatic Test of Queries / Tobias Kaufmann / 29

Trace List
1. Click on register Trace List List of all Trace IDs appears that fit to the selection under Trace Select See register Trace Select 2. Press button Save to store Test Package 2

Trace CATT Trace Test Package Test Job


SAP AG 2007, Automatic Test of Queries / Tobias Kaufmann / 30

Overview Prerequisites Trace CATT Trace Test Package Test Job Test Result Summary

Create Test Job


Test Job is a scheduled job performing CATTTraces in one Test Package 1. Press CATT Tool 2. Click on Test Jobs 3. Enter name of Test Job 4. Press button Create 2

4 1

Trace CATT Trace Test Package Test Job


SAP AG 2007, Automatic Test of Queries / Tobias Kaufmann / 32

Parameters
1. Enter Description 2. Select Test Package 3. Select Process Mode Check Mode is recommended Play Mode is only useful for ABAP syntax check 4. Check on Execute Traces in Parallel to accelerate execution 1

2 3 4

Trace CATT Trace Test Package Test Job


SAP AG 2007, Automatic Test of Queries / Tobias Kaufmann / 33

Time Settings
1. Click on register Time Settings 2. Choose Execution Mode Use Execute Immediately to check Test Job 1 3. Press button Save 2 3

Trace CATT Trace Test Package Test Job


SAP AG 2007, Automatic Test of Queries / Tobias Kaufmann / 34

Logs
1. Click on register Logs 2. Press on button Job Log to view details of Job (e.g. progress of execution) 3. Column Current shows actual step of job (press Refresh) See next section how to view Test Log Results 2 3

Trace CATT Trace Test Package Test Job


SAP AG 2007, Automatic Test of Queries / Tobias Kaufmann / 35

Execute Test Job


1. Choose existing Test Job 2. Press button Execute 2 Job will be instantly released for batch processing 1

Trace CATT Trace Test Package Test Job


SAP AG 2007, Automatic Test of Queries / Tobias Kaufmann / 36

Overview Prerequisites Trace CATT Trace Test Package Test Job Test Result Summary

System Changes Two kind of changes to system could cause errors... 1. Data Changes
Load InfoProvider Data Load Master Data Change of Meta Data Set filter to time period Set filter to characteristic values Record Reference Data again

To avoid errors cause by changed data Define Traces with fix filter to be independent of InfoProvider and Master Data load or Record Reference Data again before applying coding changes

2. Coding Changes
Apply Notes or Support Packages Traces must be without error before to identify a coding error

SAP AG 2007, Automatic Test of Queries / Tobias Kaufmann / 38

View Test Log Results (1)


Display Test Job 1. Click on register Logs 2. Use keyboard to scroll to column Reporting 3. Press icon 1

3 2

Trace CATT Trace Test Package Test Job


SAP AG 2007, Automatic Test of Queries / Tobias Kaufmann / 39

View Test Log Results (2)


Test log results are stored into InfoCube 0RSTT_C01 Test log results can be viewed with Query 0RSTT_C01_Q002 1. Use navigation to drill down to Trace ID, etc. 2. Remove filtered Log GUID to view all results 2

Trace CATT Trace Test Package Test Job


SAP AG 2007, Automatic Test of Queries / Tobias Kaufmann / 40

Analyze Test Log Result (1)


In case of an error...
1. Click on CATT Traces 2. Enter Trace ID retrieved by Test Log Result 3. Press button Check 4. Choose Check Mode as Process Mode 5. Press button Execute (see next slide) 4 5 1 3 2

Trace CATT Trace Test Package Test Job


SAP AG 2007, Automatic Test of Queries / Tobias Kaufmann / 41

Analyze Test Log Result (2)


6. View Overview 7. Click on icon Analysis 8. Compare CATT Data (actual) with Reference Data 7

Trace CATT Trace Test Packages Test Jobs


SAP AG 2007, Automatic Test of Queries / Tobias Kaufmann / 42

Overview Prerequisites Trace CATT Trace Test Package Test Job Test Result Summary

Summary RS Trace Tool allows


Checking correctness of Query results After applying Notes or Support Packages

Additional help
Documentation

Outlook
Reference Data Scope of Test

SAP AG 2007, Automatic Test of Queries / Tobias Kaufmann / 44

Outlook Reference Data Current Situation


Reference data should be restrict to specific date and/or characteristic values (master data) Reference data could be updated only on CATT Trace level (i.e. several CATT Traces must be updated manually) CATT Trace

Situation with SPS 13 (BI ABAP SP 15)


Reference data could be recorded on Test Job level (i.e. several CATT Traces are updated with one click) Test Job

SAP AG 2007, Automatic Test of Queries / Tobias Kaufmann / 45

Outlook Reference Data Procedure in SPS 13 (BI ABAP SP 15)


Prepare Test by recording navigation steps 1. Record reference data (define current state of system as correct) 2. Apply Notes or Support Packages 3. Replay Test

Choose REF Mode as Process Mode to recored new reference data

Trace CATT Trace Test Package Test Job


SAP AG 2007, Automatic Test of Queries / Tobias Kaufmann / 46

Outlook Scope of Test Current Situation


OLAP functionality (incl. figures and ABAP syntax) Productive or test system No BEx Web (ABAP and Java Runtime) functionality

Planned Situation
Enable Trace for BEx Web (Java Runtime) functionality Record navigation steps in BEx Web Ensure correctness of layer BI Consumer Services (BICS) Ensure correctness of Java Runtime (no exceptions)

SAP AG 2007, Automatic Test of Queries / Tobias Kaufmann / 47

Copyright 2006 SAP AG. All Rights Reserved


No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iSeries, pSeries, xSeries, zSeries, System i, System i5, System p, System p5, System x, System z, System z9, z/OS, AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli, Informix, i5/OS, POWER, POWER5, POWER5+, OpenPower and PowerPC are trademarks or registered trademarks of IBM Corporation. Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered trademarks of Adobe Systems Incorporated in the United States and/or other countries. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C , World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

The information in this document is proprietary to SAP. No part of this document may be reproduced, copied, or transmitted in any form or for any purpose without the express prior written permission of SAP AG. This document is a preliminary version and not subject to your license agreement or any other agreement with SAP. This document contains only intended strategies, developments, and functionalities of the SAP product and is not intended to be binding upon SAP to any particular course of business, product strategy, and/or development. Please note that this document is subject to change and may be changed by SAP at any time without notice. SAP assumes no responsibility for errors or omissions in this document. SAP does not warrant the accuracy or completeness of the information, text, graphics, links, or other items contained within this material. This document is provided without a warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability, fitness for a particular purpose, or non-infringement. SAP shall have no liability for damages of any kind including without limitation direct, special, indirect, or consequential damages that may result from the use of these materials. This limitation shall not apply in cases of intent or gross negligence. The statutory liability for personal injury and defective products is not affected. SAP has no control over the information that you may access through the use of hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-party Web pages.

SAP AG 2007, Automatic Test of Queries / Tobias Kaufmann / 48

Copyright 2006 SAP AG. Alle Rechte vorbehalten


Weitergabe und Vervielfltigung dieser Publikation oder von Teilen daraus sind, zu welchem Zweck und in welcher Form auch immer, ohne die ausdrckliche schriftliche Genehmigung durch SAP AG nicht gestattet. In dieser Publikation enthaltene Informationen knnen ohne vorherige Ankndigung gendert werden. Die von SAP AG oder deren Vertriebsfirmen angebotenen Softwareprodukte knnen Softwarekomponenten auch anderer Softwarehersteller enthalten. Microsoft , WINDOWS, NT , EXCEL, Word, PowerPoint und SQL Server sind eingetragene Marken der Microsoft Corporation. IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iSeries, pSeries, xSeries, zSeries, System i, System i5, System p, System p5, System x, System z, System z9, z/OS, AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli, Informix, i5/OS, POWER, POWER5, POWER5+, OpenPower und PowerPC sind Marken oder eingetragene Marken der IBM Corporation. Adobe, das Adobe Logo, Acrobat, PostScript und Reader sind Marken oder eingetragene Marken von Adobe Systems Inc. in den USA und/oder anderen Lndern. ORACLE ist eine eingetragene Marke der ORACLE Corporation. UNIX, X/Open, OSF/1 und Motif sind eingetragene Marken der Open Group. Citrix, das Citrix-Logo, ICA, Program Neighborhood , MetaFrame, WinFrame, VideoFrame, MultiWin und andere hier erwhnte Namen von Citrix-Produkten sind Marken von Citrix Systems, Inc. HTML, DHTML, XML, XHTML sind Marken oder eingetragene Marken des W3C , World Wide Web Consortium, Massachusetts Institute of Technology. JAVA ist eine eingetragene Marke der Sun Microsystems, Inc. JAVASCRIPT ist eine eingetragene Marke der Sun Microsystems, Inc., verwendet unter der Lizenz der von Netscape entwickelten und implementierten Technologie. MaxDB ist eine Marke von MySQL AB, Schweden. SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, und weitere im Text erwhnte SAP-Produkte und -Dienstleistungen sowie die entsprechenden Logos sind Marken oder eingetragene Marken der SAP AG in Deutschland und anderen Lndern weltweit. Alle anderen Namen von Produkten und Dienstleistungen sind Marken der jeweiligen Firmen. Die Angaben im Text sind unverbindlich und dienen lediglich zu Informationszwecken. Produkte knnen lnderspezifische Unterschiede aufweisen.

Die in dieser Publikation enthaltene Information ist Eigentum der SAP. Weitergabe und Vervielfltigung dieser Publikation oder von Teilen daraus sind, zu welchem Zweck und in welcher Form auch immer, nur mit ausdrcklicher schriftlicher Genehmigung durch SAP AG gestattet. Bei dieser Publikation handelt es sich um eine vorlufige Version, die nicht Ihrem gltigen Lizenzvertrag oder anderen Vereinbarungen mit SAP unterliegt. Diese Publikation enthlt nur vorgesehene Strategien, Entwicklungen und Funktionen des SAP-Produkts. SAP entsteht aus dieser Publikation keine Verpflichtung zu einer bestimmten Geschfts- oder Produktstrategie und/oder bestimmten Entwicklungen. Diese Publikation kann von SAP jederzeit ohne vorherige Ankndigung gendert werden. SAP bernimmt keine Haftung fr Fehler oder Auslassungen in dieser Publikation. Des Weiteren bernimmt SAP keine Garantie fr die Exaktheit oder Vollstndigkeit der Informationen, Texte, Grafiken, Links und sonstigen in dieser Publikation enthaltenen Elementen. Diese Publikation wird ohne jegliche Gewhr, weder ausdrcklich noch stillschweigend, bereitgestellt. Dies gilt u. a., aber nicht ausschlielich, hinsichtlich der Gewhrleistung der Marktgngigkeit und der Eignung fr einen bestimmten Zweck sowie fr die Gewhrleistung der Nichtverletzung geltenden Rechts. SAP haftet nicht fr entstandene Schden. Dies gilt u. a. und uneingeschrnkt fr konkrete, besondere und mittelbare Schden oder Folgeschden, die aus der Nutzung dieser Materialien entstehen knnen. Diese Einschrnkung gilt nicht bei Vorsatz oder grober Fahrlssigkeit. Die gesetzliche Haftung bei Personenschden oder Produkthaftung bleibt unberhrt. Die Informationen, auf die Sie mglicherweise ber die in diesem Material enthaltenen Hotlinks zugreifen, unterliegen nicht dem Einfluss von SAP, und SAP untersttzt nicht die Nutzung von Internetseiten Dritter durch Sie und gibt keinerlei Gewhrleistungen oder Zusagen ber Internetseiten Dritter ab.

SAP AG 2007, Automatic Test of Queries / Tobias Kaufmann / 49

B
1. X

1 2 3

Trace CATT Trace Test Packages Test Jobs


SAP AG 2007, Automatic Test of Queries / Tobias Kaufmann / 50

Vous aimerez peut-être aussi