rad  2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Attributes | List of all members
etr.plugin.Plugin Class Reference

Plugin base class to simplify implementation. More...

Public Member Functions

def __init__
 Mandatory and is called once for every sequence of steps to execute. More...
 
def add_options
 Used to add custom command line options. More...
 
def setup
 Called during Step.SETUP step. More...
 
def run
 Called during Step.RUN step. More...
 
def teardown
 Called during Step.TEARDOWN. More...
 

Static Public Attributes

int order = 200
 

Detailed Description

Plugin base class to simplify implementation.

class attributes: order used to order the plugin execution order in each step, low value = earlier execution.

The step methods Plugin.setup, Plugin.run, Plugin.teardown shall only assume that Plugin.__init__ has been called previously. This is because the user may choose to only execute parts of the full test sequence, most often to repeateadly execute the Steps.RUN step. The methods need to implement graceful error handling to handle missing steps.

Constructor & Destructor Documentation

def etr.plugin.Plugin.__init__ (   self,
  ctx 
)

Mandatory and is called once for every sequence of steps to execute.

Member Function Documentation

def etr.plugin.Plugin.add_options (   cls,
  parser 
)

Used to add custom command line options.

Note
: Must be a class method
def etr.plugin.Plugin.run (   self,
  ctx 
)

Called during Step.RUN step.

State and data from previous steps must be loaded from ctx.env or ctx.storage.

ctx.env shall be considered read-only. Changes will not persist.

def etr.plugin.Plugin.setup (   self,
  ctx 
)

Called during Step.SETUP step.

Any state or data needed in the following steps shall be stored persistantly using the key-value store in ctx.storage or by modifying the ctx.env dictionary.

def etr.plugin.Plugin.teardown (   self,
  ctx 
)

Called during Step.TEARDOWN.

State and data from previous steps must be loaded from ctx.env, or ctx.storage.

ctx.env shall be considered read-only. Changes will not persist.

Member Data Documentation

int etr.plugin.Plugin.order = 200
static

The documentation for this class was generated from the following file: