From 59328e18c4be489bf21d5da97e4d7e09634b42fd Mon Sep 17 00:00:00 2001 From: Ulli Hafner Date: Thu, 7 Dec 2023 20:25:29 +0100 Subject: [PATCH] Improve Jenkinsfile for autograding. --- etc/Jenkinsfile.autograding | 107 +++++++++++++++++++++++++++--------- 1 file changed, 81 insertions(+), 26 deletions(-) diff --git a/etc/Jenkinsfile.autograding b/etc/Jenkinsfile.autograding index 6aaa25ec..53859115 100644 --- a/etc/Jenkinsfile.autograding +++ b/etc/Jenkinsfile.autograding @@ -42,33 +42,88 @@ node { stage ('Autograding') { autoGrade(''' - { - "analysis": { - "maxScore": 100, - "errorImpact": -5, - "highImpact": -2, - "normalImpact": -1, - "lowImpact": -1 - }, - "tests": { - "maxScore": 100, - "passedImpact": 0, - "failureImpact": -5, - "skippedImpact": -1 - }, - "coverage": { - "maxScore": 100, - "coveredPercentageImpact": 0, - "missedPercentageImpact": -1 - }, - "pit": { - "maxScore": 100, - "detectedImpact": 0, - "undetectedImpact": 0, - "detectedPercentageImpact": 0, - "undetectedPercentageImpact": -1 + { + "tests": { + "tools": [ + { + "name": "Tests" + } + ], + "name": "JUnit", + "passedImpact": 0, + "skippedImpact": -1, + "failureImpact": -5, + "maxScore": 100 + }, + "analysis": [ + { + "name": "Style", + "id": "style", + "tools": [ + { + "id": "checkstyle", + "name": "CheckStyle" + }, + { + "id": "pmd", + "name": "PMD" + } + ], + "errorImpact": -1, + "highImpact": -1, + "normalImpact": -1, + "lowImpact": -1, + "maxScore": 100 + }, + { + "name": "Bugs", + "id": "bugs", + "icon": "bug", + "tools": [ + { + "id": "spotbugs", + "name": "SpotBugs" + } + ], + "errorImpact": -3, + "highImpact": -3, + "normalImpact": -3, + "lowImpact": -3, + "maxScore": 100 + } + ], + "coverage": [ + { + "tools": [ + { + "id": "coverage", + "name": "Line Coverage", + "metric": "line" + }, + { + "id": "jacoco", + "name": "Branch Coverage", + "metric": "branch" + } + ], + "name": "Code Coverage", + "maxScore": 100, + "missedPercentageImpact": -1 + }, + { + "tools": [ + { + "id": "pit", + "name": "Mutation Coverage", + "metric": "mutation" + } + ], + "name": "Mutation Coverage", + "maxScore": 100, + "missedPercentageImpact": -1 + } + ] } - } ''') } }