Custom Search

Friday, October 14, 2011

QTP automation for testing .Net applications developed using Infragistic Components

Infragistics is mainly concentrating presentation layer of any software application.
They are developing many user-friendly UI (User Interface) Controls such as Treeview control.
NetAdvantage is their product that can be used in .net applications.
QTP (Quick Test Professional) won't recognize/identify the controls in any application which is developed using NetAdvantage even when QTP is equipped with .net add-in.
So, we should go for extending capability of .net add-in to make QTP recognize these NetAdvantage components.
Infragistics is providing TestAdvantage for this purpose.
We need to use this TestAdvantage in addition to .net add-in along with QTP.
We may face many difficulties when start using TestAdvantage.
To minimize the issues we need to follow below things.

1. We should follow the below installation order strictly.
QTP installation->.net add-in installation->TestAdvantage installation
2.Version of TestAdvantage should be exactly same as version of NetAdvantage. Even advanced version is not acceptable.

Required Steps/Processes to follow for doing testing using test automation tool QTP

 I am explain the steps or processes that are required for doing testing using test automation tool QTP(Quick Test Professional).

  • Before starting actual automation task, we should do tool evaluation and feasibility study to make sure QTP is the appropriate tool for automating test cases of our application. It can be done by selecting few sample modules/screens/flow from the application/test cases and create simple QTP scripts to make sure QTP will recognize the objects in our application As part of Test driven development, we can ask the application development team to give proper name or any other identification properties for the objects, if our feasibility study reveals some difficulty for QTP to recognize the objects.
  • As I mentioned earlier, we should start our actual automation work only after completing some basic manual testing to make sure the application is stable and in working condition.
  • QTP developers should review the Test cases and update it to specify what are the test cases that can be automated. Because ideally it is not possible to automate all the test cases. The reason may be, difficulty in navigation or object identification issue or difficulty in verifying the result. If possible, the manual test cases can be rearranged to have separate automation test cases.
  • Once after reviewing all the test cases and after getting familiar with the application we can design the automation frame work for our needKeep separate instance of application specifically for the purpose of developing automation scripts. It will avoid any unnecessary mess up with manual testing processes.Set up proper QTP development environment with required Add-in and with any add-in extensibility. If many people are going to involve in the development activities then we need to clearly document the responsibility of each person and the approach for sharing the scripts. If application is installed in remote machine then QTP also should be installed in remote machine. Because QTP will not recongnize the objects of application in remote session.
Set up proper object identification properties in QTP IDE.
  1. Once after completing all the above basic steps, the first development task should be adding all the required Test Objects/properties to the Object repository It can be done by recording or by manually adding the objects to Object repository. If you specify any object using DP (Descriptive Programming) remember to document it.
  2. Once after adding all the objects, rename them to have a unambiguous/meaningful name.
  3. Based on your design of automation framework, create reusable actions and vbscript functions using step generator or keyword view or expert view or using Active screen.
  4. Using these reusable actions prepare a sample/base script for executing few test cases. And then test it to make it error free.
  5. Once after completing the above mentioned sample script, do parametrization (data driven testing) for executing multiple iterations.
  6. Add checkpoints to verify the expected results.
  7. Use appropriate Regular expression to make sure the script runs in all scenarios even when some properties are getting changed dynamically in particular pattern
  8. Add the Recovery scenarios to handle any unexpected behavior of the application.
  9. Use Environment variables to avoid any hard coded values in the script.
  10. Do dry run for this sample script and debug the issues in the automation script and fix them
  11. Do the above steps for all the test cases
  12. Create a Driver script which will call all the test scripts.
  13. Complete dry run for the Driver script.
  14. Prepare .vbs script using Automation Object Model to run the QTP scripts in other environments also with same settings.
  15. Run the scripts in desired environment.
  16. Analyze the test results
  17. Report the bugs/defects in the application once after completing the analysis.
  18. Once after completing functional testing, select few essential scripts and store them separately for the future Regression Testing.