Tuesday, December 18, 2012

QTP Important Study Links

 Best Online QTP Resources To Start With

  1. http://motevich.blogspot.com/
  2. http://relevantcodes.com/
  3. http://www.learnqtp.com
  4. http://www.quicklearnqtp.com/
  5. http://www.advancedqtp.com/category/knowledge-base/authors/dvainstein-posts/
  6. http://qtpbook.com
  7. http://qtpcodes.blogspot.com/2010/01/balloon-tool-tip-trick-instead-of.html
  8. http://www.youtube.com/watch?v=bP8rj23Gwqk
  9. http://geekswithblogs.net/tmoore/archive/2006/11/03/96018.aspx
  10. http://qtpadvanced.blogspot.com/2010/11/installing-flex-4-plug-in-for-qtp.html
  11. http://knowledgeinbox.com/articles/qtp/general/qtp-faq-tips-tricks/
  12. http://swautomation.wordpress.com/
  13. http://executeautomation.com/
  14. http://www.joecolantonio.com/
  15. http://www.asi-test.com/ASI/qtp-addwastedtime-function/
  16. http://h18004.www1.hp.com/products/quickspecs/14128_div/14128_div.html
  17. http://www.yassa.co.il/
  18. http://www.linkedin.com/news?viewArticle=&articleID=925302578&gid=3996535&type=member&item=81312453&articleURL=http%3A%2F%2Fwww.articlesontesting.com%2F&urlhash=nSmh&goback=.gde_3996535_member_81312453
  19. http://www.learnqtp.info/2010/07/xml-parsing-in-qtp-using-xmlutil-simple.html
  20. http://qualitybird.blogspot.com/
  21. http://blog.dezfowler.com/2006/10/simple-event-driven-programming-using.html
  22. http://www.joecolantonio.com/2010/12/18/video-how-to-test-a-web-service-using-qtp-with-the-web-service-add-in/
  23. http://paulhammant.com/blog/die-qtp-die.html
  24. http://qtpbook.com
  25. http://automation-beyond.com/2009/08/18/anti-sleep-function/
  26. http://www.joinwithjack.com/testautomation/passing-parameters-between-qtp-tests-stored-in-quality-center
  27. http://deepintoqtp.blogspot.com/
  28. http://expertinqtp.blogspot.com/2011/02/keyword-driven-testing.html
  29. http://automation-beyond.com/2009/08/18/anti-sleep-function/
  30. http://www.joinwithjack.com/testautomation/passing-parameters-between-qtp-tests-stored-in-quality-center
  31. http://deepintoqtp.blogspot.com/
  32. http://expertinqtp.blogspot.com/2011/02/keyword-driven-testing.html
  33. https://sites.google.com/site/qtpsitematerial/home
  34. https://sites.google.com/site/isudhindra/websties
  35. http://www.learnqtp.info/2010/07/xml-parsing-in-qtp-using-xmlutil-simple.html
  36. http://venkyqtp.blogspot.com/
  37. http://qtptestinginterviewquestions.blogspot.com
  38. http://www.articlesontesting.com
QTP Topic Wise Links

1. Regular Expressions
2. Mobile Applications Automation Testing Using QTP
3. MCQ’s & FAQ’s on QTP
4. Excel+QTP
5. QTP Misc
6. Create DLL in QTP

7. VBScript FAQ
8. HTML DOM
9. Automation Frameworks in General
10. Descriptive Programming
11. DP Maintainance issues
12 Working with WebTables
13. Test Results in HTML format
14. Browser issues
- http://www.sqaforums.com/showflat.php?Number=444187
- http://www.sqaforums.com/showflat.php?Number=409282
15. How to capture screenshots?
16. Getting GMT time in QTP
17. Calling stored Proc from QTP
18. How does createObject works?
19. Firefox and cross-browser testing issues
20. Recovery scenario for password window
21. Using regular expression in WebList
22. Object Reference lost after Navigation
23. Working with Quality Center
24. How to capture text from images?
25. Using QTP as a test suite controller
26. Reading hidden variable from a Web page
27. Error handling
28. How get mouse cursor type
29. Counting objects on a page using childobjects
30. Getting color of a Text Box
31. Working with XMLs
32. Including Libraries in QTP
33. Converting VB API defs to QTP
34. Checking all links on a WebSite
35. Problems with Running QTP on a “locked” system/keyboard
36. Using relative paths in QTP
37. Getting Documentation on Excel, Word, Powerpoint, etc. Object (COM) Automation:
       Read the Note that describes how to force help file installation if not initially found
      Win 2K help files, but probably usable for WinXP and Win 2003
38. Actions Versus Functions:
39. Dynamically Calling an Action
40. Passing and then Dereferencing Parameters
41. Action Parameters
42. “Extending” and “Overidding” QTP Objects, Methods and Functions
43. Using QTP with Dual Monitors:
44. How to Perform a Clean Uninstall of QTP:
45. HP support Issues and Comments:
46. QTP 9.5 Issues and Comments:

Tuesday, December 11, 2012

SAP Automation by Sandip.G

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

Business Process Testing with QTP by Sandip.G

Business Process Testing combines two roles, the Subject Matter Expert (or Business Analyst) and the Automation Engineer, to create reusable Manual, (and then Automated) Components of a test. The SME creates the description and steps of each component, how it operates, it's valid input and expected results. The automation engineer (or the SME) can convert the manual components to simple high level Automated Non-Scripted Components. The automation engineer can use QTP, if necessary, to convert Components to more complex Scripted Components.

Business Process Components are created initially in Quality Center, and the tests they comprise are created in a drag and drop building block manner of these components. Similar to Actions, Business Components address a single business aspect of a test, such as Logging In or Performing a Product Search. Like Actions, they support parameters for flexibility and scalability. You might use different User names and passwords, or search for different types of media by title or artist, respectively. Tests are then built by stringing together reusable component modules, reducing maintenance at a modular level, all inside Quality Center.

Automated components come in two flavors: Non-Scripted (the default) and Scripted. Non-Scripted Automated Business components can be created from Manual components inside Quality Center, and are just the high level capabilities of QTP, displayed in a view similar to QTP's Keyword View. These Non-Scripted automated components lack the ability to add decision logic. This keeps complexity at a straight forward level, so that non-developers, such as your SME, BA or Manual Testers can create automated components. However, they can be converted to Scripted Components within QTP, where the Automation Engineer can add more complex decision logic in the Expert View.

Business Process Testing also includes Application Areas. This is where the additional support functionality of these components are created and managed by the Automation Engineer. This includes the familiar aspects of QTP including the Object Repository, Recovery Scenarios and VBScript Library Files.

One advantage of Business Process Testing scripts is that since they retain their manual step descriptions, so they can be executed step by step by a manually tester, even after they have been automated.

CRM Click WebButton

Given below code will work for the clicking for CRM WebButton .

Public Sub CRM_Click_WebButton(obj_container, str_WebButtonID)
 Dim i
 Dim j,m
 Dim objs
                'gets all Links from container
              Set objs = obj_container.Object.documentElement.GetElementsByTagName("BUTTON")
    'for each object - check if the expected link is found
                For j = 0 to objs.length - 1
     If Instr (1,objs(j).id,str_WebButtonID,1)>0Then
      objs(j).Click
     End If                   
                  Exit for
    Next
       End Sub