net.sourceforge.smile.util
Class SmileTestUtils

java.lang.Object
  extended bynet.sourceforge.smile.util.SmileTestUtils

public class SmileTestUtils
extends java.lang.Object

The SmileTestUtils is a helper class that is designed to facilitate working with the httpunit testing framework. (see httpunit.sourceforge.net) It basically extends the http unit testing functionality by adding helper operation that form a more high level interface towards the components in smile. Basically it allows you to allmost literally script user interaction, on component level on the page outputted by the smile engine. This speeds up the creation of formal test cases on the GUI level of your application (httpunit, combined with junit + this class). The class includes operations like clicking on a component, selecting elements in the component, sorting a grid control, etc...


Constructor Summary
SmileTestUtils()
          Creates a new SmileTestUtils object.
 
Method Summary
 void dump()
          Dumps the last retrieved web page to a file in the current directory.
 void get(java.lang.String url)
          Requests a specified URL.
 com.meterware.httpunit.WebConversation getWebConversation()
           
 com.meterware.httpunit.WebRequest getWebRequest()
           
 com.meterware.httpunit.WebResponse getWebResponse()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SmileTestUtils

public SmileTestUtils()
Creates a new SmileTestUtils object.

Method Detail

get

public void get(java.lang.String url)
         throws java.lang.Exception
Requests a specified URL.

Parameters:
url -
Throws:
java.lang.Exception

dump

public void dump()
          throws java.lang.Exception
Dumps the last retrieved web page to a file in the current directory. The file is called dump.html by default.

Throws:
java.lang.Exception

getWebConversation

public com.meterware.httpunit.WebConversation getWebConversation()
Returns:
the current httpunit WebConversation. (see http://httpunit.sourceforge.net/)

getWebRequest

public com.meterware.httpunit.WebRequest getWebRequest()
Returns:
the current httpunit WebRequest. (see http://httpunit.sourceforge.net/)

getWebResponse

public com.meterware.httpunit.WebResponse getWebResponse()
Returns:
the current httpunit WebResponse. (see http://httpunit.sourceforge.net/)