Skip to main content

Wrapper

TestElement use Lombok to generate POJO with Builder.

Each test element use the same name of the origin test element but with suffix Wrapper.

Wrapper can be instantiated directly but it's recommended to use builder.

Node types#

  1. Test Plan : Test Plan has the wrapper TestPlanWrapper.
  2. Thread Group : All Thread group implements interface ThreadWrapper.
  3. Samplers : All samplers implements interface SamplerWrapper.
  4. Logic Controllers : All controller implements interface ControllerWrapper.
  5. Listeners : All listeners implements interface SampleListenerWrapper.
  6. Configuration Elements : All configuration elements implements interface ConfigElementWrapper.
  7. Assertions : All Assertions implements interface AssertionWrapper.
  8. Timers : All timers implements interface timers.
  9. Pre-Processors :All Pre-Processors implements interface PreProcessorWrapper.
  10. Post-Processors : All Post-Processors implements interface PostProcessorWrapper.

Builder#

JMC is based on Lombok SuperBuilder to generate builder.

Builder#

You can get the builder of component calling the static method builder() on type.

Simple Attribute#

In builder all simple attribute has a prefix with*.

Collections Attribute#

All list attributes has a prefix add*, to add values to the list value.

  1. add{Attributename}( oneValue )
  2. add{Attributename}s( listValue )

Simplified add*#

For same simple object a simplified add method is present, for example : argument composed by (key, value) we an found the following method addArgument( String key,String value )

Attributes#

Children#

Children attribute contain the list of children of testElement they are equivalent the children nodes in GUI. addChild/addChildren are not available but depends of node type the correct method is available :

MethodsAvailable for
addThread/addThreadsTestPlan
addController/addControllerThread/Controller
addSampler/addSamplerThread/Controller
addConfig/addConfigsTestPlan/Thread/Controller/Sampler
addPreProcessor/addPreProcessorsTestPlan/Thread/Controller/Sampler
addPostProcessor/addPostProcessorsTestPlan/Thread/Controller/Sampler
addTimer/addTimersTestPlan/Thread/Controller/Sampler
addListener/addListenersTestPlan/Thread/Controller/Sampler
addPostProcessor/addPostProcessorsTestPlan/Thread/Controller/Sampler
addTimer/addTimersTestPlan/Thread/Controller/Sampler
addAssertion/addAssertionsTestPlan/Thread/Controller/Sampler

Tags#

Tags are string value that can be used to identify a testElement or group of testElements, they an be used with interceptors