Best Practices in QTP Automation

8:27 PM
Best Practices in QTP Automation -

  • Start the automation work only when AUT (Application Under Test) is stable. That is, you should have completed the first series of manual tests before starting QTP automation task.
  • Use reusable actions, where possible.
  • Do not copy and paste the control points when you want to check the same thing in more than one location. Instead, creation of separate block. Why manipulate checkpoints in QTP is not feasible or will be difficult.
  • Open the browser / application after QTP opening.
  • The VBScript functions should not have any hard coded names of objects, the name of the objects should be passed as argument to the function.
  • Use Shared Object Repository. My suggestion is not to use DP (Descriptive Programming) that will increase your maintenance work.
  • Before you add any object in the Object Repository, provide appropriate properties of object identification (Tools-> ObjectIdentification) if you feel that the properties default identification are not suitable for your application. If you do it after you have added some items to the Object Repository then you can address issues related to having more test objects in the Object Repository to a single real object.
  • Open QTP using the Automation object model. You can do this by simply typing (though you are having the option 'create' scripts in QTP IDE itself) simple .vbs file, and then open QTP simply double-click the .vbs file. It 's very, very essential if you are developing your own scripts in a machine / environment and planning to run / execute it in another environment. By using the Automation object model that we are making sure that all IDE settings (for example, property identification of objects) that are changed in the development environment are propagated to the execution environment also
  • Always use reference / relative path when calling any external action reusable instead of using absolute path / full, otherwise the script will fail when putting it in a different way.
  • Remember to pick up your objects before merging object repository repository.
  • Put adequate online comments and comments also put synthetic (description parameters, input and output, dependence, author) at the beginning of the test. In comments sure to talk about the flow / performance data.
  • Rename the items in repository object to have its own meaning for them. Because the default name assigned by adding the recording manually or objects can not be good / meaningful.
  • Giving attention to synchronization (eg the use of synchronization, waitproperty, exist). And also use regular expressions wherever necessary. Otherwise, the coherence of the execution of the script will be affected.
  • Use recovery scenario to handle any unexpected behavior (for example showing pop-up windows at times) application.

Previous
Next Post »
0 Komentar