I am checking Squeak homework assignments submitted by my students. I have written an SUnit test case with a bunch of tests and now I want to run these on all submissions.
I would like to somehow automate - whether from inside Squeak or with shell scripts - the process of loading a student submission, running the test case on it, and saving the results in some format.
I've ran into two major problems:
More information: all students have submitted a source file (not an image file) with one or more classes inside, with all submissions containing at least one class with a specific name (say, "SubmissionClass").
You might want to check out the build scripts that Yanni Chiu originally posted in the Pharo mailing list and that I extended and published on GitHub http://github.com/renggli/builder.
The code probably provides too much functionality for your case, but it presents all the necessary steps that are also required in your task:
$OUTPUT_SCRIPT
contains the full path to a script that loads code and runs tests. This is a concatenation (line 105-108) of one or more of the scripts in http://github.com/renggli/builder/tree/master/scripts/.testrunner.st
loads a test-runer that is then used by the *-tests.st
scripts to run the actual tests and produce a report.SmalltalkImage current snapshot: false andQuit: true
.