testbox.system.coverage.data

Class CoverageGenerator

lucee.Component
    extended by testbox.system.coverage.data.CoverageGenerator

Copyright Ortus Solutions, Corp www.ortussolutions.com I collect code coverage data for a directory of files and generate a query of data that can be consumed by different reporting interfaces.

Class Attributes:
  • synchronized : false
  •  
  • accessors : true
  •  
  • persistent : false
  •  
    Constructor Summary
    init()
          Constructor.
    Method Summary
    CoverageGenerator beginCapture()
         Reset system for a new test.
    boolean configure()
         Configure the main data collection class.
    CoverageGenerator endCapture([any leaveLineProfilingOn='false'])
         End the capture of data.
    query generateData(string pathToCapture, [any whitelist=''], [any blacklist=''])
    any isPathAllowed(string path, array whitelist, array blacklist)
         Determines if a path is valid given the whitelist and black list.
     
    Methods inherited from class lucee.Component
    None

    Constructor Detail

    init

    public init()

    Constructor


    Method Detail

    beginCapture

    public CoverageGenerator beginCapture()

    Reset system for a new test. Turns on line coverage and resets in-memory statistics


    configure

    public boolean configure()

    Configure the main data collection class.


    endCapture

    public CoverageGenerator endCapture([any leaveLineProfilingOn='false'])

    End the capture of data. Clears up memory and optionally turns off line profiling

    Parameters:
    leaveLineProfilingOn - Set to true to leave line profiling enabled on the server

    generateData

    public query generateData(string pathToCapture, [any whitelist=''], [any blacklist=''])

    Parameters:
    pathToCapture - The full path to a folder of code. Searched recursivley
    whitelist - Comma-delimeted list or array of file paths to include
    blacklist - Comma-delimeted list or array of file paths to exclude

    isPathAllowed

    public any isPathAllowed(string path, array whitelist, array blacklist)

    Determines if a path is valid given the whitelist and black list. White and black lists use standard file globbing patterns.

    Parameters:
    path - The relative path to check.
    whitelist - paths to allow
    blacklist - paths to exclude