play framework学习笔记之测试test
来源:互联网 发布:webstorm mac 汉化 编辑:程序博客网 时间:2024/04/28 08:12
play test hy3 测试运行模式命令
http://localhost:9000/@tests 访问地址
在测试包下创建测试类,测试方法上加@Test的annotation
play的测试分三种
//功能性测试
public class ApplicationTest extends FunctionalTest {
@Test
public void testThatIndexPageWorks() {
Response response = GET("/");
assertIsOk(response);
assertContentType("text/html", response);
assertCharset("utf-8", response);
}
}
//普通的单元测试
public class BasicTest extends UnitTest {
@Test
public void aVeryImportantThingToTest() {
assertEquals(2, 1 + 1);
}
}
//selenium测试 是以html文件的形式
Application.test.html
*{ You can use plain selenium command using the selenium tag }*
#{selenium}
// Open the home page, and check that no error occured
open('/')
assertNotTitle('Application error')
#{/selenium}
以上的三种测试都会在 test模式下http://localhost:9000/@tests窗口中被区分并被测试.划分的很详细,有专门的测试页面的方法
- play framework学习笔记之测试test
- play framework学习笔记之 framework ID
- play framework学习笔记之yml
- play framework学习笔记之 数据库
- play framework学习笔记之 模板引擎
- play framework学习笔记之 部署项目
- play framework学习笔记之 jobs
- play framework学习笔记之play tags页面模板
- play framework学习笔记
- Play框架功能测试 (functional test in play framework)
- Play框架功能测试 (functional test in play framework)
- Play!Framework学习笔记:初识Play
- play framework学习笔记之模型域model
- play framework学习笔记之 conf/routes file 路径配置文件
- play framework学习笔记之 发送 e-mail
- play framework学习笔记之 Security Guide 安全机制
- play framework学习笔记之 ajax集成使用
- play framework学习笔记之 身份识别,openID
- 技术分类目录
- media player 控件 支持视频格式
- 平台分类目录
- struts2
- vsftpd configuration
- play framework学习笔记之测试test
- 功能分类目录
- 区位码,国标码,内码
- 自己动手做柚子茶
- linux 下千兆网卡驱动开发 RGMII (二)
- oracle中表空间与数据文件编号的连续性
- 2011.3.26
- 【分布式数据库】数据库的连接与访问
- instanceof java