Package Peach :: Package Engine :: Module engine :: Class Engine
[hide private]

Class Engine

source code

The highlevel Peach engine. The main entrypoint is "Run(...)" which consumes a Peach XML file and performs the fuzzing run.

Instance Methods [hide private]
 
__init__(self) source code
 
Count(self, uri, runName=None)
Just count the tests!
source code
 
Run(self, uri, runName=None, verbose=False, watcher=None, restartFile=None, noCount=False, parallel=None)
Run a Peach XML file.
source code
 
_startAgents(self, run, test)
Start up agents listed in test.
source code
 
_stopAgents(self, run, test) source code
 
_countTest(self, run, test, verbose=False)
Get the total test count of this test
source code
number
_runTest(self, run, test, countOnly=False, testRange=None)
Runs a Test as defined in the Peach XML.
source code
Class Variables [hide private]
  debug = False
Toggle display of debug messages.
Method Details [hide private]

Count(self, uri, runName=None)

source code 

Just count the tests!

Parameters:
  • uri (String) - URI specifying the filename to use. Must have protocol prepended (file:, http:, etc)
  • runName (String) - Name of run or if None, "DefaultRun" is used.

Run(self, uri, runName=None, verbose=False, watcher=None, restartFile=None, noCount=False, parallel=None)

source code 

Run a Peach XML file.

Called by peach.py to perform fuzzing runs.

Parameters:
  • uri (String) - URI specifying the filename to use. Must have protocol prepended (file:, http:, etc)
  • runName (String) - Name of run or if None, "DefaultRun" is used.
  • verbose (Boolean) - Not used anymore??
  • watcher (Instance) - UI Interface that receaves callbacks from engine
  • restartFile (String) - File containing state for restarting a fuzzing run
  • noCount (Boolean) - No longer used
  • parallel (List) - First item is total machine count, second is our machine #

_runTest(self, run, test, countOnly=False, testRange=None)

source code 

Runs a Test as defined in the Peach XML.

Parameters:
  • run (Run object) - Run that test is part of
  • test (Test object) - Test to run
  • countOnly (bool) - Should we just get total mutator count? Defaults to False.
  • testRange (list of numbers) - Iteration # test ranges. Only used when performing parallel fuzzing.
Returns: number
the total number of test iterations or None