eCATT

  • View
    190

  • Download
    10

Embed Size (px)

Text of eCATT

eCATT (extended Computer Aided Test Tool)What is eCATT? eCATT is an SAP Testing Tool used to automate & test business scenarios in R/3. Each test generates a detailed log that documents the test process and results. If the testing is smooth without any errors, this means that the business scenarios mapped in R/3 are correct. If the test results in error then the problem can be analyzed using the error log that is generated. eCATT enables automatic testing in SAP GUI for Windows and SAP GUI for Java. Features of eCATT: Following functions can be performed using eCATT:

Test transactions, reports and scenarios. Call BAPIs and function modules. Test remote systems. Check authorizations (user profiles). Test updates (database, applications, GUI). Set up customizing tables. Test the effect of changes to customizing settings. Perform load testing. Check system messages. Integrated with Test Workbench, so allows proper management of scripts using SCAT transaction. Supports CATT migration to eCATT. All eCATT Objects are Repository Objects. Therefore one can take advantage of Standard SAP Transport Tools. eCATT Objects can easily download & upload in XML with XSD format. There can be several versions of Test Scripts, which allows different implementations with different releases. The separation of Test Scripts, Test Data & System Data allows for a considerable degree of reuse.

Why eCATT? CATT is no longer supported by SAP for the creation of new developments. Hence all the test scripts developed in CATT are now need to migrate/Update to eCATT. Comparative to manual testing, the following are advantages of using eCATT:

Due to automation, testing time is reduced to a large extent. Due to automation, less manpower is required for testing. This helps financially. Due to automation, manual errors are reduced to large extent. Hence results in error free testing. This helps, as no further problems will occur while the usage of R/3 system by end users and hence increases the efficiency.

Proved to be extremely useful in implementation projects.

In regression testing, automated test scripts are an ideal method of quickly detecting errors. Automatic test logs make it easy to reproduce test results, enabling fast analysis and planning of further activities, leading to cost savings for the customer.

Differences between CATT and eCATT? Till date, CATT could only be used with the R/3 system. eCATT (which is available with SAP Web Application Server 6.20) covers the automatic testing in SAPGUI for Windows and SAP GUI for Java. For other GUIs and Applications, eCATT provides an interface for external tools. This allows companies to perform automated tests from an SAP system in a complete IT solution landscape across system boundaries. These new options enable complete automation of solution landscapes under standard Windows and Web-based user interfaces- resulting in low-cost operation of an IT Solution. eCATT requisites

Web Application Server (WAS) 6.20 or more. SAPGUI 6.20 or more. R/3 4.6C or more. (Target system must have sufficient support package level (Details available in SAP Note 519858) or SAP R/3 Enterprise Release 4.7).

Before creating Test Scripts using eCATT, some system settings need to be done: Maintain table T000. 1. Go to transaction SM31 2. Enter T000 and chose MAINTAIN.

3.

In the Change View Clients: Overview screen, select the relevant client and choose Details

4.

In the CATT and eCATT Restrictions field, select CATT and eCATT allowed.

5. Click on SAVE. Enabling scripting at the Front-end

1.

On

any

SAP

GUI

screen,

choose

Customizing

of

Local

Layout.

2. Choose Options 3. Choose Scripting Tab

4. Select Enable Scripting

5. Click Apply and then OK. Enabling Scripting on the Application Server

1. Go to transaction RZ11. 2. On the Maintain Profile Parameters screen, enter sapgui/user_scripting.

3.

Choose Display.

4. If the Current Value is not set to TRUE, then click on Change Value:

5. Enter TRUE in the New Value. 6. Click on SAVE. eCATT Vs Mercury QTP

SAP eCATT is a automation tool meant for functional testing in SAP. It comes with WAS. Latest version is WAS 6.40. It is made in ABAP. QTP is Mercury's tool, which is a third party tool for automation testing. The language used here is VB Script. Both the tools are good. But the only drawback with eCATT as of now is that it can execute web based SAP transactions except WebDynpro. So if the testing of SRM, CRM etc is involved, one is forced to use QTP. QTP takes the wrapping of eCATT and executes in SAP.

If only SAPGUI based transactions are involved in testing than eCATT is the best tool to be used. And if web based transactions are also involved, forced to go for QTP.

CreatingasimpleeCATTTestScriptforMM02transaction ASimplescenariooneCATTTestScripttotheStandardTransaction.

Inthisscenario,IwouldliketoexplainaboutcreateTestScriptforMM02. ProcedureStart transaction SECATT. On the eCATT initial screen, select the System Data radio button and enter a name for your new system data container in the field beside it. For this tutorial, we will refer to it as ZTEST_SDC.

OntheAttributestab,enteratitleforthesystemdatacontainerforexample,SystemLandscapefor MM02.

IntheSystemDatatab,youwouldnoticeadefaulttargetsystemcalledNONE. Saveyoursystemdatacontainer.

CreatingYourTestScriptInthissection,youwillcreateanemptytestscriptandassigntoitthesystemdatacontainerthatyou createdearlier.Youwillthenexecutethetestscript.

OntheAttributestab,enterthefollowinginformation:Title : Test Script for MM02

Component

:BCTWBTSTECA

System Data Container : ZTEST_SDC

LeavetheTargetSystemfieldempty.

Saveyourtestscript. ChooseExecuteButtonandExecutetheTestScript.The Start Options are displayed. Accept the defaults but make sure that Log Display has been selected.

Select the checkbox Highlight All Called GUI Elements. This option is cosmetic but will help you see whichelementsarebeingselectedduringreplay.Leavetheotherdefaultoptionsastheyare.

Executethetestscript.Thelogwillthenbedisplayedandshouldlooksomethinglikethefollowing:

GetbacktotheTestScriptEditor. .

RecordingtheTransactionStartingtheRecorder

nthetestscripteditor,choosethePatternfunctiontodisplaytheInsertStatementdialog.

Inthedialog,changethegrouptoUIControl,chooseSAPGUI(Record)forthecommand.

Specify the transaction MM02 that you want to record. Additionally, select the check box that will automatically generate a new SAPGUI command after every screen change ( You must first deselect manualgeneration).

ChooseStartRecordingorEnter

ClickonYes.

Anewsessionisautomaticallycreated.Youcan,andshould,switchbackandforwardbetweenthetwo sessionsusingthetaskbarasshownbelow. EntertheMaterial

SelecttheBasicData1 BasicData1Screenasshown.

ChangetheGrossWeight.

SaveandClosethescreen EndingtheRecording

Select the Close Recorded GUIs check box and thenchooseStopRecording. TherecordedsessionclosesandyounowseetheSAPGUIcommandsinthecommandeditorofthetest scripteditor.

Abovethecommandeditoristheparameterlist.Youcanusethebuttonatthetopleftofthissectionto togglebetweenthedisplayofnormalparametersandthecommandinterfaces.

ChooseSave.

ExecutingYourTestScriptInthetestscripteditor,chooseExecutebutton.

ChooseExecuteButtonintheStartOptionsscreen.Checkthelog.

StartingeCATTwithTCDRecordingMethod

Step1: Use the Transaction code SECATT to test the data using eCATT (Extended Computer Aided Tool). Provide Test Script name in the initial screen of eCATT. Here, in the scenario I have given Test Script as ZDEMOTEST and version as 1.

Click CREATE button. Step2: In the next screen, we have TWO tabs. 1. 2.

Editor Tab where we can write our own ABAP code and use the eCATT special commands. Attribute Tab where we can provide Title, Component to which we are testing data.

Step3: Click the Pattern button on Application tool bar to select recording method. Select TCD (Recording) method. Step4: Select the pattern button. A pop-up box appears where you have to select GROUP as UI Control. And COMMAND as TCD (Recording) as shown. Provide the transaction as MM01 and press enter. Then the system automatically proposes Interface name and dont change this Interface name. In this scenario system proposes MM01_1. Now, click OK button to start recording.

Step5: After the recording is done, you will get message the Recording Ended and press YES.

And the following screen appears.

Save and check syntax check. Step6: First of all execute the script without parameterization to confirm errorless recording. At the run time, a start options window appears. Select the following options as shown.

And in UI Control Tab,

Click on Execute button. Step7: After execution of the transaction, if the recording is free from errors, then the success log would be displayed. Suppose if there are any errors in recording of the transaction then the detailed error log would appear. If the transaction has executed successfully, you would get the following messages.

StartingeCATTwithSAPGUIRecordingMethod

Step1: Use the Transaction code SECATT to test the data using eCATT (Extended Computer Aided Tool). Provide Test Script name in the initial screen of eCATT. Here, in the scenario I have given Test Script as ZDEMO_TEST and version as 1.

Click the Create button. Step2: In the next screen, we have TWO tabs. 1. 2.

Editor Tab where we can write our own ABAP code and use the eCATT sp