SAP Automation

Approaches  
How we can increase the automation coverage and minimize inconsistencies between automated scripts & manual test process flows. A good way would be to enable business/functional consultants to contribute towards SAP test automation, in terms of creating automated test scripts, maintaining and executing them with minimal learning curve.

T
he automation engineers would develop the automation framework and SAP specific reusable components. The functional consultants would use and organize them to automate test cases and process flows on the fly.

This approach can be implemented by developing a hybrid test automation framework that supports both data and keyword driven automation methodologies. In the data driven approach, the test data is separated from the test scripts and each test script can be executed iteratively for various data value combinations. The keyword driven approach involves coming up with action tables using keywords to interact with the application under test.

Keywords can be implemented in different ways. Usually, keywords are implemented at business function or transaction level. For e.g., “Create Purchase Order” or “ME21N can be a keyword with associated parameters like PO type, Purchasing Org etc. Similarly ReleasePO can be another keyword with its input fields as associated input parameters. Create Purchase order, Release Purchase order and other transactional keywords can be organized in the appropriate flow to automate a business process.

Each keyword has associated script developed in the language of the automation tool used. These scripts are developed by automation engineers. To automate a test case, we would use these keywords in a specific format & order and enter the test & verification data for the transactions via a GUI or spreadsheets, based on the framework implementation. Often spreadsheets are used because of their popularity.

Once the framework has been developed, business consultants can start automating and executing the test cases with minimal knowledge of the tool or framework implementation. The automation engineers can get involved only if additional application specific functions have to be developed. Thus, with the participation of business consultants, automation coverage is increased.

Challenges
Record playback approach towards automation rarely use it considering its limitations in terms of re-usability. Let’s assume that we have scripted and parameterized the test cases and no test data is hard coded. So we can run the same scripts using multiple test data sets without having to spend effort in changing them. But what if additional fields are added and the test case flow changes. It would involve modifying the script code and it would involve engineers who are well versed with the tool’s scripting language.

Test automation is often done by engineers who are well versed with programming concepts and automation techniques, but not with business processes. The ideal situation would be business analysts or functional consultants automating the test process flows, but unfortunately, they do not have automation experience. Also, in SAP testing teams, automation engineers are usually not many in number and they are shared across projects, because of which the rate of automation and coverage is low.

SAP Test Automation with QTP
Client / server side settings.

These are the basic settings you need to enable scripting on your SAP GUI for windows apps.
1) Client side setting.
2) Server side setting.

Client side setting: Upon logging on to the SAP R/3, click on Customizing of Local Layout SAP toolbar button as shown below:

And click on Options. The following (Options) window opens. Navigate to Scripting tab and select "Enable scripting" checkbox and deselect the other two options below the "Enable scripting" checkbox. This completes enabling client side scripting.

Server side Setting: Run the transaction code RZ11, this opens Maintain Profile Parameters page, enter "sapgui/user_scripting" and click on Display button.


this opens "Display Profile Parameter Attributes" Page.


Check if Profileval is set to TRUE else click on change value button and change the value of Profileval to TRUE.

This completes our Enable scripting process.

Following problems get resolved during SAP Automation with QTP 10.0 & QC 10.0.

1) During creation of Handling Unit (HU) in LM00 transactions, SAP takes more than 2 minutes to process the data.  This causes QC to throw a “Catastrophic failure” and stop further execution.  I tried inserting a “Wait” but it still isn’t working, I googled this error and found the following post, but the solution still doesn’t exist. 

Done R&D on following link but due to some reasons could not get success,

Solution:
After installing patch QTP_00684.EXE, Released by HP and making the necessary changes in mic.ini, the problem seems to have been fixed.

2)http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=109447626+1307099472115+28353475&threadId=1446685


-Sandip Gami
+91-97141 77088

10 comments:

  1. sap test
    It is a great article! Thank you for such an easy explanation about SAP Test Automation. I had to read a lot of blogs and to surch lots of hours to find an explanation that I would understand, yours is the best ! Thank you!

    ReplyDelete
  2. i have QTP 11.00 & SAP 720 ...
    When programs are Opened ... SAP closes after 9 - 10 minutes ... actualy it freezes, so i need to kill the process !!!
    Have anyone experienced such Issue or at least heard of it. Please Help

    ReplyDelete
  3. Good Job Sandip!!
    Thanks for this post

    ReplyDelete
  4. Thanks for sharing information about SAP automation process. Your article is very useful for testing professionals and managers involved on SAP automation testing process.

    ReplyDelete
  5. Thanks for the comments, If you have any question feel free to ask.

    ReplyDelete