The project aims to deliver a solution for a grading system that uses a continuous integration pipeline to grade the repositories with test automation of computer science students in different software engineering courses using different server deployments and programming languages.
- Deployment and configuration of software projects in software engineering courses is mainly a manual task, since applications need to be built, tested, deployed and updated frequently, after every exercise where changes are made in the source code and features are updated.
- Since applications need dependencies, such as build tools, software development kits and web containers, testing for desired features is a time-consuming process that needs a lot of human interaction.
- The possibility that students change unit tests to their advantage is given when tests are manually executed.
- Supervisors of software engineering courses need pipeline automation to get the grading of these development environments, so that student's repositories can be tested and checked for completion.
- The manual task of configuration pipelines that grade computer science students should be as coinvented as possible, so that supervisors are able to automatically grade their students programming skills.
- Jenkins pipelines + Github (public/private Repo) -> http://10.25.2.215:32234
- Gitlab pipelines
- Github Workflows pipelines
Over the different software engenieering courses, sample projects with sample unit, integration and end-to-end where covered and are used in this project as sample data to test pipeline automation of the deployment.
gradle:6.8.3-jdk-15.
- swenga-calculator ✓ -> unit test fails case, gradle test
- swenga-guestbook -> n students, unit test passes, gradle test - todo morgen
build.gradle {
test {
useJUnitPlatform()
ignoreFailures = true
}
}
// must be added to build.gralde so the pipeline does not exit on failed testsgradle:6.8.3-jdk-15.
- swenga-springboot-employee-manager ✓ -> spring boot, integration test, mysql db, gradle
build.gradle.kts {
tasks.withType<Test> {
useJUnitPlatform()
ignoreFailures = true
reports {
junitXml.isEnabled = true
html.isEnabled = false
}
}
}
// must be added to build.gralde so the pipeline does not exit on failed teststhe testing tool pytest is used to generate XML reports.
- swengs-exercise1 ✓ -> for n students, simple unit test
- swengs-exercise2 -> n students, unit test passes, pytest - todo morgen
- swengs-exercise3 ✓ -> django db, django-pytest
- swengs-exercise4 ✓ -> regression testing, django db, django-pytest
pytest.ini {
[pytest]
DJANGO_SETTINGS_MODULE = movie_site.settings
}
# pytest configurationhttps://github.com/karma-runner/karma-junit-reporter
https://testing-angular.com/angular-testing-principles/
-
Installation of Jenkins in an Kubernetes cluster
-
Jenkins namespace
-
Deployment per .yaml file or HELM
-
Jenkins IP: http://10.25.2.215:32234
-
credentials: username: admin / pw: def563d1312043b1824722a70fb7965b
-
config.yml kubernetes admin credentials
-
createing pods with docker images
https://www.tutorialspoint.com/groovy/index.htm
- Bash Script Pipelines für verschiedene Technologien & Programmiersprachen
- Builden und Testen der Studenten-Projekte in einzelnen Pods im Kubernetes
- Generieren von JUnit XML reports über die Testergebnisse
- Zusammenführen aller reports der Studierenen pro Hausarbeit
Schon jetzt wird in der Informatik- bzw. Programmierausbildung am Studiengang IMA mit Jupyter/Nbgrader eine Tool-Chain zur automatisierten Beurteilung von Hausarbeiten verwendet. Sobald man aber die Jupyter-Umgebung verlässt, wird eine automatische Beurteilung deutlich schwieriger. All dies kann mittels Bash-Script automatisiert werden!
In diesem BÜPA Projekt geht es nun darum, das Validieren der Abgaben mittels klassischer CI-Pipeline zu ersetzen.
- Das heißt am Ende des Abgabefensters wird ein automatisierter CI-Build gestartet, dessen Ergebnis zur Beurteilung einer Heimarbeit führt.
- Wichtiger Aspekt ist die Erstellung von Zugriffsberechtigungen (Hausübungen sollen nur für die betroffenen Studierenden bzw. Studierendenteams sowie Lehrende zugänglich sein).
- Ebenso soll es nicht möglich sein, vorgegebene Tests abzuändern (in der CI-Pipline werden die originalen Tests verwendet).
to evaulate:
- Database support,
- Access rights
- Multiple repos in pipeline
- Cost of solution,
- Language Support,
- Integration Test ...
- public private repo
- local online