lucee.Componenttestbox.system.coverage.CoverageService
Copyright Ortus Solutions, Corp www.ortussolutions.com I handle capturing line coverage data. I can accept the following options: enabled - Boolean to turn coverage on or off sonarQube.XMLOutputPath Absolute XML file path to write XML sunarQube file browser.outputDir Absolute directory path to create html code coverage browser pathToCapture Absolute path to root folder to capture coverage. Typically your web root whitelist A comma-delimited list of file globbing paths relative to your pathToCapture of the ONLY files to match. When emtpy, everything is matched by default blacklist A comma-delimited list of file globbing paths relative to your pathToCapture of files to ignore
Property Summary | ||||
---|---|---|---|---|
type | property | default | serializable | required |
boolean
|
coverageEnabled
|
true
|
false
|
|
any
|
coverageGenerator
|
true
|
false
|
|
struct
|
coverageOptions
|
true
|
false
|
Constructor Summary | |
---|---|
init([any coverageOptions='[runtime expression]'])
Boostrap the Code Coverage service and decide if we'll be enabled or not. |
Method Summary | |
---|---|
any
|
beginCapture()
Reset system for a new test. |
any
|
endCapture([any leaveLineProfilingOn='false'])
End the capture of data. |
private any
|
generateCoverageData(struct opts)
Interface with FusionReactor to build coverage data. |
string
|
getCoverageEnabled()
|
string
|
getCoverageGenerator()
|
string
|
getCoverageOptions()
|
private any
|
processCodeBrowser([any qryCoverageData], [any stats], [any opts])
Generate code browser. |
any
|
processCoverage(TestResult results, TestBox testbox)
Process Code Coverage if enabled and set results inside the TestResult object. |
private any
|
processSonarQube(query qryCoverageData, struct opts)
Write out SonarQube generic coverage XML file. |
private any
|
processStats(query qryCoverageData)
Generate statistics from the coverage data. |
any
|
renderStats(struct coverageData)
Render HTML representation of statistics. |
any
|
setCoverageEnabled(boolean coverageEnabled)
|
any
|
setCoverageGenerator(any coverageGenerator)
|
any
|
setCoverageOptions(struct coverageOptions)
|
private any
|
setDefaultOptions([struct opts='[runtime expression]'])
Default user option struct and do some validation. |
Methods inherited from class lucee.Component |
---|
None |
Constructor Detail |
---|
Boostrap the Code Coverage service and decide if we'll be enabled or not
coverageOptions
Property Detail |
---|
access
- publicrequired
- falsereturntype
- anyserializable
- trueaccess
- publicrequired
- falsereturntype
- anyserializable
- trueaccess
- publicrequired
- falsereturntype
- anyserializable
- trueMethod Detail |
---|
Reset system for a new test. Turns on line coverage and resets in-memory statistics
End the capture of data. Clears up memory and optionally turns off line profiling
leaveLineProfilingOn
- Set to true to leave line profiling enabled on the serverInterface with FusionReactor to build coverage data
opts
Generate code browser
qryCoverageData
stats
opts
Process Code Coverage if enabled and set results inside the TestResult object
results
- The instance of the TestBox TestResult object to build a report ontestbox
- The TestBox core objectWrite out SonarQube generic coverage XML file
qryCoverageData
opts
Generate statistics from the coverage data
qryCoverageData
Render HTML representation of statistics
coverageData
coverageEnabled
coverageGenerator
coverageOptions
Default user option struct and do some validation
opts