org.stjs.testing.driver
Class MultiTestMethod

java.lang.Object
  extended by org.stjs.testing.driver.MultiTestMethod

public class MultiTestMethod
extends Object

Coordinates the execution of one unit test across several browsers. The JUnit runner creates one instance of this class for each unit test, specifying how many browsers are expected to execute this test. The JUnit runner then sends this test to all browsers and waits for all browsers to return the execution results by calling awaitExecutionresult(). When a browser has finished executing a test, notifiyExecutionResult() is called.

Author:
lordofthepigs

Constructor Summary
MultiTestMethod(org.junit.runners.model.TestClass testClass, org.junit.runners.model.FrameworkMethod meth, int nBrowsers)
          Creates a new MultiTestMethod that reprents the specified unit test of the specified class, executed on the specified number of browsers.
 
Method Summary
 TestResultCollection awaitExecutionResult()
          Blocks until all browsers have called notifyExecutionResult() and returns a TestResultCollection containing all the results from all the browsers.
 org.junit.runners.model.FrameworkMethod getMethod()
           
 org.junit.runners.model.TestClass getTestClass()
           
 void notifyExecutionResult(TestResult result)
          Called by the browsers when they have finished executing their unit test.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MultiTestMethod

public MultiTestMethod(org.junit.runners.model.TestClass testClass,
                       org.junit.runners.model.FrameworkMethod meth,
                       int nBrowsers)
Creates a new MultiTestMethod that reprents the specified unit test of the specified class, executed on the specified number of browsers.

Parameters:
nBrowsers -
Method Detail

notifyExecutionResult

public void notifyExecutionResult(TestResult result)
Called by the browsers when they have finished executing their unit test. This method is non-blocking.


awaitExecutionResult

public TestResultCollection awaitExecutionResult()
Blocks until all browsers have called notifyExecutionResult() and returns a TestResultCollection containing all the results from all the browsers.


getMethod

public org.junit.runners.model.FrameworkMethod getMethod()

getTestClass

public org.junit.runners.model.TestClass getTestClass()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013. All Rights Reserved.