Here is my scenario: I'm in the process of creating a plugin that lets my students submit their code via SBT (a different subject) to one of my custom CI servers, and I would like to be able to include a subset of the test cases used for grading (e.g., JUnit or ScalaUnit tests) along with each project. Preferably, I'd like these test cases to be compiled, and I'd like for students to be able to execute them using a task/goal similar to sbt test
.
Two Questions (and perhaps some more):
- What's the easiest way to accomplish this?
- What's a secure way to implement this?
Right now, I'm thinking of including a JAR file with each assignment that contains a subset of the test cases. I can write a plugin that forks the JVM and executes the test cases and reports the results. This leads to the following questions:
- Would it be better to setup my own Maven/Ivy repository the assignment test cases and have the plugin include them on a per-assignment basis?
- Can SBT do this without me having to write a plugin?
Thanks!