views:

43

answers:

1

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:

  1. I don't know how to interact with Squeak from the shell - e.g. how can I load some image and then run a set of specific commands there? I looking for examples online but couldn't even manage to load an image.
  2. I tried to keep everything inside Squeak but it turns out loading a source file which contains existing classes does not only overrides the existing classes (which is okay) but also makes all previous references to these classes become invalid, making me unable to re-run the tests.

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").

+2  A: 

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:

Lukas Renggli
Thanks you; it indeed seems like an overkill for my needs, but an overkill is a kill after all.
Oak