You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because you mentioned that we didn't have unit tests for certain methods we were modifying, I thought it would be useful to generate some basic code coverage metrics for our unit tests, using JaCoCo. I just added some items to the pom that does two things:
Generates JaCoCo reports when you run: mvn site - they are included in the Project Reports section.
Generates warnings when there are classes with no test coverage for 1 or more methods.
The current warnings are:
[INFO] --- jacoco-maven-plugin:0.8.7:check (jacoco-check) @ antisamy ---
[INFO] Loading execution data file /Users/Dave.Wichers/git/ANTISAMY/antisamy_main/target/jacoco.exec
[INFO] Analyzed bundle 'antisamy' with 40 classes
[WARNING] Rule violated for class org.owasp.validator.html.scan.AntiSamySAXScanner: methods missed count is 1, but expected maximum is 0
[WARNING] Rule violated for class org.owasp.validator.html.scan.AbstractAntiSamyScanner: methods missed count is 1, but expected maximum is 0
[WARNING] Rule violated for class org.owasp.validator.html.scan.AntiSamyDOMScanner: methods missed count is 2, but expected maximum is 0
[WARNING] Rule violated for class org.owasp.validator.html.scan.Constants: methods missed count is 1, but expected maximum is 0
[WARNING] Rule violated for class org.owasp.validator.html.CleanResults: methods missed count is 1, but expected maximum is 0
[WARNING] Rule violated for class org.owasp.validator.html.Policy.SAXErrorHandler: methods missed count is 1, but expected maximum is 0
[WARNING] Rule violated for class org.owasp.validator.html.Policy.1: methods missed count is 1, but expected maximum is 0
[WARNING] Rule violated for class org.owasp.validator.html.Policy.3.1: methods missed count is 1, but expected maximum is 0
[WARNING] Rule violated for class org.owasp.validator.html.Policy.2: methods missed count is 1, but expected maximum is 0
[WARNING] Rule violated for class org.owasp.validator.html.AntiSamy: methods missed count is 4, but expected maximum is 0
[WARNING] Rule violated for class org.owasp.validator.html.Policy: methods missed count is 4, but expected maximum is 0
[WARNING] Rule violated for class org.owasp.validator.html.PolicyException: methods missed count is 1, but expected maximum is 0
[WARNING] Rule violated for class org.owasp.validator.html.InternalPolicy: methods missed count is 1, but expected maximum is 0
[WARNING] Rule violated for class org.owasp.validator.css.UnknownSelectorException: methods missed count is 2, but expected maximum is 0
[WARNING] Rule violated for class org.owasp.validator.css.CssHandler: methods missed count is 6, but expected maximum is 0
[WARNING] Rule violated for class org.owasp.validator.html.util.HTMLEntityEncoder: methods missed count is 1, but expected maximum is 0
[WARNING] Rule violated for class org.owasp.validator.html.util.XMLUtil: methods missed count is 6, but expected maximum is 0
[WARNING] Rule violated for class org.owasp.validator.html.util.URIUtils: methods missed count is 4, but expected maximum is 0
[WARNING] Rule violated for class org.owasp.validator.html.model.Tag: methods missed count is 1, but expected maximum is 0
[WARNING] Rule violated for class org.owasp.validator.html.model.Property: methods missed count is 1, but expected maximum is 0
[WARNING] Coverage checks have not been met. See log for details.
I'd like us to create unit tests for every PUBLIC method first, and then ideally all the methods eventually. Once we have this level of test coverage, we can consider adding some level of code coverage minimums, maybe for only critical/public methods.
Not urgent, just a potential improvement idea.
The text was updated successfully, but these errors were encountered:
Because you mentioned that we didn't have unit tests for certain methods we were modifying, I thought it would be useful to generate some basic code coverage metrics for our unit tests, using JaCoCo. I just added some items to the pom that does two things:
The current warnings are:
[INFO] --- jacoco-maven-plugin:0.8.7:check (jacoco-check) @ antisamy ---
[INFO] Loading execution data file /Users/Dave.Wichers/git/ANTISAMY/antisamy_main/target/jacoco.exec
[INFO] Analyzed bundle 'antisamy' with 40 classes
[WARNING] Coverage checks have not been met. See log for details.
I'd like us to create unit tests for every PUBLIC method first, and then ideally all the methods eventually. Once we have this level of test coverage, we can consider adding some level of code coverage minimums, maybe for only critical/public methods.
Not urgent, just a potential improvement idea.
The text was updated successfully, but these errors were encountered: