org.apache.jmeter.control

Class ModuleController

Implemented Interfaces:
Cloneable, Controller, ReplaceableController, Serializable, TestElement

public class ModuleController
extends GenericController
implements ReplaceableController

The goal of ModuleController is to add modularity to JMeter. The general idea is that web applications consist of small units of functionality (i.e. Logon, Create Account, Logoff...) which consist of requests that implement the functionality. These small units of functionality can be stored in SimpleControllers as modules that can be linked together quickly to form tests. ModuleController facilitates this by acting as a pointer to any controller that sits under the WorkBench. The controller and it's subelements will be substituted in place of the ModuleController at runtime. Config elements can be attached to the ModuleController to alter the functionality (which user logs in, which account is created, etc.) of the module.

Field Summary

Fields inherited from class org.apache.jmeter.control.GenericController

current, subControllersAndSamplers

Fields inherited from interface org.apache.jmeter.testelement.TestElement

COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS

Constructor Summary

ModuleController()
No-arg constructor

Method Summary

Object
clone()
List
getNodePath()
HashTree
getReplacementSubTree()
Copies the controller's subelements into the execution tree
JMeterTreeNode
getSelectedNode()
Gets the (@link JMeterTreeNode) for the Controller
void
resolveReplacementSubTree(JMeterTreeNode context)
Compute the replacement tree.
void
setSelectedNode(JMeterTreeNode tn)
Sets the (@link JMeterTreeNode) which represents the controller which this object is pointing to.

Methods inherited from class org.apache.jmeter.control.GenericController

addIterationListener, addTestElement, currentReturnedNull, fireIterEvents, fireIterationStart, getCurrentElement, getIterCount, getSubControllers, incrementCurrent, incrementIterCount, initialize, isDone, isFirst, next, nextIsAController, nextIsASampler, nextIsNull, reInitialize, removeCurrentElement, resetCurrent, resetIterCount, setCurrentElement, setDone, setFirst

Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement

addProperty, addTestElement, canRemove, clear, clearTemporary, clone, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setComment, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traverseProperty

Constructor Details

ModuleController

public ModuleController()
No-arg constructor

Method Details

clone

public Object clone()
Specified by:
clone in interface TestElement
Overrides:
clone in interface AbstractTestElement

getNodePath

public List getNodePath()

getReplacementSubTree

public HashTree getReplacementSubTree()
Copies the controller's subelements into the execution tree
Specified by:
getReplacementSubTree in interface ReplaceableController

getSelectedNode

public JMeterTreeNode getSelectedNode()
Gets the (@link JMeterTreeNode) for the Controller
Returns:
JMeterTreeNode

resolveReplacementSubTree

public void resolveReplacementSubTree(JMeterTreeNode context)
Compute the replacement tree.
Specified by:
resolveReplacementSubTree in interface ReplaceableController
Parameters:
context -

setSelectedNode

public void setSelectedNode(JMeterTreeNode tn)
Sets the (@link JMeterTreeNode) which represents the controller which this object is pointing to. Used for building the test case upon execution.
Parameters:
tn - JMeterTreeNode

Copyright © 1998-2010 Apache Software Foundation. All Rights Reserved.