JTracker - J2EE逻辑测试解决方案
来源:互联网 发布:linux find 大小写 编辑:程序博客网 时间:2024/05/14 18:36
使用蓝图
测试图解:
Java 源文件:
package testservlet;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
public class sample extends HttpServlet {
...
static int count=0;
/*<<<TPID=TP110>>>*/ // << =============== logical test point,the test ID is TP110
public void init() throws ServletException {
}
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
...
PrintWriter out = response.getWriter();
out.println("<html>");
/*<<<TPID=TP211> >>*/ // << =============== logical test point,the test ID is TP211
count++;
out.println("<head><title>sample</title></head>");
out.println("<body>");
out.println("<p>The servlet has received a GET. This is the reply.</p>");
out.println("</body></html>");
/*<<<TPID=TP222>>>*/ // << =============== logical test point,the test ID is TP222
}
/*<<Clean up resources>>*/
public void destroy() {
}
}
测试CASE:
TestCase001.tc //Normal CASE001...
TestCase002.tc //NormalCASE002...
...
TestCase001.tc:
////////test CASE info////////
caseInfo{
title = normal basic case; //test case title
path = D:/UnitTest; //test file path
source = Servlet1.java; //source file name
package = testservlet; //package name
class = testservlet.Servlet1; //full class name
}
////////Logic Test Point/////////
MEnter(name=doGet){ //when system entry Servlet1's doGet method, it will take this logic test;
//Logic test content;
title("test1 here is doGet full name"); //display "test1 here is doGet full name";
field.dis(intfield); //display Servlet1's field intfield;
}
MExit(name=doGet){ //when system exit the method Servlet1.doGet ,it willtake this logic test;
//Logic test content;
title("test1 here is doGet method name"); //display "test1 here is doGet method name";
field.dis(stringfield); //display Servlet1's field stringfield;
}
BPoint(TP = TP222){ //when system run at test point TPSLV132, it will take this logic test;
//Logic test content;
title("TP222here"); //display "TP222here";
field.dis(field3); //display Servlet1's field field3;
}
测试结果:
TestCase001.tr //Normal CASE001...
TestCase002.tr //NormalCASE002...
...
TestCase001.tr:
*******************************************************************
** JTracker 1.0 standard edition **
** Copyright(c) 2002-2003 Chen ShiMing. All Rights Reserved. **
** http://www.jtracker.net **
*******************************************************************
****************************** START ******************************
**************************** case info ****************************
===== CASE::: testCase001.tc =====
-------ADD::MEnter(name=doGet)
-------ADD::MExit(name=doGet)
-------ADD::BPoint(TP = TP222)
*******************************************************************
***Location::time=10:45.34.158*testservlet.Servlet1*doGet*line=51
*** Module::MEnter(name=doGet)
------------------------------
title:"test1 here is doGet full name"
dis : intfield=1
===================================================================
***Location::time=10:45.34.259*testservlet.Servlet1*doGet*line=99
*** Module::BPoint(TP = TP222)
------------------------------
title:"TP222here"
dis : field3=3
===================================================================
***Location::time=10:45.34.339*testservlet.Servlet1*doGet*line=146
*** Module::MExit(name=doGet)
------------------------------
title:"test1 here is doGet method name"
dis : stringfield=string
===================================================================
******************************** END ******************************
- J2EE逻辑测试解决方案 - JTracker
- JTracker - J2EE逻辑测试解决方案
- j2ee分页逻辑
- 逻辑测试
- 逻辑测试
- J2EE开发中文解决方案
- J2EE信息系统集成解决方案
- 非J2EE部署解决方案
- 测试J2EE Web Services
- J2EE测试题
- J2ee测试工具
- J2EE测试题
- 一道逻辑测试题目!
- 逻辑测试题目一个
- 逻辑小测试
- 逻辑小测试-->应聘
- 逻辑测试题
- 逻辑覆盖 测试题
- 关于std::list的sort函数在VC6下的修正
- 伪随机序列的原理
- 梅西迭代算法的实现
- JAVA软件的可维护性改进方案
- J2EE逻辑测试解决方案 - JTracker
- JTracker - J2EE逻辑测试解决方案
- C语言国际标准 ISO/IEC 9899:1999(E) 翻译(一):目录
- C语言国际标准 ISO/IEC 9899:1999(E) 翻译(二):前言
- C语言国际标准 ISO/IEC 9899:1999(E) 翻译(三):简介
- C语言国际标准 ISO/IEC 9899:1999(E) 翻译(四):库
- 非对称加密算法中求解大正整数模大正整数的余数的快速计算法
- 利用鼠标键盘钩子截获密码。
- 对密码截获工具的防范
- 揭开QQ登录窗口的面纱