The test runner takes three parameters:
- The slug of the exercise (e.g.
two-fer
). - A path to an input directory (with a trailing slash) containing the submitted solution file(s) and any other exercise file(s).
- A path to an output directory (with a trailing slash).
- A file named
results.json
will be written to the output directory. - The runner will exit with an exit code of 0 if it has run successfully, regardless of the status of the tests.
$ ./bin/run.sh <SLUG> <INPUT> <OUTPUT>
To run this project's tests (i.e. test the test runner):
$ ./bin/run-tests-in-docker.sh
To test against the full clojure track and compare with with the results snapshots:
- Clone the
exercism/clojure
repo to your local machine if you don't have it already - Run:
./bin/run-exercise-tests.clj path-to-clojure-repo
(defaults to../clojure
)
Build an uberjar:
$ clojure -A:uberjar
Run that uberjar:
$ java -jar clojure-test-runner.jar
The specification of the interface that the test runners must conform to is found in the track-tooling section of the v3-docs repo.
All content in this repository is copyright to Exercism and licenced under AGPL