Pergunta

I'm using NB JUnit with JUnit 4, Jelly Tools, and 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)

What seems to be happening is, around the 6 minute mark, no matter what the tester should be doing, it closes the NetBeans window.

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.

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.

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?

Foi útil?

Solução

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.

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

test.timeout=3600000 

Hope that helps!

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top