Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retain the number of total tests after mapping the tests to classes #131

Merged
merged 3 commits into from
Oct 27, 2024

Conversation

uhafner
Copy link
Member

@uhafner uhafner commented Oct 27, 2024

When the test cases are mapped to the coverage tree then we should not ignore those tests that could not be automatically be mapped. It makes more sense to attach the correct metric value to the tree, even though the tests within the tree are smaller.

@uhafner uhafner added the bug Bugs or performance problems label Oct 27, 2024
Copy link

Partial score: 0/0

🚧 The grading has been aborted due to an error.

Exception

edu.hm.hafner.analysis.ParsingException: Input stream is not a PMD file.
	at edu.hm.hafner.analysis.parser.pmd.PmdParser.parseIssues(PmdParser.java:58)
	at edu.hm.hafner.analysis.parser.pmd.PmdParser.parse(PmdParser.java:32)
	at edu.hm.hafner.analysis.IssueParser.parseFile(IssueParser.java:69)
	at edu.hm.hafner.grading.FileSystemAnalysisReportFactory.create(FileSystemAnalysisReportFactory.java:32)
	at edu.hm.hafner.grading.AggregatedScore.gradeAnalysis(AggregatedScore.java:392)
	at edu.hm.hafner.grading.AutoGradingRunner.run(AutoGradingRunner.java:95)
	at edu.hm.hafner.grading.github.QualityMonitor.main(QualityMonitor.java:42)

Error Messages

Quality Monitor Errors:
An error occurred while grading
edu.hm.hafner.analysis.ParsingException: Input stream is not a PMD file.
	at edu.hm.hafner.analysis.parser.pmd.PmdParser.parseIssues(PmdParser.java:58)
	at edu.hm.hafner.analysis.parser.pmd.PmdParser.parse(PmdParser.java:32)
	at edu.hm.hafner.analysis.IssueParser.parseFile(IssueParser.java:69)
	at edu.hm.hafner.grading.FileSystemAnalysisReportFactory.create(FileSystemAnalysisReportFactory.java:32)
	at edu.hm.hafner.grading.AggregatedScore.gradeAnalysis(AggregatedScore.java:392)
	at edu.hm.hafner.grading.AutoGradingRunner.run(AutoGradingRunner.java:95)
	at edu.hm.hafner.grading.github.QualityMonitor.main(QualityMonitor.java:42)

Information Messages

--------------------------------------------------------------------------------
                    Start Quality Monitor 1.11.0 (#99404b7)                     
--------------------------------------------------------------------------------
Obtaining configuration from environment variable CONFIG
================================================================================
Processing 1 test configuration(s)
Tests Configuration:
{
  "id" : "tests",
  "name" : "Tests",
  "icon" : "",
  "maxScore" : 0,
  "tools" : [ {
    "id" : "test",
    "name" : "Tests",
    "pattern" : "**/target/*-reports/TEST*.xml",
    "sourcePath" : "",
    "metric" : "",
    "displayName" : "Tests"
  } ],
  "failureImpact" : 0,
  "passedImpact" : 0,
  "skippedImpact" : 0
}
Searching for Tests results matching file name pattern **/target/*-reports/TEST*.xml
- target/surefire-reports/TEST-edu.hm.hafner.ArchitectureTest.xml: TESTS: 9
- target/surefire-reports/TEST-edu.hm.hafner.PackageArchitectureTest.xml: TESTS: 1
- target/surefire-reports/TEST-edu.hm.hafner.coverage.ClassNodeTest.xml: TESTS: 7
- target/surefire-reports/TEST-edu.hm.hafner.coverage.ContainerNodeTest.xml: TESTS: 5
- target/surefire-reports/TEST-edu.hm.hafner.coverage.CoverageParserTest.xml: TESTS: 1
- target/surefire-reports/TEST-edu.hm.hafner.coverage.CoverageTest.xml: TESTS: 33
- target/surefire-reports/TEST-edu.hm.hafner.coverage.FileNodeTest.xml: TESTS: 20
- target/surefire-reports/TEST-edu.hm.hafner.coverage.FractionValueTest.xml: TESTS: 3
- target/surefire-reports/TEST-edu.hm.hafner.coverage.MethodNodeTest.xml: TESTS: 11
- target/surefire-reports/TEST-edu.hm.hafner.coverage.MetricTest.xml: TESTS: 30
- target/surefire-reports/TEST-edu.hm.hafner.coverage.ModuleNodeTest.xml: TESTS: 9
- target/surefire-reports/TEST-edu.hm.hafner.coverage.MutationTest.xml: TESTS: 3
- target/surefire-reports/TEST-edu.hm.hafner.coverage.NodeTest.xml: TESTS: 43
- target/surefire-reports/TEST-edu.hm.hafner.coverage.PackageNodeTest.xml: TESTS: 9
- target/surefire-reports/TEST-edu.hm.hafner.coverage.PercentageTest.xml: TESTS: 7
- target/surefire-reports/TEST-edu.hm.hafner.coverage.SafeFractionTest.xml: TESTS: 6
- target/surefire-reports/TEST-edu.hm.hafner.coverage.TestCaseTest.xml: TESTS: 1
- target/surefire-reports/TEST-edu.hm.hafner.coverage.ValueTest.xml: TESTS: 6
- target/surefire-reports/TEST-edu.hm.hafner.coverage.parser.CoberturaParserTest.xml: TESTS: 21
- target/surefire-reports/TEST-edu.hm.hafner.coverage.parser.JacocoParserTest.xml: TESTS: 12
- target/surefire-reports/TEST-edu.hm.hafner.coverage.parser.JunitParserTest.xml: TESTS: 13
- target/surefire-reports/TEST-edu.hm.hafner.coverage.parser.MetricsParserTest.xml: TESTS: 3
- target/surefire-reports/TEST-edu.hm.hafner.coverage.parser.NunitParserTest.xml: TESTS: 7
- target/surefire-reports/TEST-edu.hm.hafner.coverage.parser.OpenCoverParserTest.xml: TESTS: 12
- target/surefire-reports/TEST-edu.hm.hafner.coverage.parser.PitestParserTest.xml: TESTS: 7
- target/surefire-reports/TEST-edu.hm.hafner.coverage.parser.TestCaseMappingTest.xml: TESTS: 1
- target/surefire-reports/TEST-edu.hm.hafner.coverage.parser.VectorCastParserTest.xml: TESTS: 5
- target/surefire-reports/TEST-edu.hm.hafner.coverage.parser.XunitParserTest.xml: TESTS: 6
- target/surefire-reports/TEST-edu.hm.hafner.coverage.registry.ParserRegistryTest.xml: TESTS: 2
-> Tests Total: TESTS: 293
-> Tests Total: TESTS: 293 tests
=> Tests: 293 tests passed
=> Tests: 293 tests passed
================================================================================
Processing 2 coverage configuration(s)
Code Coverage Configuration:
{
  "id" : "coverage",
  "name" : "Code Coverage",
  "icon" : "",
  "maxScore" : 0,
  "tools" : [ {
    "id" : "jacoco",
    "name" : "Line Coverage",
    "pattern" : "**/target/site/jacoco/jacoco.xml",
    "sourcePath" : "src/main/java",
    "metric" : "line",
    "displayName" : "Line Coverage"
  }, {
    "id" : "jacoco",
    "name" : "Branch Coverage",
    "pattern" : "**/target/site/jacoco/jacoco.xml",
    "sourcePath" : "src/main/java",
    "metric" : "branch",
    "displayName" : "Branch Coverage"
  } ],
  "coveredPercentageImpact" : 0,
  "missedPercentageImpact" : 0,
  "mutationCoverage" : false
}
Searching for Line Coverage results matching file name pattern **/target/site/jacoco/jacoco.xml
- target/site/jacoco/jacoco.xml: LINE: 96.27% (2221/2307)
-> Line Coverage Total: LINE: 96.27% (2221/2307)
=> Line Coverage: 96% (86 missed lines)
Searching for Branch Coverage results matching file name pattern **/target/site/jacoco/jacoco.xml
- target/site/jacoco/jacoco.xml: BRANCH: 91.96% (904/983)
-> Branch Coverage Total: BRANCH: 91.96% (904/983)
=> Branch Coverage: 92% (79 missed branches)
=> Code Coverage: 94% (165 missed items)
Mutation Coverage Configuration:
{
  "id" : "coverage",
  "name" : "Mutation Coverage",
  "icon" : "",
  "maxScore" : 0,
  "tools" : [ {
    "id" : "pit",
    "name" : "Mutation Coverage",
    "pattern" : "**/target/pit-reports/mutations.xml",
    "sourcePath" : "src/main/java",
    "metric" : "mutation",
    "displayName" : "Mutation Coverage"
  } ],
  "coveredPercentageImpact" : 0,
  "missedPercentageImpact" : 0,
  "mutationCoverage" : true
}
Searching for Mutation Coverage results matching file name pattern **/target/pit-reports/mutations.xml
- target/pit-reports/mutations.xml: MUTATION: 89.98% (1024/1138)
-> Mutation Coverage Total: MUTATION: 89.98% (1024/1138)
=> Mutation Coverage: 90% (114 survived mutations)
=> Mutation Coverage: 90% (114 survived mutations)
================================================================================
Processing 3 static analysis configuration(s)
Style Configuration:
{
  "id" : "style",
  "name" : "Style",
  "icon" : "",
  "maxScore" : 0,
  "tools" : [ {
    "id" : "checkstyle",
    "name" : "",
    "pattern" : "**/target/**checkstyle-result.xml",
    "sourcePath" : "",
    "metric" : "",
    "displayName" : "checkstyle"
  }, {
    "id" : "pmd",
    "name" : "",
    "pattern" : "**/target/**pmd.xml",
    "sourcePath" : "",
    "metric" : "",
    "displayName" : "pmd"
  } ],
  "errorImpact" : 0,
  "highImpact" : 0,
  "normalImpact" : 0,
  "lowImpact" : 0
}
Searching for CheckStyle results matching file name pattern **/target/**checkstyle-result.xml
- target/checkstyle-java/checkstyle-result.xml: 0 warnings
- target/checkstyle-tests/checkstyle-result.xml: 0 warnings
-> CheckStyle Total: 0 warnings
=> CheckStyle: No warnings
Searching for PMD results matching file name pattern **/target/**pmd.xml
================================================================================
================================================================================

Created by Quality Monitor v1.11.0 (#99404b7). More details are shown in the GitHub Checks Result.

Copy link

codecov bot commented Oct 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.19%. Comparing base (07c3a30) to head (1abafd2).
Report is 5 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #131      +/-   ##
============================================
+ Coverage     93.08%   93.19%   +0.10%     
  Complexity      840      840              
============================================
  Files            28       28              
  Lines          2301     2306       +5     
  Branches        340      339       -1     
============================================
+ Hits           2142     2149       +7     
+ Misses           86       85       -1     
+ Partials         73       72       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

☀️   Quality Monitor

   🚦   Tests: 100 % successful (✔️ 293 passed)
   〰️   Line Coverage: 96% (86 missed lines)
   ➰   Branch Coverage: 92% (79 missed branches)
   PIT   Mutation Coverage: 90% (114 survived mutations)
   CheckStyle   CheckStyle: No warnings
   PMD   PMD: No warnings
   SpotBugs   SpotBugs: No bugs
   🐛   Error Prone: No bugs
   OWASP Dependency Check   OWASP Dependency Check: No vulnerabilitys
   🌀   Cyclomatic Complexity: 654
   💡   Cognitive Complexity: 535
   📝   Non Commenting Source Statements: 2979
   ➿   N-Path Complexity: 1486


Created by Quality Monitor v1.12.0-SNAPSHOT (#e2728ef). More details are shown in the GitHub Checks Result.

Copy link

☀️   Quality Monitor

   🚦   Tests: 100 % successful (✔️ 293 passed)
   〰️   Line Coverage: 96% (85 missed lines)
   ➰   Branch Coverage: 92% (78 missed branches)
   PIT   Mutation Coverage: 90% (113 survived mutations)
   CheckStyle   CheckStyle: No warnings
   PMD   PMD: No warnings
   SpotBugs   SpotBugs: 1 bug (low: 1)
   🐛   Error Prone: No bugs
   OWASP Dependency Check   OWASP Dependency Check: No vulnerabilitys
   🌀   Cyclomatic Complexity: 653
   💡   Cognitive Complexity: 534
   📝   Non Commenting Source Statements: 2975
   ➿   N-Path Complexity: 1485


Created by Quality Monitor v1.12.0-SNAPSHOT (#e2728ef). More details are shown in the GitHub Checks Result.

Copy link

☀️   Quality Monitor

   🚦   Tests: 100 % successful (✔️ 293 passed)
   〰️   Line Coverage: 96% (85 missed lines)
   ➰   Branch Coverage: 92% (78 missed branches)
   PIT   Mutation Coverage: 90% (113 survived mutations)
   CheckStyle   CheckStyle: No warnings
   PMD   PMD: No warnings
   SpotBugs   SpotBugs: No bugs
   🐛   Error Prone: No bugs
   OWASP Dependency Check   OWASP Dependency Check: No vulnerabilitys
   🌀   Cyclomatic Complexity: 653
   💡   Cognitive Complexity: 534
   📝   Non Commenting Source Statements: 2977
   ➿   N-Path Complexity: 1485


Created by Quality Monitor v1.12.0-SNAPSHOT (#e2728ef). More details are shown in the GitHub Checks Result.

@uhafner uhafner merged commit 133e413 into main Oct 27, 2024
33 checks passed
@uhafner uhafner deleted the retain-test-count branch October 27, 2024 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugs or performance problems
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant