View Javadoc

1   package com.atlassian.selenium;
2   
3   import junit.framework.TestResult;
4   import junit.framework.TestSuite;
5   
6   /**
7    * A skeleton test suite for Selenium tests. The run method starts the selenium server (if the
8    * selenium configuration class has been set to allow this.
9    *
10   * @since v3.12
11   */
12  public abstract class SeleniumTestSuite extends TestSuite
13  {
14  
15      /**
16       * To be implemented by users of this class.
17       * @return an implementation of the SeleniumConfiguration interface containing the appropriate
18       * selenium configuration information.
19       */
20      protected abstract SeleniumConfiguration getSeleniumConfiguration();
21  
22  
23      /**
24       * A special run methods that, depending on the SeleniumConfiguration, will start the selenium
25       * server and client.
26       * @param testResult Test results class to be passed to parent
27       */
28      public final void run(TestResult testResult){
29          SeleniumStarter.getInstance().start(getSeleniumConfiguration());
30          SeleniumStarter.getInstance().setManual(false);
31          super.run(testResult);
32          SeleniumStarter.getInstance().stop();
33      }
34  
35  
36  }