TEST-SENDER
TEST-SENDER
is a some simple experimental code to run lisp-unit
tests on your code and send the results to a server. We're going to try using it
in class for tiny code competitions.
Install TEST-SENDER on your machine
Create a test-sender
folder in ~/quicklisp/local-projects/.
Download these two files into that folder. Be sure they are saved with their proper file extensions,
not .txt
.
- test-sender.asd -- the system definition file
- test-sender.lisp -- the actual code
Load TEST-SENDER into your Lisp
Start your Lisp.
Load your CS325 initialization file, if necessary.
Evaluate
(ql:quickload "test-sender")
If you get a project not found, evaluate
(ql:register-local-projects)
and try again. If it still doesn't work, check your ~/quicklisp/local-projects/ folder to make sure the files are there and correctly named.
Test TEST-SENDER
Create a new file in your Lisp editor. Copy and paste the following code into it.
(in-package :cs325-user) (test-sender:test-solution shorter (...) (defun shorter (x y) x) )
Replace the ... with your netid and your partner's, if you have one, e.g., (test-solution (aaa111 bbb222) ...)
.
Save this file under the name test-shorter.lsp where you keep your CS 325 exercise code.
Load the file into Lisp. Fix any errors.
Time to try sending test results! In Lisp, change to the CS325-user package, if necessary:
(in-package :cs325-user)
Now get the tests for shorter
from the server. This only needs to be done once.
(test-sender:test-get :shorter)
Then trying sending your (broken) solution for shorter
.
(test-sender:test-send)
If nothing is broken and the test server is working,
- your netids, code, and failing tests will be recorded on the server
- you get back a list with your netids and the number of failing tests