Welcome To Automation Testing

Before starting with tips of automation of SAP using QTP Let me give a small introduction of SAP and QTP.

SAP stands for System Applications and Products. It is the name of both the online financial and

Administrative software and the company that developed it. SAP is made up of individual modules that perform various organizational system tasks.



Quick Test Professional (QTP) is an automated functional Graphical User Interface (GUI) testing tool that allows the automation of user actions on a web or client based computer application.

It is primarily used for functional regression test automation. QTP uses a scripting language built on top of VBScript to specify the test procedure, and to manipulate the objects and controls of the application under test. It supports many applications through the support of add-ins.



We will be using SAP add-in with QTP to work on the SAP automation.

Wednesday, 4 July 2012

General Error when export/Import Datatable in QTP

QTP's famed datatable is third party control similar to excel, many confuse its extension when compared to MS-Excel and implement various formatting features into the excel file, which would be imported during script run.

Since the datatable is not a excel control, there is a high percent chance of corruption, when that happens, the dreaded "General Run Error" is thrown"

Easiest way to workaround is to clear the data in the parent file, and create new one.

Noted below is the HP-Mercury KB article and detailed steps for the same

*************************************************************************
Issue 1: Exporting runtime datasheet to localpath.(Export error no:"-214746725 9")

During runtime, when we try to export the datasheet to local folder we get a general runtime error. So every time we have to kill the QTP and its process tree to proceed.
Solution: Whenever we get ‘General Run Error’ while exporting, clean up the excel sheets as mentioned below and proceed with execution:
How to clean up all Excel formatting from XLS file using QuickTest Professional (QTP)
Making use of the internal logic/functionality offered within QTP, it is possible to clean up Excel format from a XLS file by using either of following methods. By using any of the following methods a new XLS file will result with lower file size once Excel formatting gets removed:
• Using QTP's user interface
1. Open QuickTest Professional and a new blank test script
2. Access the File menu, then select "Settings"
3. Go to the "Resources" tab
4. Under the "Data Table" field, select "Other location" option and click on the browse button ("...")
5. Once the "Open Data Table" dialog appears, find and select the XLS file desired to clean format and click "Open"
6. Click on "Apply" then "Ok" to close dialogs accepting changes Note: depending on the clean up done by QTP, processing time to later show data on the Data Table pane may vary depending on XLS file size and content
7. On the Data Table pane, right click and under "File" option, select "Export..."
8. Select a location/path and name to save this new version of XLS file

No comments:

Post a Comment