Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/unit-testing/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Unit testing 使用TestsFailedException播放框架测试失败_Unit Testing_Playframework_Playframework 2.0 - Fatal编程技术网

Unit testing 使用TestsFailedException播放框架测试失败

Unit testing 使用TestsFailedException播放框架测试失败,unit-testing,playframework,playframework-2.0,Unit Testing,Playframework,Playframework 2.0,我正在使用PlayFrameworkActivator,我的测试主要是运行内存数据库(EBeanORM)中的假应用程序 测试失败一次至5次,附带错误,无法解释原因和具体测试名称。 有人熟悉这个问题吗 失败的测试用例: public class ApplicationTest { @Test public void renderTemplate() { Content html = views.html.index.render("Your new appli

我正在使用PlayFrameworkActivator,我的测试主要是运行内存数据库(EBeanORM)中的假应用程序

测试失败一次至5次,附带错误,无法解释原因和具体测试名称。 有人熟悉这个问题吗

失败的测试用例:

public class ApplicationTest {
    @Test
    public void renderTemplate() { 
        Content html = views.html.index.render("Your new application is ready.");
        assertEquals("text/html", contentType(html));
        assertTrue(contentAsString(html).contains("Your new application is ready."));
    }
}

如果没有相关的代码/测试,这个问题是无法解决的。这是模板中给出的唯一测试。我注释掉了所有其他测试。请看我添加了另一个屏幕截图。一次常规测试。有时失败,有时成功。