[plt-scheme] Running student tests on student code

From: Jordan Johnson (jmj at fellowhuman.com)
Date: Tue Dec 15 22:43:09 EST 2009

Hi all,

Newbie question:  I have multiple suites of tests (check-expects  
culled from multiple files) that I want to run against multiple  
student homework handins.

This is essentially the code I'm working from in the tests file:

;;;;;
#lang scheme

(require htdp/testing scheme/sandbox)

(define e (make-module-evaluator <path-to-test-subject-file>))

(e '(begin
       ...first sequence of check-expects...
       (test)))

(e '(begin
       ...second sequence of check-expects...
       (test)))

;; etc.

However, I'm getting errors that tell me DrScheme is trying to create  
a temp file in the directory of the subject file, and failing because  
of sandbox restrictions.

Questions:
  - Is the htdp/testing lib the one requiring the aforementioned temp  
file?
  - Am I going off in the wrong direction trying to run check-expects  
this way?

and perhaps most importantly
  - is there a better way I'm unaware of?

I'm sure this is merely a sign I'm missing something in the docs, so  
if anyone can point me in the right direction I'd be grateful.

Best,
Jordan



Posted on the users mailing list.