org.simplium
Class SimpliumWebTest

java.lang.Object
  extended by org.simplium.SimpliumWebTest

public abstract class SimpliumWebTest
extends java.lang.Object

The base class that all Simplium test cases must extend. This base class contains funtionality to retrieve a pre initated Selenium instance.

With the methods isDevelopment, isTest, isProduction can be used to determine if the test case is run in respective enviroment.


Field Summary
protected  SimpliumDefaultSelenium selenium
          Protected instance of selenium that can be used directly in the test cases without the need for any getters.
 
Constructor Summary
SimpliumWebTest()
           
 
Method Summary
 SimpliumDefaultSelenium getSelenium()
          Returns the selenium instance.
 boolean isDevelopment()
          Returns if the test case is executed in development enviroment.
 boolean isProduction()
          Returns if the test case is executed in production enviroment.
 boolean isTest()
          Returns if the test case is executed in test enviroment.
 void onOpen()
          Override this method to perform actions that is executed after the open command on selenium is run.
 void onStart()
          Override this method to perform actions that is executed before the test case is run.
 void setSelenium(SimpliumDefaultSelenium aSelenium)
          Method used by the Simplium framework to populate the base class with a pre initiated instance of Selenium.
 void setUpServer(int aPort)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

selenium

protected SimpliumDefaultSelenium selenium
Protected instance of selenium that can be used directly in the test cases without the need for any getters.

Constructor Detail

SimpliumWebTest

public SimpliumWebTest()
Method Detail

setUpServer

public void setUpServer(int aPort)
                 throws java.lang.Exception
Throws:
java.lang.Exception

setSelenium

public void setSelenium(SimpliumDefaultSelenium aSelenium)
Method used by the Simplium framework to populate the base class with a pre initiated instance of Selenium.

Parameters:
aSelenium - a pre initiated instance of Selenium.

getSelenium

public SimpliumDefaultSelenium getSelenium()
Returns the selenium instance. Can be access through the protected variable selenium also.

Returns:
The selenium instance.

onStart

public void onStart()
Override this method to perform actions that is executed before the test case is run.


onOpen

public void onOpen()
Override this method to perform actions that is executed after the open command on selenium is run.


isTest

public boolean isTest()
Returns if the test case is executed in test enviroment.

Returns:
true if the test case is executed in test enviroment, false otherwise.

isDevelopment

public boolean isDevelopment()
Returns if the test case is executed in development enviroment.

Returns:
true if the test case is executed in development enviroment, false otherwise.

isProduction

public boolean isProduction()
Returns if the test case is executed in production enviroment.

Returns:
true if the test case is executed in production enviroment, false otherwise.