Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • I added some simple load testing capability to Josh's Test Harness
  • You have to apply the following test-harness.diff patch
    • Attachments
      oldfalse
      patterns.*diff
  • Examples:
    • Code Block
      
      	public void testGetCoursesByTerm() throws Exception {
      		
      		// Unit test
      		List courseList = null;
      		courseList = courseManagementManager.getCoursesByTerm("2006","01");
      		Assert.assertNotNull(courseList);
      		
      		// Load Test
      		SakaiTestMethodInvoker testMethodInvoker = new SakaiTestMethodInvoker();
      		testMethodInvoker.runOnce(courseManagementManager,
      					   "getCoursesByTerm",
      					    new Object[] {"2006","01"}, 
      					    new Class[] {String.class, String.class});
      		
      		testMethodInvoker.runMultipleTimes(courseManagementManager,
      						   "getCoursesByTerm",
      						    new Object[] {"2006","01"}, 
      						    new Class[] {String.class, String.class},
      						    10);
      		
      		testMethodInvoker.runThreadedOnce(courseManagementManager,
      						  "getCoursesByTerm",
      						   new Object[] {"2006","01"}, 
      						   new Class[] {String.class, String.class},
      						   5);
      		
      		testMethodInvoker.runThreadedMultipleTimes(courseManagementManager,
      							   "getCoursesByTerm",
      							    new Object[] {"2006","01"}, 
      							    new Class[] {String.class, String.class}, 10, 5);
      	}