Friday, August 28, 2009

Disadvantage of Descriptive Programming in QTP


One of readers of our QTP knol has asked about Disadvantages of Descriptive Programming (DP) in QTP.

I replied as below,

The main disadvantage of Descriptive programming is Maintenance issue.
Since Object repository will be stored in centralized place, property definition for any Object can be easily changed at any time if the application developer changes the property of the actual object/control.

But, in descriptive programming (DP) it is difficult to change the object property as each QTP developer will be defining object property in many places using DP.

For example, assume that you and team member are developing automation test scripts for testing gmail application.

Gmail login script will be used in many test scenarios.

Assume that you are automating some scenarios and your team member is automating some other scenarios.
In case of Object Repository, you and your team member will be forced to use same object description for login page controls/Objects (e.g username,password, login button).

So in future if Google changes any property (e.g change the button name from "login" to "get into gmail"), all the scenarios can be easily updated just by updating this change in Object repository.

But in case of DP, there is a possibility of defining the login button in multiple places. One definition by you and another by your team team. (Anyway proper Team Coordination will avoid this issue, but practically it is very difficult to achieve this coordination.).

So, comparatively updating DP style coding is bit difficult if the application properties got changed.
eBook for learning Software Testing and QTP Automation.

More Articles...

1 comment:

Mehmet said...

What if another field such as login place field added on the login page. So i think writing different screens as different test script and using test calls in the script is better way.
About shared object repository you are right.

Search This Blog