I am working on making a system for the automated testing of student assignments. The biggest hurdle I am facing right now is figuring out how to sandbox the testing of the code yet still get and process the results of the test. I need to run it on a VM as there is no guarantee the code will not be malicious.
I would like to have a process similar to the following:
- Student submits assignment
- VM is created and is given the source code submitted by the student
- VM runs the tests on the source code
- VM returns results of the test back to the host operating system
- Results are processed
Steps 2 and 4 are the ones I am looking for a good solution for. I am not sure what would be a good way automate the passing of files to the VM and the passing of results back from the VM. It seems like this is a problem that might have a solution already and I would rather not reinvent the wheel.