??xml version="1.0" encoding="utf-8" standalone="yes"?>五月天天在线,亚洲精品一区二区网址,一级视频在线免费观看http://www.aygfsteel.com/leekiang/category/35372.htmlMDA/MDD/TDD/DDD/DDDDDDDzh-cnTue, 02 Aug 2011 11:18:28 GMTTue, 02 Aug 2011 11:18:28 GMT60- 单元试http://www.aygfsteel.com/leekiang/archive/2011/07/02/353556.htmlleekiangleekiangSat, 02 Jul 2011 09:38:00 GMThttp://www.aygfsteel.com/leekiang/archive/2011/07/02/353556.htmlhttp://www.aygfsteel.com/leekiang/comments/353556.htmlhttp://www.aygfsteel.com/leekiang/archive/2011/07/02/353556.html#Feedback0http://www.aygfsteel.com/leekiang/comments/commentRss/353556.htmlhttp://www.aygfsteel.com/leekiang/services/trackbacks/353556.htmlJspTest
ServletRunner
容器外的JSP面试技?/a>
http://home.so-net.net.tw/idealist/Test/cactus.html

]]> - ab性能试http://www.aygfsteel.com/leekiang/archive/2011/04/03/347577.htmlleekiangleekiangSat, 02 Apr 2011 18:07:00 GMThttp://www.aygfsteel.com/leekiang/archive/2011/04/03/347577.htmlhttp://www.aygfsteel.com/leekiang/comments/347577.htmlhttp://www.aygfsteel.com/leekiang/archive/2011/04/03/347577.html#Feedback0http://www.aygfsteel.com/leekiang/comments/commentRss/347577.htmlhttp://www.aygfsteel.com/leekiang/services/trackbacks/347577.html-n总请求次敎ͼ-cq发敎ͼ-t旉(U?
注意Qurl后面一定要带斜?br />
url最好用引号引v来:(x)
ab -n 1000 -c 1000 'http://192.168.16.203/XGateway/XService.svc/GetData?dd=XXX&bb=XXXXXX&cc=ttttt'
如果不加引号Q则默认只传一个参敎ͼcurl也是如此
用ab试nginx集群遇到的问?/a>
使用Apache abq行压力试(参数说明)

]]> - AB试http://www.aygfsteel.com/leekiang/archive/2010/10/14/335113.htmlleekiangleekiangThu, 14 Oct 2010 04:49:00 GMThttp://www.aygfsteel.com/leekiang/archive/2010/10/14/335113.htmlhttp://www.aygfsteel.com/leekiang/comments/335113.htmlhttp://www.aygfsteel.com/leekiang/archive/2010/10/14/335113.html#Feedback0http://www.aygfsteel.com/leekiang/comments/commentRss/335113.htmlhttp://www.aygfsteel.com/leekiang/services/trackbacks/335113.html1Q开源性能试ApacheBench
(tng) (tng) http://jackei.cnblogs.com/archive/2006/07/18/454144.html
2Q互联网营销人员的优化手D?br />
]]> - jmeterW记http://www.aygfsteel.com/leekiang/archive/2010/05/27/322074.htmlleekiangleekiangThu, 27 May 2010 10:37:00 GMThttp://www.aygfsteel.com/leekiang/archive/2010/05/27/322074.htmlhttp://www.aygfsteel.com/leekiang/comments/322074.htmlhttp://www.aygfsteel.com/leekiang/archive/2010/05/27/322074.html#Feedback0http://www.aygfsteel.com/leekiang/comments/commentRss/322074.htmlhttp://www.aygfsteel.com/leekiang/services/trackbacks/322074.html1,在测试计划上右键dU程l?然后在线E组面板里有几个输入栏:(x)U程数、Ramp-Up Period(in seconds)、@环次敎ͼ其中Ramp-Up Period(in
seconds)表示在这旉内创建完所有的U程。如?个线E,Ramp-Up = 200U,那么U程的启动时间间隔ؓ(f)200/8=25U?br />2,在线E组里添?->取样?sampler)->httphQ注意\径不包括服务器地址
3,d监听器,可以用“用表格查看l果”或W?个“图形结果”等,"查看l果?可以让你查看每个sampler的请求数据和响应数据
tips:
1,使用HTTP Cookie Manager或URL重写实现同一U程内的多个h׃nSession
2,把Login的请求放到只执行一ơ的控制器中Q那么即使@环多ơ,Login也只h一?br />3,Z(jin)节省pȝ资源Q用非H口模式q行JMeterQjmeter -n -t test.jmxQ?
4,如果模拟q发用户q多Q比?00U程Q那么可以分散到多台机器上运行JmeterQ比?台电(sh)脑,每台50U程Q?
5,可以用badboy工具录制.jmx脚本
参?
http://www.51testing.com/?128005/action_viewspace_itemid_69407.html
http://www.ibm.com/developerworks/cn/opensource/os-pressiontest/
http://blog.chenlb.com/2009/03/jmeter-quick-start.html
http://rdc.taobao.com/blog/qa/?p=2287
http://qa.taobao.com/?p=6216
http://www.aygfsteel.com/BlueDavy/archive/2008/07/25/217514.html

]]> - 数据库测试工?dbunit{?/title>http://www.aygfsteel.com/leekiang/archive/2010/05/23/321672.htmlleekiangleekiangSun, 23 May 2010 11:35:00 GMThttp://www.aygfsteel.com/leekiang/archive/2010/05/23/321672.htmlhttp://www.aygfsteel.com/leekiang/comments/321672.htmlhttp://www.aygfsteel.com/leekiang/archive/2010/05/23/321672.html#Feedback0http://www.aygfsteel.com/leekiang/comments/commentRss/321672.htmlhttp://www.aygfsteel.com/leekiang/services/trackbacks/321672.html (tng) (tng) (tng)private IDatabaseTester databaseTester;
(tng) (tng) (tng)@Override
(tng) (tng) (tng)protected void onSetUp() throws Exception {
(tng) (tng) (tng) (tng) (tng) (tng)databaseTester = new JdbcDatabaseTester("oracle.jdbc.driver.OracleDriver",
(tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng)"jdbc:oracle:thin:@localhost:1521:orcl", "test", "test");
(tng) (tng) (tng) (tng) (tng) (tng)I(yng)DataSet dataSet = getDataSet();
(tng) (tng) (tng) (tng) (tng) (tng)databaseTester.setDataSet(dataSet);
(tng) (tng) (tng) (tng) (tng) (tng)databaseTester.onSetup();
(tng) (tng) (tng)}
(tng) (tng) (tng)@Override
(tng) (tng) (tng)protected void onTearDown() throws Exception {
(tng) (tng) (tng) (tng) (tng) (tng)databaseTester.onTearDown();
(tng) (tng) (tng)}
(tng) (tng) (tng)protected IDataSet getDataSet() throws Exception {
(tng) (tng) (tng) (tng) (tng) (tng)String path = "users.xml";
(tng) (tng) (tng) (tng) (tng) (tng)I(yng)nputStream in = this.getClass().getResourceAsStream(path);
(tng) (tng) (tng) (tng) (tng) (tng)return new FlatXmlDataSetBuilder().build(in);
(tng) (tng) (tng)}
}
Unitils是一个简化测试开发,提高?gu)试l护性的一个工具集
Dbdeploy是Thoughtworks公司开发的数据库工P获得Jolt大奖

]]> - 试理http://www.aygfsteel.com/leekiang/archive/2010/04/17/318616.htmlleekiangleekiangSat, 17 Apr 2010 13:45:00 GMThttp://www.aygfsteel.com/leekiang/archive/2010/04/17/318616.htmlhttp://www.aygfsteel.com/leekiang/comments/318616.htmlhttp://www.aygfsteel.com/leekiang/archive/2010/04/17/318616.html#Feedback0http://www.aygfsteel.com/leekiang/comments/commentRss/318616.htmlhttp://www.aygfsteel.com/leekiang/services/trackbacks/318616.html
]]> - 代码reviewhttp://www.aygfsteel.com/leekiang/archive/2010/03/09/314893.htmlleekiangleekiangMon, 08 Mar 2010 16:22:00 GMThttp://www.aygfsteel.com/leekiang/archive/2010/03/09/314893.htmlhttp://www.aygfsteel.com/leekiang/comments/314893.htmlhttp://www.aygfsteel.com/leekiang/archive/2010/03/09/314893.html#Feedback1http://www.aygfsteel.com/leekiang/comments/commentRss/314893.htmlhttp://www.aygfsteel.com/leekiang/services/trackbacks/314893.html把解压后的目录edu.umd.cs.findbugs.plugin.eclipse_1.3.9.20090821剪切到findbugs\eclipse\plugins目录下,再以links的方式安?
(tng) 装好后再Java目上右键,可以看到“Find Bugs”菜单项Q子菜单w有“Find Bugs”和“Clear Bug Markers?br /> (tng) 在首选项->java->findbugs里可以进行配|?br /> (tng) 参考:(x)http://lansky07.javaeye.com/blog/283923
(tng) (tng) (tng) (tng) (tng) (tng) (tng) http://www.cnblogs.com/hyddd/archive/2009/02/13/1390362.html
2,eclemma
使用 EclEmma q行覆盖试
(tng)
q求代码质量: 不要被覆盖报告所qh
3,
单实用的Code Review工具
Review Board
4,
敏捷开发中~写高质量Java代码
5,MaintainJ是一个Java应用E序l护工具。MaintainJ在运行时能生成UML序列和类图?br />
6,gerrit

]]> - 关于mockhttp://www.aygfsteel.com/leekiang/archive/2010/02/14/313004.htmlleekiangleekiangSun, 14 Feb 2010 13:20:00 GMThttp://www.aygfsteel.com/leekiang/archive/2010/02/14/313004.htmlhttp://www.aygfsteel.com/leekiang/comments/313004.htmlhttp://www.aygfsteel.com/leekiang/archive/2010/02/14/313004.html#Feedback0http://www.aygfsteel.com/leekiang/comments/commentRss/313004.htmlhttp://www.aygfsteel.com/leekiang/services/trackbacks/313004.html至于easymock之外的选择Q我个h比较喜欢和推崇jmockitQmocito虽然也不错不q有?jin)jmockit我就pass掉mockito?jin)?br />只是每次看到目代码中,用easymock有recordQreplay却不调用verifyӞp得郁?/a>。这L(fng)testcaseQ就通过?jin),又能说明什么?
Mock通常很少考虑复用Q每个mock对象通过都是遵@"just enough"原则Q一般只适用于当前测试方法。因此每个测试方法都必须实现自己的mock逻辑Q当然在同一个测试类中还是可以有一些简单的初始化逻辑可以复用?
stub则通常比较方便复用Q尤其是一些通用的stubQ比如jdbcq接之类。spring框架׃ؓ(f)此提供了(jin)大量的stub来方便测试,不过很遗憄是,它的名字用错?jin)?x)spring-mock
mock和stub的最重要的区别:(x)expectiation/期望?
对于mock来说Qexpectiation是重中之重:(x)我们期待Ҏ(gu)有没有被调用Q期待适当的参敎ͼ期待调用的次敎ͼ甚至期待多个mock之间的调用顺序。所有的一切期待都是事先准备好Q在试q程中和试l束后验证是否和预期的一致?
而对于stubQ通常都不?x)关注expectiation
easymock教程-mock和stub
http://www.javaeye.com/topic/21630
单元试框架JMock与Mockito的用法比?/a>
http://javasee.iteye.com/blog/1000868
http://hyjun.iteye.com/blog/337206
单元试mockQ用JMockit写单元测试实?/a>
http://gojko.net/2009/10/23/mockito-in-six-easy-examples/

]]> - 自动化测?/title>http://www.aygfsteel.com/leekiang/archive/2009/05/23/277585.htmlleekiangleekiangSat, 23 May 2009 11:05:00 GMThttp://www.aygfsteel.com/leekiang/archive/2009/05/23/277585.htmlhttp://www.aygfsteel.com/leekiang/comments/277585.htmlhttp://www.aygfsteel.com/leekiang/archive/2009/05/23/277585.html#Feedback0http://www.aygfsteel.com/leekiang/comments/commentRss/277585.htmlhttp://www.aygfsteel.com/leekiang/services/trackbacks/277585.htmlhttp://www.51testing.com/html/11/n-11611.html
http://www.51testing.com/html/57/1872.html
使用iTest2重构自动化功能测试脚?/a>
众所周知Q自动测试脚本很隄护。随着敏捷Ҏ(gu)学在企业软g目中的q泛应用Q其核心(j)实践之一——自动化功能试已经证明?jin)它的h(hun)|同时却也寚w目提?
?jin)?xi)战。传l的“录Ӟ回播”类型的试工具也许能帮助测试h员很快地创徏一pd的测试脚本,但这些测试代码最后却很难l护。原因就是:(x)应用E序在不断变化?br />Test2 IDE是一ƾ新的功能测试工P专ؓ(f)试人员设计Q让他们能够很轻村֜开发和l护自动试脚本。iTest2完全致力于web试的自动化Q它支持的测试框架是使用RSpec语法的rWebUnitQ是qؓ(f)行的Watir的一Ƒּ源插Ӟ(j)。iTest2背后的哲学是Q容易、简单。试用显C:(x)没有~程l验的测试h员在指导下,q_只需要少?0分钟的时间就能编写他们第一个自动化试?
本。借助于iTest2Q测试h员可以开发、维护和验证功能需求的试脚本Q开发h员可以验证特性可用;业务分析?客户通过查看试q行l果Q在真实?
览器下Q比如IE或者FirefoxQ来验证功能需求。由iTest2创徏的测试脚本可以从命o(h)行运行,也能集成在持l构建服务器上?br />
感觉selenium不如watiJ好用Qؓ(f)什么要单启一个服务器?br />selenium和W(xu)ebDriver有何关系

]]> - spring2.5与junit整合的笔?/title>http://www.aygfsteel.com/leekiang/archive/2009/01/04/249776.htmlleekiangleekiangSun, 04 Jan 2009 10:13:00 GMThttp://www.aygfsteel.com/leekiang/archive/2009/01/04/249776.htmlhttp://www.aygfsteel.com/leekiang/comments/249776.htmlhttp://www.aygfsteel.com/leekiang/archive/2009/01/04/249776.html#Feedback0http://www.aygfsteel.com/leekiang/comments/commentRss/249776.htmlhttp://www.aygfsteel.com/leekiang/services/trackbacks/249776.html2,@ContextConfiguration(locations = { "classpath:applicationContext-sys.xml",
(tng) (tng) (tng) (tng) (tng) (tng)"classpath:applicationContext.xml" })
public class BaseTests extends AbstractTransactionalJUnit38SpringContextTests {
}
所有的TestCase都承上面这个类Q得spring配置文g重用Q同时ApplicationContext也是同一个?br />
3,要测试的servicec通过@Autowired注入Q例?br /> (tng) (tng) (tng) @Autowired
(tng) (tng) (tng)private UserDAO (tng) userDAO;
(tng) (tng) (tng)
4Q注意,对于l承?jin)BaseTests的测试类里的每一个testҎ(gu)Q运行测试时都会(x)?br /> (tng) (tng) setUp()-->testҎ(gu)-->tearDown()的顺序执行,而且q?个组成一个事务,执行完后默认?x)回滚?br /> (tng) (tng) 如果不想回滚Q在cd前面@TransactionConfiguration(defaultRollback = false)
(tng) (tng)
5Q因是用的junit3.8,故TestSuite的写法照?br /> (tng) public class SuiteTests {
(tng) (tng) (tng)public static Test suite() {
(tng) (tng) (tng) (tng) (tng) (tng)TestSuite suite = new TestSuite("q行所有测?);
(tng) (tng) (tng) (tng) (tng) (tng)suite.addTestSuite(UserServiceTests.class);
(tng) (tng) (tng) (tng) (tng) (tng)suite.addTestSuite(RoleServiceTests.class);
(tng) (tng) (tng) (tng) (tng) (tng)return suite;
(tng) (tng) (tng)}
}
6Q测试类q没有当作bean配置在application.xml文g中,
(tng) (tng) spring试框架是如何"setUp()-->testҎ(gu)-->tearDown()"处于同一个事务的呢?
(tng) (tng) 具体p看AbstractTransactionalJUnit38SpringContextTests?jin),是通过注解实现的?br /> (tng) (tng) serviceҎ(gu)在testҎ(gu)里面Q这两个Ҏ(gu)都配|有事务Q即形成?jin)事务的嵌套Q这里有点复杂了(jin)Q我q没x(chng)楚?br /> (tng) (tng) 不过可以肯定的是Q如果testҎ(gu)的事务不提交Q那么serviceҎ(gu)的事务也不会(x)提交?br /> (tng) (tng)
7Q如果想在jdk1.4下重用ApplicationContextQ可采用以下的办法,出处再补上。这个办法与前面的进行比较,
(tng) (tng) 我觉得最大的区别是这U写法要手动q行试数据的清除?br />public class BaseTestCase extends TestCase {
(tng) (tng) (tng) static ApplicationContext context = null;
(tng) (tng) (tng)static {
(tng) (tng) (tng) (tng) (tng) (tng)// perform the "global" set up logic
(tng) (tng) (tng) (tng) (tng) (tng)// q里的代码会(x)在类初始化时执行Q所以相当于BeforeClass
(tng) (tng) (tng) (tng) (tng) (tng)String[] CONFIG_FILES_MIN = { "applicationContext-sys.xml",
(tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng)"applicationContext.xml" };
(tng) (tng) (tng) (tng) (tng) (tng)context = new ClassPathXmlApplicationContext(CONFIG_FILES_MIN);
(tng) (tng) (tng) (tng) (tng) (tng)System.out.println("setup");
(tng) (tng) (tng) (tng) (tng) (tng)// and now register the shutdown hook for tear down logic
(tng) (tng) (tng) (tng) (tng) (tng)// 一个匿名方法写到这里,q当于AfterClass
(tng) (tng) (tng) (tng) (tng) (tng)Runtime.getRuntime().addShutdownHook(new Thread() {
(tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng)public void run() {
(tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng)System.out.println("shutdown");
(tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng)}
(tng) (tng) (tng) (tng) (tng) (tng)});
(tng) (tng) (tng)}
(tng) (tng) (tng)protected void setUp() throws Exception {
(tng) (tng) (tng)}
}
8Q如果用junit-4.jarQ去官网下蝲junit4.4.jar。不要采用myeclipse自带的junit4.jarQ因个不带JUnit4ClassRunnercR?br /> (tng) (tng) 另外不要用junit-4.5.jar,据说与spring2.5有冲H,
(tng) (tng) 详见Spring Test Context Framework not compatible with JUnit 4.5Qhttp://jira.springframework.org/browse/SPR-5145
9QString htmlContent = "<html><head></head><body>html content</body></html>";
String plainContent = "plain content";
MockMultipartHttpServletRequest req = new MockMultipartHttpServletRequest();
req.setContentType("multipart/form-data");
//req.addHeader("Content-type", "multipart/form-data");//q样写应该是一L(fng)
req.setMethod("POST");
req.addFile( new MockMultipartFile("file","test1.html","text/html", htmlContent.getBytes( "US-ASCII" ) ) );
req.addFile( new MockMultipartFile("file","test2.html","text/html", htmlContent.getBytes( "US-ASCII" ) ) );
req.addFile( new MockMultipartFile("file","test.txt", "text/plain",plainContent.getBytes( "US-ASCII" ) ) );
assertTrue( ServletFileUpload.isMultipartContent( req ) );
int content_length = req.getContentLength();
10QAbstractTransactionalJUnit38SpringContextTests
(tng) (tng) (tng) AbstractTransactionalSpringContextTests
(tng) (tng) (tng) AbstractTransactionalDataSourceSpringContextTests
的区?
11,MockHttpServletRequest的addParameterҎ(gu)和setParameter的区?br />
参?
详细讲解在Spring中进行集成测?/a>
http://www.javaeye.com/topic/68185
http://www.google.cn/codesearch/p?hl=zh-CN#Vq-IOboH1tI/trunk/test/es/peerreview/service/TestPeerReviewSpring.java
用Spring提供的JUnit框架扩展对DAO或Service层进行单元测?/a>
http://code.google.com/p/anewssystem/source/browse/trunk/anewssystem/parent/core/src/main/java/anni/core/test/?r=105
http://docs.huihoo.com/spring/2.5.x/zh-cn/testing.html
http://arkxu.javaeye.com/blog/261679
http://www.ibm.com/developerworks/cn/java/j-cb06066.html
http://www.ibm.com/developerworks/cn/java/j-lo-spring25-test/
Zmock对象和JUnit框架化Spring Weblg单元试
http://www.aygfsteel.com/calvin/archive/2005/09/21/13628.html
http://www.yybean.com/testing-framework-to-use-spring-integration-testing

]]> - 单元试W记http://www.aygfsteel.com/leekiang/archive/2008/12/24/247991.htmlleekiangleekiangTue, 23 Dec 2008 16:31:00 GMThttp://www.aygfsteel.com/leekiang/archive/2008/12/24/247991.htmlhttp://www.aygfsteel.com/leekiang/comments/247991.htmlhttp://www.aygfsteel.com/leekiang/archive/2008/12/24/247991.html#Feedback0http://www.aygfsteel.com/leekiang/comments/commentRss/247991.htmlhttp://www.aygfsteel.com/leekiang/services/trackbacks/247991.htmlhttp://lyx.javaeye.com/blog/57037
2Q?a href="/iamtin/archive/2006/11/17/81802.html">在JUnit中多个testCase只执行一ơsetup和tearDown的方?/a>
3,SoapUI当选最?jng)_源Web Services试工具
4,通过Spring2.5对单元测试的Annotation支持q行TDD开?/a>
5,sventon用于svn代码的在U浏览,其单元测试代码很规整?br />http://svn.sventon.org/repos/berlios/show/trunk/sventon/src/test/java/org/sventon/web/ctrl/template/GetFileControllerTest.java
6Qmockitog比easymock好用

]]> - 什么是TPShttp://www.aygfsteel.com/leekiang/archive/2008/10/21/235652.htmlleekiangleekiangTue, 21 Oct 2008 05:55:00 GMThttp://www.aygfsteel.com/leekiang/archive/2008/10/21/235652.htmlhttp://www.aygfsteel.com/leekiang/comments/235652.htmlhttp://www.aygfsteel.com/leekiang/archive/2008/10/21/235652.html#Feedback0http://www.aygfsteel.com/leekiang/comments/commentRss/235652.htmlhttp://www.aygfsteel.com/leekiang/services/trackbacks/235652.html
]]>
վ֩ģ壺
Ϫ|
|
|
Ĵʡ|
|
|
|
|
|
|
Ұ|
|
|
̨|
|
Ԫ|
Ȫ|
|
̩˳|
ɽ|
|
ֳ|
|
ٳ|
|
|
|
ӻ|
|
ͨ|
ƽ|
Ȫ|
|
Ұ|
«ɽ|
ͨ|
|
ν|
齭|
|
|