jwebunit playframework功能测试卡住
我使用 play-framework 应用程序,并打算使用 JWEBUNIT 进行功能测试。 有一篇文章证明我可以这样使用:
http://nesbot.com/2011/10/16/play-framework-sample-app-JWebUnit-synchronous-ajax
一切都很好,但我的第一次测试有问题,它在尝试时卡住了到调用它 - 并且没有任何响应。
他卡住的代码是(我使用与上面那篇文章中相同的代码):
@Test
public void testIndexRendersSuccessfully()
{
wt.beginAt(getRoute("Application.index"));
wt.assertElementPresent("createEvent");
assertEquals(wt.getElementById("error").getTextContent(), "");
assertEquals(wt.getElementById("success").getTextContent(), "");
}
我对 jwebunit 的依赖关系是这样的:
require:
- play
- net.sourceforge.jwebunit -> jwebunit-core 3.0
- net.sourceforge.jwebunit -> jwebunit-htmlunit-plugin 3.0
您有这方面的经验或已经遇到过这样的问题吗?
I use play-framework application, and going to use JWEBUNIT for functional testings.
There is a article that proved me to use that way:
http://nesbot.com/2011/10/16/play-framework-sample-app-JWebUnit-synchronous-ajax
Everything fine, but I have a problem with my first test, it just stuck while try to invoke it - and no any response form it.
The code where he stuck is (I use the same pieces of code like in that Article above):
@Test
public void testIndexRendersSuccessfully()
{
wt.beginAt(getRoute("Application.index"));
wt.assertElementPresent("createEvent");
assertEquals(wt.getElementById("error").getTextContent(), "");
assertEquals(wt.getElementById("success").getTextContent(), "");
}
My dependencies for jwebunit are like this:
require:
- play
- net.sourceforge.jwebunit -> jwebunit-core 3.0
- net.sourceforge.jwebunit -> jwebunit-htmlunit-plugin 3.0
Do you have experiences with that or already had such problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我找到了答案,抱歉我不喜欢读完文章。
我只需要将其放入conf
%test.play.pool=2
I found the answer,sorry I do not like read article right to the end.
I just need to put this to conf
%test.play.pool=2