added xUnit Tests
Some checks failed
csharp-secdevops-pipeline-pod/pipeline/head There was a failure building this commit

This commit is contained in:
2026-05-05 08:45:24 +02:00
parent b1fbc831a7
commit 366a0f548c
22 changed files with 6160 additions and 2 deletions

8
Jenkinsfile vendored
View File

@@ -38,8 +38,8 @@ pipeline {
stage('Unit Tests') {
steps {
container('dotnet8') {
// Führt alle Tests im Solution-Verzeichnis aus
sh 'dotnet test --no-build --configuration Release'
// Erstellt eine XML-Datei im Format 'junit', die Jenkins lesen kann
sh 'dotnet test --no-build --configuration Release --logger "junit;LogFileName=results.xml;MethodDisplay=ClassAndMethod"'
}
}
}
@@ -56,6 +56,10 @@ pipeline {
post {
always {
// Sammelt die Testergebnisse ein (die wir im Test-Schritt erzeugen)
// Das **/ bedeutet: Suche in allen Unterordnern nach .xml Dateien
junit testResults: '**/TestResults/*.xml', allowEmptyResults: true
// Meldet den Status zurück, wenn das Gitea-Plugin korrekt konfiguriert ist
echo "Pipeline beendet: ${currentBuild.result}"
}