1.0.0

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

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

public abstract class TestAction
extends AbstractAction
implements ActionContainer

Since:
1.0
Version:
1.2.0

Constructor Summary
protected TestAction(java.lang.String id)
          Constructs an instance of this class.
 
Method Summary
 void add(Action action)
          Add with the specified action parameter.
 void addCounts(TestStatisticsService testStatistics)
          Add counts with the specified test script parameter.
 void addTest(java.lang.String id, java.lang.String controllerId, 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.
protected abstract  void execute(TestScriptService testScript, TestTemplate template)
          Execute with the specified test script and template parameters and return the int result.
protected  void executeTemplateOrAction(TestScriptService testScript, java.lang.Object templateOrAction)
          Execute template or action with the specified test script and template or action parameters.
 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  TestSessionService getTestSession(TestScriptService testScript, java.lang.String controllerId)
          Get test session with the specified test script and controller id parameters and return the TestSessionService result.
protected  java.util.List getTestTemplatesAndActions()
          Gets the test templates and actions (List) value.
 
Methods inherited from class org.eclipse.soda.dk.testmanager.action.AbstractAction
execute, getId, getParentAction, handleScriptActionError, setParentAction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.soda.dk.testmanager.action.Action
execute
 

Constructor Detail

TestAction

protected TestAction(java.lang.String id)
Constructs an instance of this class.

Parameters:
id - The ID (String) parameter.
Method Detail

add

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

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

addCounts

public void addCounts(TestStatisticsService testStatistics)
Add counts with the specified test script parameter.

Specified by:
addCounts in interface Action
Parameters:
testStatistics - The test statistics (TestStatisticsService) parameter.

addTest

public void addTest(java.lang.String id,
                    java.lang.String controllerId,
                    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:
id - The ID (String) parameter.
controllerId - The controller 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

protected abstract void 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.
Throws:
InvalidSyntaxException - Invalid Syntax Exception.
java.io.IOException - IOException.
java.lang.InterruptedException - Interrupted Exception.

executeTemplateOrAction

protected void executeTemplateOrAction(TestScriptService testScript,
                                       java.lang.Object templateOrAction)
                                throws java.lang.InterruptedException
Execute template or action with the specified test script and template or action parameters.

Parameters:
testScript - The test script (TestScriptService) parameter.
templateOrAction - The template or action (Object) parameter.
Throws:
java.lang.InterruptedException - Interrupted Exception.

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.

getTestSession

protected TestSessionService getTestSession(TestScriptService testScript,
                                            java.lang.String controllerId)
                                     throws java.io.IOException
Get test session with the specified test script and controller id parameters and return the TestSessionService result.

Parameters:
testScript - The test script (TestScriptService) parameter.
controllerId - The controller ID (String) parameter.
Returns:
Results of the get test session (TestSessionService) value.
Throws:
java.io.IOException - IOException.

getTestTemplatesAndActions

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

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

1.0.0

Copyright (c) 2007, 2009 IBM