https://github.com/yetanalytics/lrs-test-runner
Run the ADL conformance test suite from Clojure on the JVM.
https://github.com/yetanalytics/lrs-test-runner
conformance-test learning-record-store lrs xapi
Last synced: 3 months ago
JSON representation
Run the ADL conformance test suite from Clojure on the JVM.
- Host: GitHub
- URL: https://github.com/yetanalytics/lrs-test-runner
- Owner: yetanalytics
- License: apache-2.0
- Created: 2021-05-19T17:25:56.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-09-02T21:59:21.000Z (over 4 years ago)
- Last Synced: 2024-12-27T23:13:27.635Z (about 1 year ago)
- Topics: conformance-test, learning-record-store, lrs, xapi
- Language: Clojure
- Homepage: https://www.yetanalytics.com/lrs
- Size: 21.5 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# com.yetanalytics.lrs/test-runner
Run the [ADL LRS Conformance Test Suite](https://github.com/adlnet/lrs-conformance-test-suite) from clojure tests. Create per-test-run or per-test instances of the test suite.
## Usage
The tests show the 3 basic ways to use this:
``` clojure
;; manual
(deftest manual-test
(let [stop-fn (run-lrs)
test-suite-dir (-> (clone-test-suite)
install-test-suite!)
ret (:success? (run-test-suite*
test-suite-dir
"-e" "http://localhost:8080/xapi" "-b" "-z"))]
(is (true? ret))
(stop-fn)
;; cleanup
(delete-test-suite! test-suite-dir)))
;; Two different styles for using the dynamic var
;; macro
(deftest with-test-suite-test
(with-test-suite
(let [stop-fn (run-lrs)
ret (conformant? "-e" "http://localhost:8080/xapi" "-b" "-z")]
(stop-fn)
(is (true? ret)))))
;; fixture ;; (use-fixtures :once test-suite-fixture)
(deftest test-suite-fixture-test
(test-suite-fixture
#(let [stop-fn (run-lrs)
ret (conformant? "-e" "http://localhost:8080/xapi" "-b" "-z")]
(stop-fn)
(is (true? ret)))))
```
## Roadmap
This is basically a port of what `lrs` does, and assumes a working node/npm environment.
- [ ] Ensure node/npm environment
- [ ] Async shell (currently uses `clojure.java.shell`)
- [ ] Spec for test output, better output handling
- [ ] Logging control/config
## License
Copyright © 2021 Yet Analytics
Distributed under the Apache License version 2.0.