KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > remoting > performance > standard > StandardInvocationTestCase


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.remoting.performance.standard;
8
9 import junit.framework.Test;
10 import junit.framework.TestSuite;
11 import junit.textui.TestRunner;
12 import org.apache.log4j.Level;
13 import org.jboss.remoting.performance.PerformanceInvokerServer;
14 import org.jboss.remoting.performance.PerformanceTest;
15
16 /**
17  * This should be used as the main test case for the oneway invoker client/server.
18  * It will start one instance of the client and one of the server and will
19  * gather the test results and report them in standard JUnit format. When
20  * wanting to run JUnit test for oneway invoker, this is the class to use.
21  *
22  * @author <a HREF="mailto:telrod@e2technologies.net">Tom Elrod</a>
23  */

24 public class StandardInvocationTestCase extends PerformanceTest
25 {
26    public StandardInvocationTestCase(String JavaDoc name)
27    {
28       super(name);
29    }
30
31    public String JavaDoc getClientFQN()
32    {
33       return StandardTest.class.getName();
34    }
35
36    public String JavaDoc getServerFQN()
37    {
38       return PerformanceInvokerServer.class.getName();
39    }
40
41    public static Test suite()
42    {
43       return new TestSuite(StandardInvocationTestCase.class);
44    }
45
46    public static void main(String JavaDoc[] args)
47    {
48       org.apache.log4j.BasicConfigurator.configure();
49       org.apache.log4j.Category.getRoot().setLevel(Level.INFO);
50       org.apache.log4j.Category.getInstance("org.jgroups").setLevel(Level.INFO);
51       org.apache.log4j.Category.getInstance("org.jboss.remoting").setLevel(Level.DEBUG);
52       org.apache.log4j.Category.getInstance("test").setLevel(Level.DEBUG);
53
54       TestRunner.run(suite());
55       System.exit(0);
56    }
57
58
59 }
Popular Tags