1.0.0

org.eclipse.soda.dk.testmanager.action
Class TestAction

java.lang.Object
  extended by org.eclipse.soda.dk.testmanager.action.TestAction
All Implemented Interfaces:
TestRunListenerService, Action, ActionListener, ActionContainer
Direct Known Subclasses:
ParallelTestAction, SequentialTestAction

public abstract class TestAction
extends java.lang.Object
implements Action, ActionContainer, ActionListener, TestRunListenerService

Version:
1.0.0

Constructor Summary
TestAction()
          Constructs an instance of this class.
 
Method Summary
 void actionEnded(Action action)
          Action ended with the specified action parameter.
 void actionStarted(Action action)
          Action started with the specified action parameter.
 void add(Action action)
          Add with the specified action parameter.
 void addTest(java.lang.String runId, java.lang.String filter, java.lang.String className, java.lang.String match, java.util.Dictionary properties)
          Add test with the specified run id, filter, class name, match and properties parameters.
 void execute(TestScriptService testScript)
          Execute with the specified test script parameter.
protected abstract  int execute(TestScriptService testScript, Action action, ActionListener actionListener)
          Execute with the specified test script, action and action listener parameters and return the int result.
protected abstract  int execute(TestScriptService testScript, TestTemplate template)
          Execute with the specified test script and template parameters and return the int result.
 java.lang.String getDescription()
          Gets the description (String) value.
protected  java.lang.String getMatchDescription(java.lang.String filter, java.lang.String className)
          Get match description with the specified filter and class name parameters and return the String result.
protected abstract  java.lang.String getName()
          Gets the name (String) value.
protected  java.util.List getTestTemplatesAndActions()
          Gets the test templates and actions (List) value.
 void testEnded(java.lang.String runId, java.lang.String testName)
          Test ended with the specified run id and test name parameters.
 void testError(java.lang.String runId, java.lang.String testName, java.lang.String trace)
          Test error with the specified run id, test name and trace parameters.
 void testFailed(java.lang.String runId, java.lang.String testName, java.lang.String trace)
          Test failed with the specified run id, test name and trace parameters.
 void testRunEnded(java.lang.String runId)
          Test run ended with the specified run id parameter.
 void testRunError(java.lang.String runId, java.lang.String message, java.lang.String detail)
          Test run error with the specified run id, message and detail parameters.
 void testRunStarted(java.lang.String runId)
          Test run started with the specified run id parameter.
 void testStarted(java.lang.String runId, java.lang.String testName)
          Test started with the specified run id and test name parameters.
protected  void waitForTests()
          Wait for tests.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestAction

public TestAction()
Constructs an instance of this class.

Method Detail

actionEnded

public void actionEnded(Action action)
Action ended with the specified action parameter.

Specified by:
actionEnded in interface ActionListener
Parameters:
action - The action (Action) parameter.
See Also:
testEnded(String,String), testRunEnded(String)

actionStarted

public void actionStarted(Action action)
Action started with the specified action parameter.

Specified by:
actionStarted in interface ActionListener
Parameters:
action - The action (Action) parameter.
See Also:
testRunStarted(String), testStarted(String,String)

add

public void add(Action action)
Add with the specified action parameter.

Specified by:
add in interface ActionContainer
Parameters:
action - The action (Action) parameter.

addTest

public void addTest(java.lang.String runId,
                    java.lang.String filter,
                    java.lang.String className,
                    java.lang.String match,
                    java.util.Dictionary properties)
Add test with the specified run id, filter, class name, match and properties parameters.

Parameters:
runId - The run id (String) parameter.
filter - The filter (String) parameter.
className - The class name (String) parameter.
match - The match (String) parameter.
properties - The properties (Dictionary) parameter.

execute

public void execute(TestScriptService testScript)
             throws java.lang.InterruptedException
Execute with the specified test script parameter.

Specified by:
execute in interface Action
Parameters:
testScript - The test script (TestScriptService) parameter.
Throws:
java.lang.InterruptedException - Interrupted Exception.
See Also:
execute(TestScriptService,TestTemplate), execute(TestScriptService,Action,ActionListener)

execute

protected abstract int execute(TestScriptService testScript,
                               TestTemplate template)
                        throws InvalidSyntaxException,
                               java.io.IOException,
                               java.lang.InterruptedException
Execute with the specified test script and template parameters and return the int result.

Parameters:
testScript - The test script (TestScriptService) parameter.
template - The template (TestTemplate) parameter.
Returns:
Results of the execute (int) value.
Throws:
InvalidSyntaxException - Invalid Syntax Exception.
java.lang.InterruptedException - Interrupted Exception.
java.io.IOException
See Also:
execute(TestScriptService), execute(TestScriptService,Action,ActionListener)

execute

protected abstract int execute(TestScriptService testScript,
                               Action action,
                               ActionListener actionListener)
                        throws java.lang.InterruptedException
Execute with the specified test script, action and action listener parameters and return the int result.

Parameters:
testScript - The test script (TestScriptService) parameter.
action - The action (Action) parameter.
actionListener - The action listener (ActionListener) parameter.
Returns:
Results of the execute (int) value.
Throws:
java.lang.InterruptedException - Interrupted Exception.
See Also:
execute(TestScriptService), execute(TestScriptService,TestTemplate)

getDescription

public java.lang.String getDescription()
Gets the description (String) value.

Specified by:
getDescription in interface Action
Returns:
The description (String) value.
See Also:
getMatchDescription(String,String)

getMatchDescription

protected java.lang.String getMatchDescription(java.lang.String filter,
                                               java.lang.String className)
Get match description with the specified filter and class name parameters and return the String result.

Parameters:
filter - The filter (String) parameter.
className - The class name (String) parameter.
Returns:
Results of the get match description (String) value.

getName

protected abstract java.lang.String getName()
Gets the name (String) value.

Returns:
The name (String) value.

getTestTemplatesAndActions

protected java.util.List getTestTemplatesAndActions()
Gets the test templates and actions (List) value.

Returns:
The test templates and actions (List) value.

testEnded

public void testEnded(java.lang.String runId,
                      java.lang.String testName)
Test ended with the specified run id and test name parameters.

Specified by:
testEnded in interface TestRunListenerService
Parameters:
runId - The run id (String) parameter.
testName - The test name (String) parameter.
See Also:
actionEnded(Action), testRunEnded(String)

testError

public void testError(java.lang.String runId,
                      java.lang.String testName,
                      java.lang.String trace)
Test error with the specified run id, test name and trace parameters.

Specified by:
testError in interface TestRunListenerService
Parameters:
runId - The run id (String) parameter.
testName - The test name (String) parameter.
trace - The trace (String) parameter.
See Also:
testRunError(String,String,String)

testFailed

public void testFailed(java.lang.String runId,
                       java.lang.String testName,
                       java.lang.String trace)
Test failed with the specified run id, test name and trace parameters.

Specified by:
testFailed in interface TestRunListenerService
Parameters:
runId - The run id (String) parameter.
testName - The test name (String) parameter.
trace - The trace (String) parameter.

testRunEnded

public void testRunEnded(java.lang.String runId)
Test run ended with the specified run id parameter.

Specified by:
testRunEnded in interface TestRunListenerService
Parameters:
runId - The run id (String) parameter.

testRunError

public void testRunError(java.lang.String runId,
                         java.lang.String message,
                         java.lang.String detail)
Test run error with the specified run id, message and detail parameters.

Specified by:
testRunError in interface TestRunListenerService
Parameters:
runId - The run id (String) parameter.
message - The message (String) parameter.
detail - The detail (String) parameter.

testRunStarted

public void testRunStarted(java.lang.String runId)
Test run started with the specified run id parameter.

Specified by:
testRunStarted in interface TestRunListenerService
Parameters:
runId - The run id (String) parameter.

testStarted

public void testStarted(java.lang.String runId,
                        java.lang.String testName)
Test started with the specified run id and test name parameters.

Specified by:
testStarted in interface TestRunListenerService
Parameters:
runId - The run id (String) parameter.
testName - The test name (String) parameter.
See Also:
actionStarted(Action), testRunStarted(String)

waitForTests

protected void waitForTests()
                     throws java.lang.InterruptedException
Wait for tests.

Throws:
java.lang.InterruptedException - Interrupted Exception.

1.0.0

Copyright (c) 2007 IBM