Consider this simple test of addition.
Click the following link (the run script) to retrieve this page processed by the framework.
How This Works
When you run this example your browser retrieves the page twice: once from the wiki server and then again from the run script. The run script answers the page with the test results marked in pastel red or green. To do this the run script must do two things. It must ...
We use a unix utility program to retrieve the private copy of the refering web page. There are probably lots of utilities like this but the ones we know about are the following.RunMeFirst.) The run script uses the WikiRunner variation of the FileRunner so that the extra tables wiki uses for page layout aren't confused with test data tables inside that layout.
The run script creates two files, one is a temp file that holds the results until the runner completes. This is then sent back to your browser so you see the results right on top of the original page. The second file is a transcript of the error output from the run. Normally this is just a report of things the framework counts:
76 right, 12 wrong, 0 ignored, 0 exceptionsWe log the error output so that you can see this message. Its also handy for us to track down problems when we get our server misconfigured. You can look at the most recently recorded long with this link.
This link will let you see the source for the run script we are using right now on fit.c2.com. There are a handful of other lines we had to write to get this to work in our server environment, but most of the work is done in two lines that correspond to the two steps we mentioned above.
We could have taught our runner to retrieve the page directly but didn't think of that until the run script was already written.
MichaelNestler wrote this PerlRunScript.
I run this script on my Apple iBook. This required two adjustments. First, I modified the /etc/httpd/httpd.conf so that Apache would run the script. Here is the diff:
397c397 < Options Indexes FollowSymLinks MultiViews --- > Options Indexes FollowSymLinks MultiViews ExecCGI 865c866 < #AddHandler cgi-script .cgi --- > AddHandler cgi-script .cgiSecond, I also had to make sure that the server (which ran the script) had permission to access all the files cited by the script. I did this by actually putting all the files in a server subdirectory and using symbolic links to coax my IDEs (IntelliJ and Eclipse) to write class files there.
For the ObjectiveCeePlatform, the run script for Apache on my iBook is just slightly different from the Java runscript.
curl $HTTP_REFERER >Documents/$$ # calls curl instead of lynx FileRunner Documents/$$ Reports/$$ # runs the ObjC file runner
|Last edited December 13, 2003
Return to WelcomeVisitors