Klasse CoverageParser
java.lang.Object
io.jenkins.plugins.coverage.adapter.parser.CoverageParser
- Bekannte direkte Unterklassen:
IstanbulCoberturaReportAdapter.IstanbulCoberturaCoverageParser,JavaCoverageParser
Parse the standard format coverage report and convert it into
CoverageResult.-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungCoverageParser(String reportName) Report name will show in the UI, to differentiate different report. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected StringgetAttribute(Element e, String attributeName) protected StringgetAttribute(Element e, String attributeName, String defaultValue) Getter for property 'reportName'.Parse coverage reportDocumenttoCoverageResult.voidparse(Node parent, CoverageResult parentResult) Iterate the child elements of parent node, and parse the element toCoverageResult, then make the CoverageResult.protected abstract CoverageResultprocessElement(Element current, CoverageResult parentResult) Process DOMElementand convert it toCoverageResult.protected voidprocessLine(Element current, CoverageResult parentResult) voidsetReportName(String reportName) Setter for property 'reportName'.
-
Konstruktordetails
-
CoverageParser
Report name will show in the UI, to differentiate different report.- Parameter:
reportName- name of the report
-
-
Methodendetails
-
parse
Parse coverage reportDocumenttoCoverageResult.- Parameter:
document- DOM document of coverage report- Gibt zurück:
- Coverage result of specified report
- Löst aus:
CoverageException
-
parse
Iterate the child elements of parent node, and parse the element toCoverageResult, then make the CoverageResult. be the child of parent CoverageResult.- Parameter:
parent- parent NodeparentResult- parent coverage result
-
processElement
@CheckForNull protected abstract CoverageResult processElement(Element current, CoverageResult parentResult) Process DOMElementand convert it toCoverageResult.- Parameter:
current- current elementparentResult- parent coverage result- Gibt zurück:
- coverage result converted from Element
-
getReportName
Getter for property 'reportName'.- Gibt zurück:
- value for property 'reportName'
-
setReportName
Setter for property 'reportName'.- Parameter:
reportName- value to set for property 'reportName'
-
getAttribute
-
getAttribute
- Parameter:
e- elementattributeName- attribute name- Gibt zurück:
- value of attribute, or
nullif attribute not exists.
-
processLine
-