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窗口中被区分并被测试.划分的很详细,有专门的测试页面的方法
分享到:
相关推荐
playframework学习资料 play学习资料
play framework api,play! framework api,play api
Play Framework Cookbook.pdf
play framework的一些学习总结,基本概念理解,常用的学习方法等。
1. Play Framework 介绍 2. 创建和发布 Play 应用 2.1 创建 Play 的工程 2.2 Play 常用指令 2.3 Play 应用的 JVM 调优 3. 如何读取静态资源 4. Play框架的配置文件 5. 使用 Play 框架开发 Java 应用 5.1 HTTP...
playframework javaweb playframework javaweb
NULL 博文链接:https://vb2005xu.iteye.com/blog/795607
Play Framework最新教程(12年),play框架教程
Playframework 1.2.7 sdk zip包
Mastering Play Framework for Scala
play framework2.01上半部分。
Play framework框架
PlayFramework框架验证.pdf
一个最初的play框架的程序,为的是让大家了解play框架的结构。
Play Framework Essentials 英文原版,学习 play 框架的最佳入门。
Play Framework Cookbook
通过简单的代码和思路写了play framework的简单的小例子,包括添加页面进行的routes配置,页面跳转,页面之间的数据传递等方面。暂时未使用h2内置数据库及ArrayList、HashMap在页面之间的数据传递。
Selenium test用例测试 - 107 - Fixtures固定值 - 108 - 运行测试 - 110 - 陆续集成,并自动运行测试 - 111 - 16.安全指南 - 112 - Sessions - 112 - 守住你的安全…安全 - 112 - 不要存储关键性的数据 - 112 - 跨...
Leverage the awesome features of Play Framework to build scalable, resilient, and responsive applications First published: May 2015 274page
PlayFramework框架安全模块.pdf