org.benow.web.test
Interface TesterService

All Superinterfaces:
org.benow.java.spec.Markup, org.benow.service.Service
All Known Implementing Classes:
TesterServiceImpl

public interface TesterService
extends org.benow.service.Service

A service for testing urls.

Author:
andy

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.benow.java.spec.Markup
org.benow.java.spec.Markup.ParamName, org.benow.java.spec.Markup.ReturnDescription
 
Method Summary
 void addTest(TestStep test)
          Add a given test
 TestResult getLastRun(java.lang.Object key)
          Get the last run test of the given key
 ResultStreamer getResultDiff(java.lang.Object fromKey, java.lang.Object toKey)
          Gets a graphical diff between two runs
 ResultWriter getResultStream(java.lang.Object key)
          Get the html stream for given key
 TestStep getTest(java.lang.Object key)
          Get the test with the given key
 java.util.List<TestResult> getTestHistory(java.lang.Object key)
           
 TestResult getTestRun(java.lang.Object key)
          Get run with given key
 java.util.List<TestStep> getTests()
           
 void removeTestRuns(java.util.List<TestResult> runs)
          Remove the given runs
 void removeTests(java.util.List<TestStep> tests)
          Remove the given tests
 TestResult runTest(java.lang.Object key)
          Run the given test.
 void runTests()
          Run all tests
 void stampAll()
          Accept all current result values.
 void stampAsExpected(java.lang.Object key)
          Use the given result as the expected for the step
 void startRecording()
          Start recording tests.
 void stopRecording()
          Stop recording tests.
 

Method Detail

getTests

java.util.List<TestStep> getTests()
Returns:
all recorded tests

runTests

void runTests()
Run all tests


runTest

TestResult runTest(java.lang.Object key)
                   throws org.benow.repository.NoSuchObjectException,
                          java.lang.Exception
Run the given test.

Parameters:
key -
Throws:
org.benow.repository.NoSuchObjectException
java.lang.Exception

stampAsExpected

void stampAsExpected(java.lang.Object key)
                     throws org.benow.repository.NoSuchObjectException
Use the given result as the expected for the step

Parameters:
key -
Throws:
org.benow.repository.NoSuchObjectException

addTest

void addTest(TestStep test)
Add a given test

Parameters:
test -

startRecording

void startRecording()
Start recording tests. Navigation will cause posts and gets to be recorded along with the resulting html. The requests make up a test and these tests can be repeated with the result compared to the known good.


stopRecording

void stopRecording()
Stop recording tests.


getTest

TestStep getTest(java.lang.Object key)
                 throws org.benow.repository.NoSuchObjectException
Get the test with the given key

Parameters:
key -
Returns:
Throws:
org.benow.repository.NoSuchObjectException

removeTests

void removeTests(java.util.List<TestStep> tests)
                 throws org.benow.repository.ObjectRepositoryError,
                        org.benow.repository.NoSuchObjectException
Remove the given tests

Parameters:
key -
Throws:
org.benow.repository.NoSuchObjectException
org.benow.repository.ObjectRepositoryError

removeTestRuns

void removeTestRuns(java.util.List<TestResult> runs)
                    throws org.benow.repository.ObjectRepositoryError,
                           org.benow.repository.NoSuchObjectException
Remove the given runs

Parameters:
key -
Throws:
org.benow.repository.NoSuchObjectException
org.benow.repository.ObjectRepositoryError

getLastRun

TestResult getLastRun(java.lang.Object key)
                      throws org.benow.repository.NoSuchObjectException
Get the last run test of the given key

Parameters:
key -
Returns:
Throws:
org.benow.repository.NoSuchObjectException - if no last run test

getTestHistory

java.util.List<TestResult> getTestHistory(java.lang.Object key)
                                          throws org.benow.repository.NoSuchObjectException
Throws:
org.benow.repository.NoSuchObjectException

getTestRun

TestResult getTestRun(java.lang.Object key)
                      throws org.benow.repository.NoSuchObjectException
Get run with given key

Parameters:
key -
Returns:
Throws:
org.benow.repository.NoSuchObjectException

getResultStream

ResultWriter getResultStream(java.lang.Object key)
                             throws org.benow.repository.NoSuchObjectException
Get the html stream for given key

Parameters:
key -
Returns:
Throws:
org.benow.repository.NoSuchObjectException

stampAll

void stampAll()
Accept all current result values. Used when a change to a major file (ie site.xsl) has caused all valid tests to be no longer valid.


getResultDiff

ResultStreamer getResultDiff(java.lang.Object fromKey,
                             java.lang.Object toKey)
                             throws org.benow.repository.NoSuchObjectException,
                                    java.io.IOException
Gets a graphical diff between two runs

Parameters:
fromKey -
toKey -
Throws:
org.benow.repository.NoSuchObjectException
java.io.IOException