-
Notifications
You must be signed in to change notification settings - Fork 297
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
Programming exercises
: Add blackbox tests as another Java project type
#6736
Conversation
I don't see in the changes where the build plan for this new type gets created. Since this is also a maven project, I assume that the normal maven build plan just gets used here. However, At a minimum, I would add a comment at the respective place explaining that this brach must cover 3 project types. In general, I'd like to have |
.../tum/in/www1/artemis/service/connectors/jenkins/build_plan/JenkinsPipelineScriptCreator.java
Show resolved
Hide resolved
7e95978
Does this type need the special command-pattern-exercise template? In a future PR I'd like to remove the duplicated template files between the |
Do you mean the different |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for answering the questions, lgtm now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reapprove code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-tested exercise creation and project import.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good.
WARNING: DELETE EXERCISES CREATED WITH THIS PR AFTER TESTING! OTHERWISE THE TEST SERVER IS BROKEN FOR OTHER PRs
Checklist
General
Server
Client
Changes affecting Programming Exercises
Motivation and Context
In some cases, it is preferable to leave it up to the student how their program is structured. In such cases, methods and classes of the solution are not known beforehand. In order to test such solutions, blackbox tests are required. This PR adds that functionality for Java programming exercises.
Description
The testing framework that is used is called
DejaGnu
(https://www.gnu.org/software/dejagnu/). ADejaGnu
button is added to the project types for Java exercises in the client. When selected, the exemplary dependency, testwise coverage and sequential test runs are disabled.The template files for this exercise are stored in
templates/java/maven_blackbox
. As implied by the folder name, the DejaGnu image is based on Maven. The DejaGnu template exercise adopts the sorting exercise from the other two project types and turns it into a user input based exercise.The pipeline.groovy file that defines the Jenkins pipeline steps is located in the
templates/java/test/blackbox.projectTemplate
directory. This folder also includes all the files required for testing. The actual docker image is defined in the pipeline.groovy file (ghcr.io/uni-passau-artemis/artemis-dejagnu:20).Steps for Testing
Prerequisites:
DejaGnu
project type.Review Progress
Performance Review
Code Review
Manual Tests
Test Coverage
Screenshots
UI change:
Test Repo folder structure:
bb
will be replaced by your package name.