Play 2.0不会运行所有测试 [英] Play 2.0 doesn't run all tests

查看:83
本文介绍了Play 2.0不会运行所有测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将应用程序移植到Play 2.0上,由于某种原因,它没有运行所有测试.它找到所有测试类.但是在大多数测试中都没有进行任何测试.我尝试将这些类移到tests目录的底部,但这没什么不同.

I'm porting an application over to Play 2.0 and for some reason it's not running all the tests. It finds all the test classes. But just doesn't run any tests in most of them. I tried moving the classes to the base of tests directory, but that didn't make a difference.

未运行的测试包含使用休眠JPA进行持久性测试.这些类具有用于管理跨测试的数据库状态的通用基类.

The tests it doesn't run contain tests for the persistence using hibernate JPA. The classes have a common base class for managing the database state across tests.

我期望持久性测试会引人注目,但是对,我只是获得了绿灯,因为它没有在其中进行任何测试.

I'm expecting the persistence tests to blow up spectacularly but right I just get a green light because it doesn't run any of the tests in them.

推荐答案

我会自己回答,以防别人绊倒.

I'll answer my own in case someone else trips in to this.

如果设置步骤失败,例如@BeforeClass注释方法抛出异常,则Play将在0个测试中将0个报告为测试用例.

If you have a failing setup step, say @BeforeClass annotated method throws an exception, then Play will report the test case as 0 out of 0 tests run.

这篇关于Play 2.0不会运行所有测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆