I'm using NB JUnit with JUnit 4, Jelly Tools, and Jemmy.
我正在使用NB JUnit和JUnit 4,Jelly Tools和Jemmy。
I have a pretty standard setup in the suite() function, following the tutorials provided.
我在套件()函数中有一个非常标准的设置,遵循提供的教程。
public static Test suite() {
// run tests with specific configuration
NbModuleSuite.Configuration conf =
NbModuleSuite.createConfiguration(Tester.class).
clusters(".*").
enableModules(".*");
conf = conf.addTest("test1", "test2", "test3");
return NbModuleSuite.create(conf);
}
(see http://platform.netbeans.org/tutorials/nbm-test.html if you want more details on the tutorial I mentioned)
(如果您想了解我提到的教程的更多详细信息,请参阅http://platform.netbeans.org/tutorials/nbm-test.html)
What seems to be happening is, around the 6 minute mark, no matter what the tester should be doing, it closes the NetBeans window.
似乎正在发生的事情是,大约6分钟标记,无论测试人员应该做什么,它都会关闭NetBeans窗口。
Right before it closes, the tester skips ahead to try and cram in all the tests it has yet to finish.
在它关闭之前,测试人员跳过前面试图填写它尚未完成的所有测试。
In my case, I am calling
就我而言,我在打电话
new Timeout("pausing", 1000).sleep();
in a while loop, which waits for a certain function call to return true. But, around 5:30 into the test, the tester moves on from this function, finishes the other tests, and closes the window.
在while循环中,等待某个函数调用返回true。但是,在大约5:30进入测试时,测试人员继续执行此功能,完成其他测试,并关闭窗口。
I'm unsure if there are time limits for each individual test, or if there is a timeout for the tester altogether. But, I do notice that if I add another test or two with a long pause or enough random clicks and button pushes to last a few minutes, the tester still closes right around 6 minutes. The time is never exactly the same, but it ranges right around there.
我不确定每个测试是否有时间限制,或者测试仪是否完全超时。但是,我注意到如果我添加一个或两个长时间停顿或足够的随机点击和按钮按下持续几分钟的测试,测试仪仍然会在大约6分钟后关闭。时间永远不会完全相同,但它的范围就在那里。
I've tried a few different ways of pausing the tester, with no luck. And I can't find anything to help online as these are not heavily publicized. Suggestions?
我尝试了几种不同的暂停测试仪的方法,没有运气。我找不到任何在线帮助,因为这些都没有大量宣传。建议?
1 个解决方案
#1
0
By default the timeout period should be set to 0L (http://junit.sourceforge.net/javadoc/org/junit/Test.html#timeout()) maybe try to change the timeout parameter to a very huge value.
默认情况下,超时时间应设置为0L(http://junit.sourceforge.net/javadoc/org/junit/Test.html#timeout())可能会尝试将超时参数更改为非常大的值。
http://forums.netbeans.org/post-31002.html&highlight=
it looks like you can set the timeout in your Per-user Project Properties (private.properties) or project.properties file by setting
看起来您可以通过设置在每用户项目属性(private.properties)或project.properties文件中设置超时
test.timeout=3600000
Hope that helps!
希望有所帮助!
#1
0
By default the timeout period should be set to 0L (http://junit.sourceforge.net/javadoc/org/junit/Test.html#timeout()) maybe try to change the timeout parameter to a very huge value.
默认情况下,超时时间应设置为0L(http://junit.sourceforge.net/javadoc/org/junit/Test.html#timeout())可能会尝试将超时参数更改为非常大的值。
http://forums.netbeans.org/post-31002.html&highlight=
it looks like you can set the timeout in your Per-user Project Properties (private.properties) or project.properties file by setting
看起来您可以通过设置在每用户项目属性(private.properties)或project.properties文件中设置超时
test.timeout=3600000
Hope that helps!
希望有所帮助!