Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/uhafner/autograding-model
Model to autograde Java projects based on a configurable set of metrics.
https://github.com/uhafner/autograding-model
Last synced: 12 days ago
JSON representation
Model to autograde Java projects based on a configurable set of metrics.
- Host: GitHub
- URL: https://github.com/uhafner/autograding-model
- Owner: uhafner
- License: mit
- Created: 2020-05-12T22:26:28.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-12T09:50:20.000Z (7 months ago)
- Last Synced: 2024-04-13T02:46:57.936Z (7 months ago)
- Language: Java
- Size: 1.56 MB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
:imagesdir: etc/images
= Autograding Model
image:https://img.shields.io/badge/JDK-17-yellow.svg[JDK 17]
image:https://github.com/uhafner/autograding-model/workflows/GitHub%20CI/badge.svg[GitHub Actions, link=https://github.com/uhafner/autograding-model/actions/workflows/ci.yml]
image:https://github.com/uhafner/autograding-model/workflows/CodeQL/badge.svg[CodeQL, link=https://github.com/uhafner/autograding-model/actions/workflows/codeql.yml]
image:https://raw.githubusercontent.com/uhafner/autograding-model/main/badges/line-coverage.svg[Line Coverage,link=https://app.codecov.io/gh/uhafner/autograding-model]
image:https://raw.githubusercontent.com/uhafner/autograding-model/main/badges/branch-coverage.svg[Branch Coverage,link=https://app.codecov.io/gh/uhafner/autograding-model]
image:https://raw.githubusercontent.com/uhafner/autograding-model/main/badges/mutation-coverage.svg[Mutation Coverage,link=https://github.com/uhafner/autograding-model/actions/workflows/quality-monito.yml]
image:https://raw.githubusercontent.com/uhafner/autograding-model/main/badges/style.svg[Warnings,link=https://github.com/uhafner/autograding-model/actions/workflows/quality-monitor.yml]
image:https://raw.githubusercontent.com/uhafner/autograding-model/main/badges/bugs.svg[Bugs,link=https://github.com/uhafner/autograding-model/actions/workflows/quality-monitor.yml]image::summary.png[Scores in Jenkins, width="100%"]
image::comment.png[PD Comment, width="100%"]Java library that autogrades projects based on a configurable set of metrics. Currently, you can select from the
following metrics:- Test statistics (e.g., number of failed tests)
- Code coverage (e.g., line coverage percentage)
- Mutation coverage (e.g., survived mutations' percentage)
- Static analysis warnings (e.g., number of SpotBugs warnings)This library internally uses the Java libraries https://github.com/jenkinsci/analysis-model[analysis-model] and https://github.com/jenkinsci/coverage-model[coverage-model] to read and parse build reports. These results are then aggregated and evaluated. These libraries are the fundament for the following tools:
- https://plugins.jenkins.io/autograding/[Jenkins autograding plugin]: Show the autograding results in Jenkins' UI
- https://github.com/uhafner/autograding-github-action[GitHub autograding action]: Show the autograding results in GitHub pull requests
- https://github.com/uhafner/autograding-gitlab-action[GitLab autograding action]: Show the autograding results in GitLab merge requestsFor each metric you can define the impact on the overall score, and the individual scoring criteria using a JSON
configuration:[source,json]
----
{
"tests": {
"name": "Tests",
"tools": [
{
"id": "test",
"name": "Tests",
"pattern": "**/target/*-reports/TEST*.xml"
}
],
"passedImpact": 0,
"skippedImpact": -1,
"failureImpact": -5,
"maxScore": 100
},
"analysis": [
{
"name": "Style",
"id": "style",
"tools": [
{
"id": "checkstyle",
"name": "CheckStyle",
"pattern": "**/target/checkstyle-result.xml"
},
{
"id": "pmd",
"name": "PMD",
"pattern": "**/target/pmd.xml"
}
],
"errorImpact": -1,
"highImpact": -1,
"normalImpact": -1,
"lowImpact": -1,
"maxScore": 100
},
{
"name": "Bugs",
"id": "bugs",
"icon": "bug",
"tools": [
{
"id": "spotbugs",
"name": "SpotBugs",
"sourcePath": "src/main/java",
"pattern": "**/target/spotbugsXml.xml"
}
],
"errorImpact": -3,
"highImpact": -3,
"normalImpact": -3,
"lowImpact": -3,
"maxScore": 100
}
],
"coverage": [
{
"name": "Code Coverage",
"tools": [
{
"id": "jacoco",
"name": "Line Coverage",
"metric": "line",
"sourcePath": "src/main/java",
"pattern": "**/target/site/jacoco/jacoco.xml"
},
{
"id": "jacoco",
"name": "Branch Coverage",
"metric": "branch",
"sourcePath": "src/main/java",
"pattern": "**/target/site/jacoco/jacoco.xml"
}
],
"maxScore": 100,
"missedPercentageImpact": -1
},
{
"name": "Mutation Coverage",
"tools": [
{
"id": "pit",
"name": "Mutation Coverage",
"metric": "mutation",
"sourcePath": "src/main/java",
"pattern": "**/target/pit-reports/mutations.xml"
}
],
"maxScore": 100,
"missedPercentageImpact": -1
}
]
}----