Test Complete: Object Driven Test (ODT)
TestComplete 是一款支持自动化脚本设计的测试工具,支持众多框架的测试模式,本文简要介绍一下ODT,及常用的相关脚本命令。
ODT的Tree下面包含两个子节点: Classes 和 Data
可以直接在TC的GUI上面操作,加入相关定义(参见Help手册)。
更灵活,便于维护的是通过脚本定义。
1: 在Classes中定义封装界面的类:
定义类:
ODT.Classes.Declare(classname);
定义类的实例:
ODT.Classes.New(classname);
定义类的特性:
Obj=ODT.Classes.Declare("MyClass");
Obj.AddProperty("name","value");
定义类的方法:
Obj=ODT.Classes.Declare("MyClass");
Obj.AddMethod("methodName","ScriptProc");
// ScriptProc
must be specified in the format
unit_name.routine_name
Both unit_name and routine_name are required.
2:
在Data 中定义相关的数据:
TestObj = ODT["Classes"]["New"]("ClsNotepadTest");
TestObj["ID"] = "ReleaseTest";
FileObj = TestObj["Files"]["AddItemOfClassType"]("ClsFile");
FileObj["Path"] = "C:\\TestFiles\\file1.txt";
OperationObj = FileObj["Operations"]["AddItemOfClassType"]("ClsOperation");
OperationObj["ID"] = "Find";
OperationObj["MenuPath"] = "Edit|Find...";
3:运行测试流程:
- If a tree node (data group, variable, object, array, etc). holds an ordinary
value (string, integer, etc.), no action is performed and the method goes to the
next tree node of the same level.
- If a tree node holds an array, the
Run
method checks each item
of this array.
- If an item holds an ordinary value, no action is performed and the method
goes to the next item.
- If an item holds an object, the method processes this object in the manner
described below.
- If an item holds an array, the method processes each item of this array in
the same way it processes the variable’s array.
- If a tree node holds an object, the
Run
method “processes” this
object in the following manner:
- Executes all object methods that are specified as Init
. These
methods are executed in order of appearance in the editor. You can change the
order using the editor's context menu items. See How to Create, Modify and
Delete Methods
.
- Analyzes the object properties. If a property holds an object, the
Run
method processes this object (i.e. executes its methods and
processes the properties) in the described manner. If a property holds an array,
the method processes each item of this array in the manner described below. If a
property holds an ordinary value, it is ignored.
- Calls non-Init
methods (the methods are called in order of appearance
in the editor. For information, on how to change the method position, see How to Create, Modify and
Delete Methods
).
- 大小: 26.6 KB
分享到:
相关推荐
Covers agile development, model-driven architecture, code generation, aspect-oriented programming, test-driven development, and much more. An essential resource for every J2EE developer, project ...
From basic to advanced language constructs, test-driven development, and object-oriented techniques, you will learn how to get the most out of the TypeScript language. What You Will Learn Gain an ...
- **TestComplete MSTest**:与 Microsoft 的 MSTest 工具集成。 - **ODT (Object Driven Testing)**:面向对象的测试方法。 ### 10. .NET UI 自动化 - **Windows API**:底层 API,用于与 Windows 组件交互。 -...
Focus on test-driven development to build high quality applications that are modular, scalable and adaptable Book Description The TypeScript language, compiler and open-source development toolset ...
Focus on test-driven development to build high quality applications that are modular, scalable and adaptable Book Description The TypeScript language, compiler and open-source development toolset ...
These concepts include Test Driven Development, the State and Mediator Pattern, using Express REST endpoints, object-oriented design principles, modularization, and custom CSS animations.
4. **TestComplete**:一个功能强大的自动化测试工具,支持Web、Windows和移动应用的测试。 5. **Cucumber**:一种基于BDD的方法,主要用于编写易于理解和维护的测试案例。 #### 五、自动化测试框架的优点 1. **...
ICS - Internet Component Suite - V8 - Delphi 7 to RAD Studio 10 Seattle ======================================================================= (Aka FPIETTE's Components) Revised: March 3, 2016 ...
Use Test Driven Development methodology to write more robust code Build a complete, working JavaScript quiz app from scratch Table of Contents Chapter 1: Hello, JavaScript Chapter 2: Programming ...
How to unit test and practice test-driven development, This book is a must for any developer, software engineer, project manager, team lead, or systems analyst with an interest in producing better ...
Build an infrastructure for fast, easy test-driven development of your data access layer Extend NHibernate to add data encryption and auditing Implement entity validation, full-text search, horizontal...
《Test-Driven Development: A Practical Guide》推广了测试驱动开发的方法。 此外,设计模式也是Jolt大奖关注的重点,如《Head First Design Patterns》采用新颖的教学方式介绍了设计模式;《Better, Faster, ...
- **Message-Driven Bean (MDB)**:用于处理来自消息队列的消息,支持异步编程模型。 - **Entity Bean**:用于持久化数据到数据库,已被JPA(Java Persistence API)所取代。 - **JPA**:基于ORM(Object-Relational...
1. 自动化测试工具:列举并比较常见的自动化测试工具,如Selenium、JUnit、TestComplete等。 2. 脚本编写:教授如何编写和维护测试脚本,包括语法、断言和异常处理。 3. 自动化测试框架:介绍自动化测试框架的概念和...
One of the most common uses of non-paged pool is the storage of object handles. For more information regarding “maximums,” see also… Inside Windows 2000,Third Edition, pp. 403-404 Paged Pool ...
The Way to Go,: A Thorough Introduction to the Go Programming Language 英文书籍,已Cross the wall,从Google获得书中源代码,分享一下。喜欢请购买正版。 目录如下: Contents Preface......................
go程序设计语言 Contents Preface................................................................................................................................. xix PART 1—WHY LEARN GO—GETTING ...