1、Class and OOD in QTP Automation Development,Kevin Zheng 12/24/2009,Agenda,Our Present Development The Advantage and Disadvantage of OOP in QTP Automation Development Using Class in VBS Some Object Oriented Design Pattern Q&A,Profile Form,Development mainly followed the Process Oriented Difficult to
2、maintain, especially faced with UI change Poor code reuse and hard to expand Its boring to just follow the process to write scriptsSo can we try to import the Object Oriented to our daily work?,Our Present Development,Profile Form,Advantage of OOP Easy to maintain, just need to modify the operation
3、or attribute of an object Class better to describe an object in the system and its easier to read More efficient to develop,Advantage and Disadvantage of OOP,Advantage and Disadvantage of Using Class,Disadvantage of OOP Lack of inheritance and polymorphic features In VBS More space for objects Hard
4、to abstract class and class is not available everywhere,Using Class in VBS,Class Structure Initial and terminate Variable, Function, Property, Sub,Using Class in VBS,Example:,Using Class in VBS,Example:,create,Create a object:,Using Class in VBS,Call the created object and do some operation:,Using Class in VBS,Budget,Some Object Oriented Design Pattern,Decorator Factory Observer Adapter And so on,Q & A,Thanks For Your Attention,