10 2013 档案

Java中通过SimpleDateFormat格式化当前时间:/** 输出格式:20060101010101001**/
摘要:import java.util.*;import java.text.SimpleDateFormat;int y,m,d,h,mi,s,ms;String cur;Calendar cal=Calendar.getInstance();y=cal.get(Calendar.YEAR);m=cal.get(Calendar.MONTH)+1;d=cal.get(Calendar.DATE);h=cal.get(Calendar.HOUR_OF_DAY);mi=cal.get(Calendar.MINUTE);s=cal.get(Calendar.SECOND);ms=cal.get(Cale 阅读全文

posted @ 2013-10-30 14:29 张缤分 阅读(404) 评论(0) 推荐(0) 编辑

Jmeter的一个jmx文件(备忘)
摘要:false false false 1 1 1 1281132211000 1281132211000 false continue vars.putObject("INCREMENT", 0); vars.putObject("A... 阅读全文

posted @ 2013-10-21 10:20 张缤分 阅读(3164) 评论(0) 推荐(0) 编辑

Jmeter Thread Group中如果存在HTTP request执行失败,就对整个Thread Group重新执行,限定最大执行次数N次
摘要:由于在对WEB系统进行自动化测试的过程中,经常会由于握手连接断开等原因导致HTTP请求发送失败,如果重新执行一次,会是成功的。在每天的自动化冒烟测试过程中,生成在测试报告存在误报,严重浪费了测试人员确认的时间,因此希望在HTTP请求失败的情况下,重新执行,设置一个重新执行的最大次数,如果尝试了多次都是失败的才认为是真的失败了。一开始,我只是对单个HTTP request通过While Controller做了失败后重新执行这样的处理,但是要让一个thread group里面所有的HTTP request都这样处理该怎么办呢?由于对每个HTTP request都添加一段那样的代码不太现实,最后, 阅读全文

posted @ 2013-10-19 21:56 张缤分 阅读(1998) 评论(1) 推荐(0) 编辑

Jmeter Ant Task如果报告中有错误,在邮件内容里面直接显示出来 系列1
摘要:ANT调用的XML文件,包括运行脚本、生成报告、发送邮件: --> This email was sent automatically by ANT. Please check the automation test report by the link below. If there are any questions, please contact with Jenny Zhang. Thank you! http://SZCOMPUTER/CIMAut... 阅读全文

posted @ 2013-10-18 14:10 张缤分 阅读(1087) 评论(0) 推荐(0) 编辑

ANT发送邮件需要的3个JAR包
摘要:ANT发送邮件需要的3个JAR包:activation.jar、mail.jar、commons-email-1.2.jar将这三个jar包放到 $ANT_HOME/LIB 路径下即可内网发送邮件: --> This email was sent automatically by ANT. Please check the automation test report by the link below. If there are any questions, please contact with mim. Thank you! ... 阅读全文

posted @ 2013-10-18 11:29 张缤分 阅读(1058) 评论(0) 推荐(0) 编辑

Jmeter的log输出控制
摘要:Jmeter的log输出控制(jmeter.log)log_level.jmeter=ERROR log_level.jmeter.junit=DEBUG 在jmeter.properties中,修改Jmeter的日志级别为:ERROR, 否则产生巨大的日志文件jmeter.log,如果是需要查看详细的调试信息,可以将log_level.jmeter设置为DEBUG对于断言,如果想打印更加详细的自定义日志到jmeter.log,可以这样做:添加一个BeanShell Assertion,script这样填写:import org.apache.log4j.Logger;if (incremen 阅读全文

posted @ 2013-10-07 15:02 张缤分 阅读(17055) 评论(0) 推荐(1) 编辑

Jmeter发送某个request时而成功,时而失败(处理办法:失败的时候尝试重新发送这个HTTP request)
摘要:Jmeter发送某个request时而成功,时而失败Maybe it’s Jmeter’s problem, after all, is not a commercial software.And also, it is possible that the test environment of server has some problem, for this kind of command that sometimes succeed, sometimes failed,I can only try to send the request for many times, for examp 阅读全文

posted @ 2013-10-07 10:50 张缤分 阅读(1152) 评论(0) 推荐(0) 编辑

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

点击右上角即可分享
微信分享提示