### Invoking test-runner with clojure -X (exec style) in Bash Source: https://github.com/cognitect-labs/test-runner/blob/master/readme.md This command demonstrates how to run the `test-runner` using the `clojure -X` execution style, which calls the test function with a map of arguments. Arguments can be supplied via `:exec-args` in the alias or directly on the command line. It scans the project's `test` directory by default. ```Bash clj -X:test ...args... ``` -------------------------------- ### Invoking test-runner with clojure -M (clojure.main style) in Bash Source: https://github.com/cognitect-labs/test-runner/blob/master/readme.md This command illustrates how to run the `test-runner` using the older `clojure -M` (clojure.main) command-line style. This method allows for different command-line options compared to the `-X` style, typically using short flags like `-d`, `-n`, etc. ```Bash clj -M:test ...args... ``` -------------------------------- ### Running integration tests with clojure -X using includes in Bash Source: https://github.com/cognitect-labs/test-runner/blob/master/readme.md This command shows how to execute only tests tagged with the `:integration` metadata using the `clojure -X` style. The `:includes` option filters tests, ensuring only those matching the specified keyword are run. ```Bash clj -X:test :includes '[:integration]' ``` -------------------------------- ### Running integration tests with clojure -M using includes in Bash Source: https://github.com/cognitect-labs/test-runner/blob/master/readme.md This command demonstrates how to execute only tests tagged with the `:integration` metadata using the `clojure -M` style. The `-i` flag (short for `--include`) filters tests, ensuring only those matching the specified keyword are run. ```Bash clj -M:test -i :integration ``` -------------------------------- ### Configuring test-runner in deps.edn for Clojure Source: https://github.com/cognitect-labs/test-runner/blob/master/readme.md This snippet shows how to add `test-runner` as a dependency in your `deps.edn` file, typically within a `:test` alias. It configures an `extra-path` for test files, specifies the `test-runner` dependency, sets the main module for execution, and defines an `exec-fn` for `clojure -X` style invocation. ```Clojure ;; v0.5.1 :aliases {:test {:extra-paths ["test"] :extra-deps {io.github.cognitect-labs/test-runner {:git/tag "v0.5.1" :git/sha "dfb30dd"}} :main-opts ["-m" "cognitect.test-runner"] :exec-fn cognitect.test-runner.api/test}} ``` -------------------------------- ### Invoking test-runner with clojure -X and custom directories in Bash Source: https://github.com/cognitect-labs/test-runner/blob/master/readme.md This command shows how to specify multiple test directories when invoking `test-runner` using `clojure -X`. It uses single quotes to properly escape the Clojure vector of directory strings for the shell, allowing tests to be run from both 'test' and 'integration' directories. ```Bash clj -X:test :dirs '["test" "integration"]' ``` -------------------------------- ### Excluding integration tests with clojure -X in Bash Source: https://github.com/cognitect-labs/test-runner/blob/master/readme.md This command shows how to run all tests *except* those tagged with the `:integration` metadata using the `clojure -X` style. The `:excludes` option filters out tests matching the specified keyword. ```Bash clj -X:test :excludes '[:integration]' ``` -------------------------------- ### Tagging a Clojure test with metadata for inclusion/exclusion Source: https://github.com/cognitect-labs/test-runner/blob/master/readme.md This Clojure snippet demonstrates how to tag a `deftest` with metadata, such as `:integration`. This metadata can then be used by `test-runner` to selectively include or exclude tests during execution, enabling granular control over which tests are run. ```Clojure (deftest ^:integration test-live-system (is (= 200 (:status (http/get "http://example.com"))))) ``` -------------------------------- ### Excluding integration tests with clojure -M in Bash Source: https://github.com/cognitect-labs/test-runner/blob/master/readme.md This command demonstrates how to run all tests *except* those tagged with the `:integration` metadata using the `clojure -M` style. The `-e` flag (short for `--exclude`) filters out tests matching the specified keyword. ```Bash clj -M:test -e :integration ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.