Source Code Cross Referenced for LoadTests.java in  » Workflow-Engines » wfmopen-2.1.1 » load » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Workflow Engines » wfmopen 2.1.1 » load 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * This file is part of the WfMOpen project.
003:         * Copyright (C) 2001-2003 Danet GmbH (www.danet.de), GS-AN.
004:         * All rights reserved.
005:         *
006:         * This program is free software; you can redistribute it and/or modify
007:         * it under the terms of the GNU General Public License as published by
008:         * the Free Software Foundation; either version 2 of the License, or
009:         * (at your option) any later version.
010:         *
011:         * This program is distributed in the hope that it will be useful,
012:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
013:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
014:         * GNU General Public License for more details.
015:         *
016:         * You should have received a copy of the GNU General Public License
017:         * along with this program; if not, write to the Free Software
018:         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
019:         *
020:         * $Id: LoadTests.java,v 1.2 2006/09/29 12:32:07 drmlipp Exp $
021:         *
022:         * $Log: LoadTests.java,v $
023:         * Revision 1.2  2006/09/29 12:32:07  drmlipp
024:         * Consistently using WfMOpen as projct name now.
025:         *
026:         * Revision 1.1.1.1  2003/12/19 13:01:46  drmlipp
027:         * Updated to 1.1rc1
028:         *
029:         * Revision 1.5  2003/11/24 16:19:11  weidauer
030:         * added debug output
031:         *
032:         * Revision 1.4  2003/10/30 16:22:51  weidauer
033:         * added cleaning suite
034:         *
035:         * Revision 1.3  2003/10/28 14:53:06  barzik
036:         * *** empty log message ***
037:         *
038:         * Revision 1.2  2003/10/28 11:39:36  barzik
039:         * *** empty log message ***
040:         *
041:         * Revision 1.1  2003/10/28 07:54:05  barzik
042:         * *** empty log message ***
043:         *
044:         */
045:        package load;
046:
047:        import java.util.HashMap;
048:        import java.util.Map;
049:
050:        import javax.security.auth.login.LoginException;
051:
052:        import de.danet.an.util.junit.EJBClientTest;
053:        import de.danet.an.util.junit.NamedTestGroup;
054:
055:        import com.clarkware.junitperf.ConstantTimer;
056:        import com.clarkware.junitperf.LoadTest;
057:        import common.STProjectLoginContext;
058:        import junit.framework.Test;
059:        import junit.framework.TestCase;
060:        import junit.framework.TestSuite;
061:
062:        /**
063:         * This class provides 
064:         *
065:         * @author <a href="mailto:barzik@danet.de">Horst-Günther Barzik</a>
066:         * @version $Revision: 1.2 $
067:         */
068:
069:        public class LoadTests extends TestCase {
070:
071:            private static STProjectLoginContext plc = null;
072:            static {
073:                try {
074:                    plc = new STProjectLoginContext();
075:                    plc.login();
076:                } catch (LoginException e) {
077:                    throw new IllegalStateException(e.getMessage());
078:                }
079:            }
080:
081:            /**
082:             * Creates an instance of <code>LoadRuns</code>
083:             * with all attributes initialized to default values.
084:             * @param name the test suite name
085:             */
086:            public LoadTests(String name) {
087:                super (name);
088:            }
089:
090:            /**
091:             * Make this test suite.
092:             * @return the test suite
093:             */
094:            public static Test suite() {
095:
096:                // create the root test suite
097:                TestSuite rootSuite = new TestSuite();
098:                Map tg = new HashMap();
099:
100:                // prepare the environment
101:                TestSuite suite = new TestSuite();
102:                suite.addTest(new GenericTest("prepareForCreateProcess",
103:                        "A5T4seqCnNoImpl"));
104:                suite.addTest(new GenericTest("prepareForCreateProcess",
105:                        "A5T4parCnNoImpl"));
106:                suite.addTest(new GenericTest("prepareForCreateProcess",
107:                        "A5T6comCnNoImpl"));
108:                suite.addTest(new GenericTest("prepareForCreateProcess",
109:                        "A5T6comCyNoImpl"));
110:                suite.addTest(new GenericTest("prepareForCreateProcess",
111:                        "A10T9seqCnNoImpl"));
112:                suite.addTest(new GenericTest("prepareForCreateProcess",
113:                        "A5T4seqCnEmptyScript"));
114:                suite.addTest(new GenericTest("prepareForCreateProcess",
115:                        "A5T4seqCnSleepScript"));
116:                //suite.addTest(new GenericTest("prepareForCreateProcess", 
117:                //			      "A5T4seqCnSleepTool"));
118:
119:                /* Examine the performance for creating a process depending on 
120:                   the number of activities and transitions a process contains */
121:
122:                addTest(suite, "5 activities", new GenericTest("createProcess",
123:                        "A5T4seqCnNoImpl"));
124:
125:                addTest(suite, "10 activities", new GenericTest(
126:                        "createProcess", "A10T9seqCnNoImpl"));
127:
128:                tg.put("title",
129:                        "Create processes with variable number of activities");
130:                rootSuite.addTest(new NamedTestGroup(suite, "TestGroup", tg));
131:
132:                /* Examine the performance for creating and starting a process 
133:                depending on its structure */
134:
135:                suite = new TestSuite();
136:
137:                addTest(suite, "seriell(A5,T4)", new GenericTest(
138:                        "createAndStartProcess", "A5T4seqCnNoImpl"));
139:
140:                addTest(suite, "paralell(A5,T4)", new GenericTest(
141:                        "createAndStartProcess", "A5T4parCnNoImpl"));
142:
143:                addTest(suite, "complex(A5,T6)", new GenericTest(
144:                        "createAndStartProcess", "A5T6comCnNoImpl"));
145:
146:                tg.put("title",
147:                        "Create and start processes of different structure");
148:                rootSuite.addTest(new NamedTestGroup(suite, "TestGroup", tg));
149:
150:                /* examine the performance for creating and starting a process 
151:                   depending on the type of conditions */
152:
153:                suite = new TestSuite();
154:
155:                addTest(suite, "no conditions", new GenericTest(
156:                        "createAndStartProcess", "A5T6comCnNoImpl"));
157:                addTest(suite, "f1 == '1' &amp;&amp; f2=='2'", new GenericTest(
158:                        "createAndStartProcess", "A5T6comCyNoImpl"));
159:
160:                tg.put("title",
161:                        "Create and start Processes with different types of "
162:                                + "(un)conditional transitions");
163:                rootSuite.addTest(new NamedTestGroup(suite, "TestGroup", tg));
164:
165:                /* Examine the performance for creating and starting a process 
166:                   depending on a tool in use */
167:
168:                suite = new TestSuite();
169:
170:                addTest(suite, "no implementation", new GenericTest(
171:                        "createAndStartProcess", "A5T4seqCnNoImpl"));
172:                addTest(suite, "empty script", new GenericTest(
173:                        "createAndStartProcess", "A5T4seqCnEmptyScript"));
174:                addTest(suite, "sleep script", new GenericTest(
175:                        "createAndStartProcess", "A5T4seqCnSleepScript"));
176:
177:                //addTest(suite, "sleep tool", 
178:                //        new GenericTest("createAndStartProcess", 
179:                //                        "A5T4seqCnSleepTool"));
180:
181:                tg.put("title",
182:                        "Create and start Processes with different tools assigned "
183:                                + "to activities");
184:                rootSuite.addTest(new NamedTestGroup(suite, "TestGroup", tg));
185:
186:                /* Examine the performance for creating and starting a process 
187:                   depending on ... */
188:
189:                //suite = new TestSuite ();
190:                //addTest(suite, "wait tool", 
191:                //        new GenericTest("createAndStartProcess", 
192:                //                        "A4T5seqCnWaitTool"));
193:                //
194:                //tg.put ("title", "<insert here description>");
195:                //rootSuite.addTest (new NamedTestGroup (suite, "TestGroup", tg));
196:                return new EJBClientTest(plc, rootSuite);
197:            }
198:
199:            private static void addTest(TestSuite parentSuite, String title,
200:                    Test testCase) {
201:                TestSuite suite = new TestSuite();
202:                Map sas = new HashMap();
203:                sas.put("users", "1");
204:                suite.addTest(new NamedTestGroup(new LoadTest(testCase, 1, 20,
205:                        new ConstantTimer(10)), "Samples", sas));
206:                suite.addTest(GenericTest.cleaningSuite());
207:
208:                sas.put("users", "2");
209:                suite.addTest(new NamedTestGroup(new LoadTest(testCase, 2, 10,
210:                        new ConstantTimer(10)), "Samples", sas));
211:                suite.addTest(GenericTest.cleaningSuite());
212:
213:                sas.put("users", "4");
214:                suite.addTest(new NamedTestGroup(new LoadTest(testCase, 4, 5,
215:                        new ConstantTimer(10)), "Samples", sas));
216:                suite.addTest(GenericTest.cleaningSuite());
217:
218:                sas.put("users", "5");
219:                suite.addTest(new NamedTestGroup(new LoadTest(testCase, 5, 4,
220:                        new ConstantTimer(10)), "Samples", sas));
221:                suite.addTest(GenericTest.cleaningSuite());
222:
223:                sas.put("users", "10");
224:                suite.addTest(new NamedTestGroup(new LoadTest(testCase, 10, 2,
225:                        new ConstantTimer(10)), "Samples", sas));
226:                suite.addTest(GenericTest.cleaningSuite());
227:
228:                Map tt = new HashMap();
229:                tt.put("title", title);
230:                parentSuite.addTest(new NamedTestGroup(suite, "Test", tt));
231:            }
232:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.