49
eCATT - extended Computer Aided Test Tool

eCATT

Embed Size (px)

DESCRIPTION

eCatt

Citation preview

Page 1: eCATT

eCATT - extended Computer Aided Test Tool

Page 2: eCATT

ECATT | 04/08/23 Slide 2

Index

IntroductionPros & ConsTransactions & MenuTest StrategiesSystem PreparationCreation of test script - TCD Mode Chaining of the test scripts Data for execution of the test scriptsExecution of the test scripts

Page 3: eCATT

ECATT | 04/08/23 Slide 3

Introduction:

eCATT stands for extended computer aided test tool. It is the extended version of CATT.

It is used to create and execute the functional tests. Main objective is to test the business process automatically. Test execution will generate the log which will document the process and test

results.

Page 4: eCATT

ECATT | 04/08/23 Slide 4

Pros and Cons:

Pros: Manual intervention is reduced drastically. Useful for automatic regression testing. Useful for rollout and upgrade projects. Test results are logged without missing. Both unit testing and end to end testing is possible.

Cons: Negative testing is not possible. Less flexibility in the testing. Steps involved with jobs are not possible to include in end to end testing.

Page 5: eCATT

ECATT | 04/08/23 Slide 5

Transaction and Menu:

Transactions: SECATT is the transaction for eCATT

Menu: Following is the SAP menu in easy access:

Page 6: eCATT

ECATT | 04/08/23 Slide 6

Test Strategies:

Basically 2 test strategies are available

1) TCD Mode

> Suitable for testing the transactions which require manual input of values.

> Testing time is comparatively less

> To go to next step, manual intervention is required.

2) SAP GUI Mode

> Once executed, till the last step, it runs automatically.

> Suitable for the low volume testing.

In both these modes, TCD mode is efficient.

Page 7: eCATT

ECATT | 04/08/23 Slide 7

System Preparation:

Maintain table T000

> Execute Transaction SM31

> Enter T000 and click Maintain

> Select client Ex: 810 and select display

> Select “eCATT & CATT allowed” in eCATT & CATT restriction

Page 8: eCATT

ECATT | 04/08/23 Slide 8

System Preparation:

Enable scripting

> Select the button Customize local layout

> Select Option

> Select Scripting tab

> Select Enable scripting and click apply

Page 9: eCATT

ECATT | 04/08/23 Slide 9

System Preparation:

Scripting at application server:

> Execute Transaction RZ11

> Enter ‘sapgui/user_scripting’ on maintain profile parameter

> Display and then click the change value.

> Enter ‘TRUE’ in new value.

Page 10: eCATT

ECATT | 04/08/23 Slide 10

Creation of Test Script (TCD Mode):

Creation of test script involves the following steps:

1) Creation of System Data Container

2) Creation of Test Script

3) Creation of Test Data Container

4) Creation of Test Configuration

Page 11: eCATT

ECATT | 04/08/23 Slide 11

1) Creation of System Data Container:

If test scripts are to be created or executed in the remote server, system datacontainer should be created. Target systems with the RFC destination arementioned here.> Following are the steps: Execute transaction SECATT Give the name ‘Z_TESTING’ in system data container and click create Give the title ‘Z_TESTING’ In System data tab, add target system ‘CS5RFC800’ give ‘target system’ and

description 800 client and save. Save in transport request. Message ‘System Data Container: Z_TESTING saved successfully’ is

displayed.

Page 12: eCATT

ECATT | 04/08/23 Slide 12

1) Creation of System Data Container:

Page 13: eCATT

ECATT | 04/08/23 Slide 13

2) Creation of Test Script:

Here, transaction is recorded and parameterized.

> Following are the steps: Execute transaction SECATT Give the name ‘Z_F_43’ in test script and click create Give the title ‘Vendor Invoice’ and Component ‘FI-AP-AP-IC’. Go to tab ‘Editor’ and click ‘pattern’

Page 14: eCATT

ECATT | 04/08/23 Slide 14

2) Creation of Test Script:

Give the following data in the popup window and click enter

Group: UI Control

Command: TCD (Record)

Transaction: F-43

Document entry screen is opened to post the document.

Page 15: eCATT

ECATT | 04/08/23 Slide 15

2) Creation of Test Script: Enter Doc. Date 29.05.2009, doc type KR, Co Code 1000, posting key 31 and vendor 6000 and click enter.

Page 16: eCATT

ECATT | 04/08/23 Slide 16

2) Creation of Test Script: Enter Cr Amount 10000, Dr Posting key 40, Dr account 473110 and click enter.

Page 17: eCATT

ECATT | 04/08/23 Slide 17

2) Creation of Test Script: Enter DR Amount 10000 and click enter.

Page 18: eCATT

ECATT | 04/08/23 Slide 18

2) Creation of Test Script: Simulate the document.

Page 19: eCATT

ECATT | 04/08/23 Slide 19

2) Creation of Test Script: Post the document.

Page 20: eCATT

ECATT | 04/08/23 Slide 20

2) Creation of Test Script:

After completion of the posting, a pop window for transferring of the data to the test script is appeared. Click on the popup window ‘yes’.

Page 21: eCATT

ECATT | 04/08/23 Slide 21

2) Creation of Test Script: In Command editor, Transaction recorded is appeared. Double click on the F_1. Structure editor is opened.

Page 22: eCATT

ECATT | 04/08/23 Slide 22

2) Creation of Test Script:

In Structure editor, carry out following activities: Expand ‘DYNPRO MODE PROG’ Expand “[1] 'X' 'SAPMF05A' 0100’’ Double click ‘FIELD MODE NAME VALIN VALOUT’ In the right hand corner, grid is opened. It will have all the values entered

during the transaction recording.

Page 23: eCATT

ECATT | 04/08/23 Slide 23

2) Creation of Test Script:

Page 24: eCATT

ECATT | 04/08/23 Slide 24

2) Creation of Test Script:

In the grid, following values are appearing:

'BKPF-BLDAT‘: 29.05.2009

'BKPF-BLART‘: KR

'BKPF-BUKRS‘: 1000

'RF05A-NEWBS‘: 31

'RF05A-NEWKO‘:60000 Parameterize the values entered as above

> DOC_DATE

> DOC_TYPE

> CO_CODE

> CR_PK

> CR_VENDOR

Page 25: eCATT

ECATT | 04/08/23 Slide 25

2) Creation of Test Script:

Go to second screen “[2] 'X' 'SAPMF05A' 0302 “ Double click ‘FIELD MODE NAME VALIN VALOUT’ in that screen Pop window will be appeared for the parameter maintenance

Select import radio button and click yes Parameters are stored in the parameter command interface. Symbol appears in the structure editor area.

Page 26: eCATT

ECATT | 04/08/23 Slide 26

2) Creation of Test Script:

Page 27: eCATT

ECATT | 04/08/23 Slide 27

2) Creation of Test Script:

Parameterize the rest of the values in other screens

> 'BSEG-WRBTR‘: 10000 CR_AMT

> 'RF05A-NEWBS’: 40 DR_PK

> 'RF05A-NEWKO‘: 473110 DR_ACCT

> 'BSEG-WRBTR‘: 10000 DR_AMT Document number generated in the document posting should be taken as

export value. Select the last screen “[6] 'X' 'SAPMSCEM' 0001” and click simulator

Page 28: eCATT

ECATT | 04/08/23 Slide 28

2) Creation of Test Script:

Simulation screen appeared as follows:

Double click on the document number appeared on the variable part 1 and give ‘DOC_NO’ in the parameter name field in the popup window and click enter. Then go back. DOC_NO is stored as export value.

Page 29: eCATT

ECATT | 04/08/23 Slide 29

2) Creation of Test Script:

Parameters are appeared as follows:

Page 30: eCATT

ECATT | 04/08/23 Slide 30

2) Creation of Test Script:

Click save button. On the popup window, Give package name ‘ZTTEST’ and click on save button. Transport request is created. With this, creation of test script is completed.

Page 31: eCATT

ECATT | 04/08/23 Slide 31

3) Creation of Test Data Container:

This contain parameters and variants. Parameters describes the interface of the

container. Variants store the data.

> Following are the steps: Execute transaction SECATT Give the name ‘Z_F_43’ in test data container and click create Give the title ‘Vendor Invoice’ Give the Component ‘FI-AP-AP-IC’ Then click on the parameters tab. Go to Main menu Edit > Import parameters Give test script name Z_F_43. Then click Get parameter. Then select the

required fields and then click attach. Then click on copy

Page 32: eCATT

ECATT | 04/08/23 Slide 32

3) Creation of Test Data Container:

Page 33: eCATT

ECATT | 04/08/23 Slide 33

3) Creation of Test Data Container: Parameters are copied into parameters tab.

Page 34: eCATT

ECATT | 04/08/23 Slide 34

3) Creation of Test Data Container: Default variant is created with the values copied from test script.

Page 35: eCATT

ECATT | 04/08/23 Slide 35

3) Creation of Test Data Container:

Click save button. On the popup window, give package name ‘ZTTEST’ and click on save button. Transport request is created. With this, creation of test data container is completed.

Page 36: eCATT

ECATT | 04/08/23 Slide 36

4) Creation of Test Configuration:

In test configuration, test script, test data container and system data container are

assigned.

> Following are the steps: Execute transaction SECATT Give the name ‘Z_F_43’ in test configuration and click create Give the title ‘Vendor Invoice’ Give the Component ‘FI-AP-AP-IC’ Then click on the configuration tab. Assign test script ‘Z_F_43’ and test data container ‘Z_F_43’.

Page 37: eCATT

ECATT | 04/08/23 Slide 37

4) Creation of Test Configuration:

Page 38: eCATT

ECATT | 04/08/23 Slide 38

4) Creation of Test Configuration:

Click save button. On the popup window, give package name ‘ZTTEST’ and click on save button. Transport request is created. With this, creation of test configuration is completed.

Page 39: eCATT

ECATT | 04/08/23 Slide 39

Chaining of the test scripts:

Chaining of the test script is done in the creation of test script. In our example, chaining is done for posting of vendor invoice (test script:

Z_F_43) and display of the accounting document (Test script: Z_FB03). Following are the steps:

> Execute transaction SECATT

> Give the name ‘Z_F_43_FB03’ in test script and click create

> Give the title ‘Vendor Invoice’

> Give the Component ‘FI-AP-AP-IC’

> Go to tab ‘Editor’ and click pattern

> In the popup window select Group ‘Test script reference’, command ‘REF’, Test script ‘Z_FB03’ and enter.

> Repeat the above 2 steps for the script Z_F_43 Parameterize the values of the scripts attached.

Page 40: eCATT

ECATT | 04/08/23 Slide 40

Chaining of the test scripts:

Double click on Z_F_1. Parameterized values of the script Z_F_43 are appeared in structured editor as follows:

Page 41: eCATT

ECATT | 04/08/23 Slide 41

Chaining of the test scripts: Parameterize the import and export values related to Z_F_43.

Import values:

DR_AMT,CR_AMT,DR_PK,DR_ACCT,DOC_DATE,DOC_TYPE,CO_CODE,CR_PK CR_VENDOR.

Export Values:

DOC_NO Parameterize the values of the script Z_FB03.

Import values:

DOC_NO,CO_CODE,YEAR

Page 42: eCATT

ECATT | 04/08/23 Slide 42

Chaining of the test scripts:Document no created in F.43 is displayed in FB03. Hence, it is taken as export value in F.43 and import value in FB03.

Click save button. On the popup window, give package name ‘ZTTEST’ and click on save button. Transport request is created. With this, creation of test script for chaining is completed. All the rest of the

steps (i.e. test data container, test configuration) are same for this chained script also.

Page 43: eCATT

ECATT | 04/08/23 Slide 43

Data for execution of the test scripts:

Data should be maintained in test data container. It can be maintained in the following manner:

1) Internal variant: For small volume of the data, internal variant can be used. While creation of the test script, a default variant ‘ECATTDEFAULT’ is saved. For additional variants, use append variant function and add the variant.

Page 44: eCATT

ECATT | 04/08/23 Slide 44

Data for execution of the test scripts:

2) External variant: For huge volume of the data, external variant can be used. In the variants tab, mode should be selected as External variants/path.

> Go to menu Edit > Variants > Download copy file as .txt file.

Page 45: eCATT

ECATT | 04/08/23 Slide 45

Data for execution of the test scripts:

> Open the text file as excel file and add new data by giving variants for each row of the data

> Save the file as .txt file.

> Maintain the file name in file name field.

Page 46: eCATT

ECATT | 04/08/23 Slide 46

Execution of the test scripts:

Execute transaction SECATT Give Z_F_43 in Test configuration Go to Shared tab and select ‘S No termination, continue with next script

Command’ in error behavior. Go to UI Control tab and select ‘A Process in foreground, synchronous level’ in

start mode for command TCD. Then Execute Transaction is executed in foreground. Click enter button to go to next screen At the end of the testing, log is displayed. If start mode for command TCD is selected as back ground, directly log will be

displayed.

Page 47: eCATT

ECATT | 04/08/23 Slide 47

Execution of the test scripts: Log for the test results

Page 48: eCATT

ECATT | 04/08/23 Slide 48

Questions

?

Page 49: eCATT

ECATT | 04/08/23 Slide 49

Thank You