Test Automation Using C#
2009-06-04 17:16
302 查看
Test Automation Using C#——开篇
2008-04-02 14:11
2008-04-02 14:11
先捋一下自动化测试方案中所用到的工具: l Process 使用Process可以launch应用程序,同时Trace该程序的许多重要信息,比如句柄(handle) 这是自动化测试的重要部分,是测试的开始。 l SendKeys & Clipboard SendKeys提供了键盘输入的操作,可以利用它的Send()和SendWait()方法来完成所有键盘的模拟操作。很多电脑高手都把键盘操作练的很熟,可以根本不使用鼠标。所以,理论上,有了SendKeys就可以完成所有的自动化测试了。 Clipboard可以和SendKeys结合使用,它控制了当前的剪贴板,可查看、修改、设置当前的剪贴板的所有内容。 l Spy++ Spy++是Visual Studio提供的一个工具,可以察看到当前运行环境下所有window, dialog和control的信息,像一棵数一样的结构。 该工具可以在“Start → All Programs → Microsoft Visual Studio 2008 → Visual Studio Tools ”下找到。 l Windows API: User32.dll Windows开放了大量的API,提供了大量的可操作函数。 user32.dll是Windows用户界面相关应用程序接口,用于包括Windows处理,基本用户界面等特性。 虽然user32.dll是用C++写的,但在C#中可以这样来引用: [DllImport("user32")] public static extern int GetWindowText(IntPtr hWnd, StringBuilder text, int count); 这样声明后就可以把GetWindowText()当静态方法使用了。 l 其他API:Maui Maui有三个部分: 1. Maui.Core.dll 2. Maui.InternetExplorer.dll 3. Maui.TestLog.dll |
相关文章推荐
- Learn automation test tool selenium from Scratch by using C#
- Using C# to create Screen Saver for automation, [preview effect]
- How to do web automation test using Selenium
- Microsoft Web Browser Automation using C#
- C# Best Practices - Accessing and Using Classes
- [导入]Using Raw Input from C# to handle multiple keyboards
- C#中的using(){}
- C#里using的作用------释放资源
- C# Using用法三则
- Some reads on Test Automation
- C#中using关键字的作用及其用法
- C# testJsonAsXMLNodeAttribute - XML& json & Collections - XmlNode, XmlElement, XmlAttribute,Dictionary,List
- Convert objects to JSON in C# using JavaScriptSerializer
- ASP.NET获取IP与MAC[using C#]
- [C#错误]未找到类型或命名空间名称" " (是否缺少 using 指令或程序集引用?)
- 【笔记】C#using的用法小结
- 反射技术与工厂方法 (using C#)
- C# using 的用法
- Using ZipLib to create a Zip File in C#
- C# 之 深入理解using