Escolar Documentos
Profissional Documentos
Cultura Documentos
Presented by Dawn Burns Last Modified 5/8/2012 for Microsofts ERP Systems
Original Presentation was found on SAP Marketplace. This has been modified for MS internal documentation and includes MS standards/guidelines
Prerequisites
Experience of software testing An understanding of the architecture of the SAP
Contents
Unit 8 SOLMAN
Build in MS1
NOTE: After MSS refresh of the MSU/MST environments, the eCATTs will need to be reapplied to these test environments. To transport the items to the MSU environment, a PM can simply reapply them. To have them reapplied to the MST environment, a member of the ASM team can reapply them. All items that should be transported must be in a Package. The package we will use for eCATTs will be Z_QA_TESTING.
lab space to work in Be trained Be released from their other duties (internal) or bought-in (external)
Is time-consuming Offers little potential for reuse of test resources But does have the advantage that manual testers spot errors and issues that are beyond the scope of the test plan
Automated Testing
Requires fewer people and resources Execution takes less time Parameterization of fields allows replay with any number of different sets of values Offers considerable possibilities for reusing test scripts Makes it easier to reproduce errors that occur during testing
SAP AG 2005, Title of Presentation / Speaker Name / #
The Economics of Testing Automated testing requires good planning and modeling Learning to use a new test tool takes time An automated test script will only give you maximum ROI if it is reusable A switch to automated testing requires investment and commitment Not every test scenario has to be automated
If it doesn't have to be repeatable, it doesn't necessarily have to be automated Automation is a means to an end, not an end in itself. If it is taking too long to automate the last 5% of your test scenario, consider running that part manually!
Choosing an Automated Test Tool External Tools Load Runner Use load runner for Stress test scripts QTP scripts Ideal for creating scenarios that extend beyond the SAP testing limits. For example, a non SAP R/3 system. Visual Studio scripts Used for testing web service transactions. eCATTs Extended Computer Aided Testing Tool Ideal for internal SAP test scenarios unit test, intra SAP end-to-end scenarios, SAP security, etc.
eCATT is available with Release 6.20 of the SAP Web Application Server With it, you can remotely test any mySAP.com solution that is running R/3 Basis
Setting checks on the application to make the test react to different circumstances
Parameterizing the application to allow it to be replayed with varying values
applications that you can test with it system landscape in which you can test
A Finished Example
Test Configuration
Test Instructions
Note: eCATT logs that are created in the MSU/MST system will be stored on the transparent tables ECLOG*. These tables will remain untouched by the MSS system refresh.
Archive
Results
Test Script
The set of commands that forms the test
Test Configuration
A test script, combined with data from one or more test data containers, plus a system data container that describes the correct system landscape
SAP AG 2005, Title of Presentation / Speaker Name / #
Test configuration is also a persistent data object. It references the test script. It can point to several test data containers (meta sample data) and a system data container (system where the script will be executed). The test data import parameters for the test script interface are stored in this object.
Logs The execution of a test configuration or the test script is recorded in a start activity log. System data container A system data container is also a persistent data object. It has a set of parameters that will identify SAP system instances. These can be maintained independently from the test script. The system data container contains the physical connection to one or more SAP instances. These connections are identified by logical indicators, called the target systems.
Constructing an Automated Test Series What applications am I going to test? Map out the transaction/screens/fields you plan on using Identify field values that you want Are these a constant Are these variables
Will you import ,export or have a local variable?
How can I best create an automated test for my applications? Branch from one script together or a self contained script
Things to remember as you create your automated scripts As you record your automated scripts keep the following in mind
Dont use tab on your keyboard, click on the field you wish to enter data into. Only select the screens/fields you wish to pick up in your recording. Enter in the field values, dont select F4 to pick the value off the list as this is just additional overhead. Try to enter in values into a field and not wait for popup screens to appear. Example, if you are creating a customer master record using transaction XD01, enter in the tax jurisdiction value for US customers and not wait for Vertex to display the popup. This can cause issues if you are wanting to run the test script in background mode later. If there is a field that will automatically generate a number value for you, like customer master number or personnel number, set the field value to in the parameter field value. If you dont do this the system will not generate a new number.
Definite Goal
Before you write your script, work out exactly what you want it to do
Reusability
Try to create small self-contained script modules. This will make them more easily reusable.
Structure of a Script
Test Script
Attributes
Parameters Importing
Exporting
Local variables
Commands
Script Attributes
Search terms: VSTF reference Number Attaches system data and target System not Used outside of SOLMAN
SAP AG 2005, Title of Presentation / Speaker Name / #
Parameter List
Command Editor
Structure Editor
Structured Parameters
I_ITAB[2]-CONNID = '0400'.
GETLEN ( I_ITAB, VAR ).
Script Language
Conditions
Checks
Loops
Calculations
FUN calls a function module TCD allows you to record and replay SAP transactions SAPGUI allows you to record sequences of screens containing controls
An interface allows you to integrate test tools from third-party vendors with SAP eCATT
No
Does the application run under SAP GUI for Windows or Java?
No
Yes
Use FUN
No
Use TCD
No
Yes
No single driver provides the best solution for every application. NOTE: SAPGUI only runs In foreground mode.
SAP AG 2005, Title of Presentation / Speaker Name / #
Use SAPGUI
Special Variables
&SZBRC - Return code &TIME - Current time &DATE Current date &YEAR Current year &YEARA Next year &YEARB Last year &LPC Loop counter &MSX Number of messages returned by a transaction &USER User name
Pattern Function The Pattern function is similar to the statement pattern in the ABAP Editor. It allows you to build individual eCATT commands. A command consists of:
The command keyword
Interface (parameters that need to be passed) NOTE: Once the Command line value changes, the additional fields in The popup box may change as the boxes are dependent on the command.
Command Interface Most eCATT commands have a command interface, which corresponds to:
The interface of a function module (for FUN) The screen and field structure of a transaction (for TCD) A list of user interactions (for SAPGUI) The importing and exporting parameters of a referenced script
Command interfaces are stored in XML format in the local system, even if the object that they describe only exists in a remote system. This means that the script lives in the system in which you exit the script from. Currently that would be in the MS1, MSU or MST environment. Later this would be in the SOLMAN system once the test team is using SOLMAN.
Yes
Use FUN
Transaction
Function Module
Function Module
Function Module
Transaction
Command Interface
Importing
Exporting Changing
Tables
Function Module
Exceptions
or
INTERFACE-IMPORTING-PARAMETERNAME = value. INTERFACE-IMPORTING-STRUCTURE-FIELDNAME = value. INTERFACE-TABLES-TABLE[idx]-FIELDNAME = value.
Trapping Exceptions
Exceptions can be checked and you can highlight them for the eCATT logs. This is helpful for trouble shooting issues
Interface
Exceptions DATA_INCOMPLETE CREATE_FAILED
Interface
Exceptions
DATA_INCOMPLETE CREATE_FAILED
Table Operations
Samples of some other commands that are available in the Pattern button in the eCATT test script. These all relate to databases.
Test Script
GETTAB ( TAB, INTF, [DEST] ). CHETAB ( TAB, INTF, [DEST] ). SETTAB ( TAB, INTF, [DEST] ). RESTAB ( TAB, [DEST] ).
Database
Application Table
Customizing Table
Value <INITIAL>
I/E/V V
ABAP. SELECT * FROM sflight INTO TABLE v_tab WHERE carrid = LH AND connid = 0400. ENDABAP.
Expecting a result set of more than one line. No corresponding function module available. Once-off query
SAP AG 2005, Title of Presentation / Speaker Name / #
How to set input fields, read output fields, and perform fields checks with the TCD command
No
Does the application run under SAP GUI for Windows or Java?
If you wish to run the eCATT in background mode, use TCD record option. This is especially helpful if you are calling the eCATT through a web service or if the eCATT is running as part of a batch job.
TCD record is the option most like the LSMW recording tool.
No
Use TCD
No
Characteristics of the TCD Command The TCD command is the recording technique that was used to test transactions in eCATT It is based on the Batch Input Interface
It allows you to record a transaction, parameterize its input fields, and read or set checks against its output fields
Background: Data-consistency checks in SAP transactions are often implemented within the coding of the screen flow logic (Process After Input)
Batch Input is a technique originally developed for data transfer from legacy systems into an R/3 System that processes transactions in the background
TCD recordings use a technique for unattended transaction testing. It is a very efficient testing method
Same system
ENTER
Transaction
Field
Field
Parameterizing Input Fields You can replace the recorded values with either literals or variables
Field name Double-click Value
S means we have set the value, I means the value is inferred, O means the values is an output.
Read a value
'G' 'C'
Check a value
Message Handling
Location of message
(program and screen)
Message attributes
MSG
Internal Table
Message variables
(up to four)
Testing Messages
Require that a particular message is sent ON_LAST_MESSAGE_CHECK ( 031 ). TCD ( EC_TUTORIAL_TCD, EC_TUTORIAL_TCD_1 ).
How to set input fields, read output fields, and perform fields checks with the TCD command
No
Does the application run under SAP GUI for Windows or Java?
Use SAPGUI
SAP AG 2005, Title of Presentation / Speaker Name / #
Frontend
Backend
TCD Recorder
eCATT Application Logic
1. Select SAPGUI(Record)
Scripting Granularity
Action
Action
S
Action Action Action S Action Action Transaction T: New Transaction
SAP AG 2005, Title of Presentation / Speaker Name / #
Action
Action
Session
Field name
Double-click
Inactive Checks
Record the initial states of the selected screen element types so that they can be placed into script parameters and used in the rest of the script
Field name
Double-click
Stipulate that certain messages must/must not occur in order for the script to be a success
Find out what messages occurred during a particular block of SAPGUI commands
MIDX <n> 2 3
MODE F A A
MSGTYP E E S
MSGV1 LH
MSGV2 0400
MSGV3
MSGV4
E_MSG_1
Message qualification
Message Type Message Class
Mode
Exit
Message Number
Mode 'A'
Exit
MSGTYP 'E'
ID
Number
Mode 'F'
Exit 'X'
MSGTYP 'E'
User-defined Rules
Allow
Message Processing
Discard
eCATT Roles
Old role was called YSCATTSTST and this is being replaced by the new roles as of May 2012: There will be two roles one for the administrator and one for the user. The Administrator role should only be given to Test FTEs who will write/create/modify eCATT scripts/test configuration and this replaced the YSCATTSTST role. The user/tester role will be given to anyone who requests it. This role will only allow people to maintain test configuration (start with a Y*) and display the test scripts. The new role names:
ZMS:IT_TEST Composite
ZMS:IT_TESTLEAD
Add-On
ZZZ_ECATT_ADMIN ZZZ_ECATT_USER
Single Single
Naming convention Reusable Scripts Preamble for Reusable Scripts: ZR_ (This would mean that the test script and the test configuration would start with a ZR_*.
Individuals with just the test role, would be able to create a YR_* test configuration option. Best Practice: Test Configuration should match the name of the test script)
For T-Codes ZR_TCODE_Functionality For Ex. T-Code = VA01, VA02, VA03 and so on. Names: ZR_VA01_CR
Functionality Description Create Change Display Delete Execute Trigger Search
SAP AG 2005, Title of Presentation / Speaker Name / #
Naming convention ABAP Query for Tables Preamble for Reusable Scripts: ZR_TableName_Read_data
(This would mean that the test script and the test configuration would start with a ZR_*. Individuals with just the test role, would be able to create a YR_* test configuration option. Best Practice: Test Configuration should match the name of the test script)
ZR_TableName_Read_data
Ex. ZR_VBAK_READ_DATA
Naming convention Scripts with Edit Views Preamble for Reusable Scripts: ZR_TableName_Read_data
(This would mean that the test script and the test configuration would start with a ZR_*. Individuals with just the test role, would be able to create a YR_* test configuration option. Best Practice: Test Configuration should match the name of the test script)
Naming convention Scripts to read tables using SE16 Preamble for Reusable Scripts: ZR_TableName_Read_data
(This would mean that the test script and the test configuration would start with a ZR_*. Individuals with just the test role, would be able to create a YR_* test configuration option. Best Practice: Test Configuration should match the name of the test script)
Naming convention Scripts to call Function Modules ZR_FUN_Functionanl_Module_name ( Truncated , in Description Complete Function Module Name can come in Description of eCATT)
(This would mean that the test script and the test configuration would start with a ZR_*. Individuals with just the test role, would be able to create a YR_* test configuration option. Best Practice: Test Configuration should match the name of the test script)
Naming convention Scripts to call a report ZR_SE38_Reportname_Functionality (Truncated Report Name Complete Report Name Can Come in Description)
(This would mean that the test script and the test configuration would start with a ZR_*. Individuals with just the test role, would be able to create a YR_* test configuration option. Best Practice: Test Configuration should match the name of the test script)
Naming convention Scenario Scripts Preamble for Scenario Scripts: ZS_ ZS_ PROJECTNAME_FUNCTIONALITY Then in the eCATT script, you will list the VSTF requirement numbers into the search term fields.
(This would mean that the test script and the test configuration would start with a ZR_*. Individuals with just the test role, would be able to create a YR_* test configuration option. Best Practice: Test Configuration should match the name of the test script)
Naming convention Scenario Scripts for Unit Testing Preamble for Scenario Scripts: ZU_ Naming Convention for function Module Unit Testing ZU_VSTF_FUN_FUNCTIONMODULENAME_Functionality (Truncated Name of Function Module) Naming Convention function Class Unit Testing ZU_VSTF_CLASSNAME _Functionality (Truncated Name of Class Complete Name will come in Description)
(This would mean that the test script and the test configuration would start with a ZR_*. Individuals with just the test role, would be able to create a YR_* test configuration option.)
Note: These unit testing scripts will be focused around function module/RFC or ABAP Classes which are under development using these scripts they can do ongoing regression activity for their own use, further these script can be used to do performance testing if required.
REF Scripts can call other scripts: REF ( SCRIPT, INTERFACE, [TARGET]).
Create Order
Billing
Test Configuration
Data - Variants
Importing Parameters
System mapping
Script
SAP AG 2005, Title of Presentation / Speaker Name / #
Manual Variants
Quick entry for a few variants Cut and paste possible from delimited text file (Excel) Gotcha make sure if you do this, that you get all records, sometimes I lose my second record, so I have to do this two times to get everything
Variants
Importing Parameters
System mapping
Script
SAP AG 2005, Title of Presentation / Speaker Name / #
Parameters
Name Value Airline LH Date Ref System S_CARR_ID ABAP Type Length D 8
Variants
Variant Var1 Var2 Description Data Data Airline AA LH Date 01.04.2002 01.04.2002
Variant Wizard
Configuration Variants
Variants
How to create test cases to test various different kinds of SAP applications
Microsoft Naming conventions for eCATT Test Scripts and Test Configuration What roles you will need in the Microsoft System for eCATTs
Unit 8: SOLMAN
Future State
MSU
MPT
Helpful Sites:
http://help.sap.com/saphelp_nw70/helpdata/en/20/e81c3b84e65e7be10000000a11402 f/frameset.htm http://www.scribd.com/doc/58850884/52994887-What-Is-eCATT
For SOLMAN
https://websmp105.sapag.de/~form/sapnet?_SHORTKEY=01100035870000744547&_SCENARIO=011000358 70000000202& - NOTE: You will need an OSS id for this site.
Thank you
Thank you all for your time and attendance. A sincere thank you to the V-team members who have been involved in helping me trouble shoot MTM/VSTF/SOLMAN integration touch points: Ankur Srivastava, Bhavesh Jain, Radhika Daram, Mark Fitzloff, Hari Babu Sridharala, Andy Van Inwegen, and Jeff Steinhaus Special thanks to Bhavesh Jain for his assistance in the eCATT naming standards, Aron Stern (basis) and Casey OMara (VSTF) for working with us on trying to integrate MTM and SAP.