Test Suite

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Test Suite

Chris F.
Hi, I'm trying to create Test Suites so that I can run one script that will execute multiple tests, much like you would if you were building a JUnit test suite.  I want to be able to schedule this one test suite and have it run the tests I have listed in it.  The problem I am having is that the suite will only return the last test added to the suite and the other tests.  The error being thrown for the unrooted tests is this

net.grinder.script.InvalidContextException: Statistics interface is only supported for worker threads.
        at net.grinder.engine.process.ScriptStatisticsImplementation.getThreadContext(ScriptStatisticsImplementation.java:70)
        at net.grinder.engine.process.ScriptStatisticsImplementation.setDelayReports(ScriptStatisticsImplementation.java:58)

The code I am using is this:

                public static Test suite() throws Exception {
                       
                        TestSuite suite = new TestSuite();
                        GroovyTestSuite gsuite = new GroovyTestSuite();

                        suite.addTest(new JUnit4TestAdapter(gsuite.compile(TEST_ROOT + "TestClassRoomMonitor.groovy")))
                        suite.addTest(new JUnit4TestAdapter(gsuite.compile(TEST_ROOT + "TestWalkInScheduler.groovy")))
       
                        suite.addTest(new JUnit4TestAdapter(gsuite.compile(TEST_ROOT + "TestAddressQuickSearch.groovy")))

return suite
}

I suppose none of this would be necessary if there was a method to schedule a test as a repeating entity (IE: This test runs once a day at xyz time).  As it is I have close to 200 tests that I need to run daily and I am having to schedule them all every day and the library keeps growing.  

Another solution would be if there was a way I could access the nGrinder database and programatically schedule the tests.  If either of these solutions exist and I've been unable to find them, I'd be very thankful if you could point me in the right direction.

Thanks,
Chris

Reply | Threaded
Open this post in threaded view
|

Re: Test Suite

junoyoon
Administrator
I though the feature you requested is necessary in the future as well.
I activated jira issue on your request. http://jira.cubrid.org/browse/NGRINDER-665

Some code are already fixed and I found it's working now..
With elaborating some exception handling logic for it, I'll release 3.2.3 this in 2 week.
Reply | Threaded
Open this post in threaded view
|

Re: Test Suite

kpiwko
This would be an awesome addition to ngrinder project. Ability to control controller in automated manner rocks.
Reply | Threaded
Open this post in threaded view
|

Re: Test Suite

Chetan
Do we have any Wiki/Blog or Sample code related to this post (handling performance test as automation, from script)?