显示标签为“Test”的博文。显示所有博文
显示标签为“Test”的博文。显示所有博文

2008年2月19日星期二

用MaxQ做Web功能测试


2007-12-10 作者:weihua 来源:SQA Lab 文字大小:【大】【中】【小】
简介:MaxQ是一个开源的Web功能测试工具。它包含一个记录Jython测试脚本的HTTP代理,一个用于回放测试的命令行实用程序。代理记录器自动存储提交到表单的变量。

MaxQ是一个Web功能测试工具。它通过Jython脚本记录你点击的links的输入,然后允许你在任何时候回放。

MaxQ的特点:

1. 免费、开源。
2. 用Jython作为记录测试脚本的语言。
3. 基于Java构建,在任何地方都可以运行。
4. 代码简单,容易按需增强其功能。
5. 测试脚本可以为JUnit运行。
6. 可以运行于代理服务器之后。
7. 支持cookies。

MaxQ的工作原理:


录制测试:

1. 配置web浏览器的HTTP代理为 localhost:8090
2. 启动MaxQ, 双击 bin\maxq.bat
3. 新建一个测试代码,通过File -> New -> Standard Script.
4. 打开Web浏览器,到达你想要测试的地方作为入口
5. 启动正式录制,通过 Test -> Start Recording
6. 开始对Web 页面进行测试。
7. 测试动作完成后,停止测试, 通过 Test -> Stop Recording。 保存测试脚本为"***.py" 的格式。

重新运新测试:

通过 GUI:
1. 启动 MaxQ
2. 选择和打开已存在的测试代码 File -> Open
3. 运行测试代码 Test -> Run, 一个新的包含测试输出的对话框将会自动打开。

通过 命令行:
maxq -r mytest.py

运行于不同的服务器:
maxq -u loalhost:8000 www.sqalab.com -r mytest.py

2007年5月17日星期四

NUnit - Unit Testing for .NET

http://www.nunit.org/
.NET的Unit Testing测试框架,就像Java有JUnit一样。
下载

2007年4月19日星期四

HTMLUnit

http://htmlunit.sourceforge.net/

一个用来测试基于网络的程序的测试框架,(测试Java程序的有JUnit,测试CPP的也有CPPUnit)等等。

HtmlUnit is a java unit testing framework for testing web based applications. It is similar in concept to httpunit but is very different in implementation. Which one is better for you depends on how you like to write your tests. HttpUnit models the http protocol so you deal with request and response objects. HtmlUnit on the other hand, models the returned document so that you deal with pages and forms and tables.

HtmlUnit was originally written by Mike Bowler of Gargoyle Software and released under an apache style license. Since then, it has received many contributions from other developers and would not be where it is today without their assistance.

HtmlUnit is not a generic unit testing framework. It is specifically a way to simulate a browser for testing purposes and is intended to be used within another testing framework such as JUnit. Refer to the document "Getting Started with HtmlUnit" for an introduction.

NOTE: This documentation is for the current code in SVN and may not accurately reflect the version of HtmlUnit that you have downloaded. Refer to the documentation that came with your download for the most correct information