lucee.Component testbox.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
Coverage Enabled or not.
|
true
|
false
|
|
any
|
coverageGenerator
The CoverageGenerator object reference.
|
true
|
false
|
|
struct
|
coverageOptions
Struct of coverage options.
|
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 | |
---|---|
CoverageService
|
beginCapture()
Reset system for a new test. |
CoverageService
|
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()
|
any
|
normalizeSlashes([string path])
|
private any
|
processCodeBrowser([any qryCoverageData], [any stats], [any opts])
Generate code browser. |
CoverageService
|
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, [boolean fullPage='true'])
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
- struct of options to initialize withProperty Detail |
---|
Coverage Enabled or not
access
- publicrequired
- falsereturntype
- anyserializable
- trueThe CoverageGenerator object reference
access
- publicrequired
- falsereturntype
- anyserializable
- trueStruct of coverage options
access
- 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
path
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
fullPage
coverageEnabled
coverageGenerator
coverageOptions
Default user option struct and do some validation
opts
- The options to default and check