Thursday, April 29, 2010

Enabling SAP application (SAP GUI) for testing with IBM Rational Functional Tester (RFT)

Rational Functional Tester (RFT) is an automated regression and functional testing tool that lets users to test Java, .NET, Windows, terminal-based, SAP, Siebel, Flex/Flash and web application running on windows and Linux platforms. RFT generates the scripts that are resilient to application changes and provides rich set of configuration and wizards to speed up test automation. RFT is available in two flavors, Elcipse/Java scripting and VisualStudio/vb.net scripting. Simplified Scripting feature makes the novice and non-technical users to create and modify the script without having to know Java/Vb language.

This session talks about enabling SAP application for testing with Rational Functional Tester

RFT support testing of SAP R/3 version 4.6c, 4.7 and greater version and the following SAP GUI verions as of RFT 8.1.1 release.

SAP GUI Client Versions (Windows)
SAP GUI 6.2 patch >= 52
SAP GUI 6.4
SAP GUI 7.1

SAP GUI and SAP Server needs to be enabled for testing by RFT. The following section talks about how to perform client side and server side scripting enablement before starting to automate SAP application with RFT

Server side scripting enablement

First thing to check before recording SAP application is to check whether the SAP server is enabled for scripting. This can be done using transaction code RZ11. This transaction will bring up the Maintain Profile Parameters page.
















Enter the value sapgui/user_scripting in the Param. Name text filed and click on the button Display. This will bring being up Display Profile Parameter Attribute page.
















Check the value of the Current Value, If the value is TRUE, then it means the SAP server is enabled for scripting. If the value is FALSE this mean that the SAP Server is not enabled for scripting. To make the value TRUE, click on the button Change Value in the page's toolbar. This will bring up Change Parameter Value window.













Change the value of the New value text filed to TRUE and then save and restart SAP GUI. This will temporarily enable the SAP server for scripting. What i mean by temporarily means is that if the SAP system (server) is restarted the value will be reset to FALSE. So it is always recommended to ask the system administrator to permanently change the value to TRUE, so that the value is get persisted for all session.

Client Side (SAP GUI) scripting enablement

Client side can be enabled using Configure->Enable Enviornments for Testing menu item of RFT. This will bring up the Enable Environments wizard. Select the tab SAP and click on the Enable button.













Alternatively, the client side scripting can be also enabled from SAP GUI. To do this, on the SAP GUI MainWndow select "customizing of Local Layout (Alt+F12)" toolbar button from the toolbar (This is the last toolbar button in the toolbar,)












From the Popup select "Options...". This will bring up the Options window




















Select the tab Scripting from the above window and check the check box Enable Scripting if it is unchecked and uncheck the remaining two Notify when ...." check boxes. Save the setting. This will enable the scripting at the client (SAP GUI) side.

The Client side enablement only needs to be done once for the SAP GUI installation on your system and it remains enabled untill it is uninstalled or you manually go to the scripting and uncheck the check box

Once the server and the client is enabled for testing, the SAP GUI is ready for automation with IBM Rational Functional Tester.