diff options
author | Bozhidar Batsov <bozhidar@batsov.com> | 2018-04-17 20:18:52 +0300 |
---|---|---|
committer | Bozhidar Batsov <bozhidar@batsov.com> | 2018-04-17 20:18:52 +0300 |
commit | e0deb8e0698b148a620d0fa2ffee5b8762cc6f12 (patch) | |
tree | 72a9108342d93d3dbf47d188263cd00484ed65cf /doc/running_tests.md | |
parent | 9228edd20d2669e57be834e65fa312ec22d60a17 (diff) |
Update the part of the manual about test selectors
Diffstat (limited to 'doc/running_tests.md')
-rw-r--r-- | doc/running_tests.md | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/doc/running_tests.md b/doc/running_tests.md index 31f2c766..7baf8509 100644 --- a/doc/running_tests.md +++ b/doc/running_tests.md @@ -13,24 +13,25 @@ test namespace inference logic (e.g. you have some tests in the implementation namespace that were defined with `clojure.test/with-test`) - in such cases you should use <kbd>C-u C-c C-t C-n</kbd>, which will simply run whatever tests are present in the currently visited/active namespace. + You can also press <kbd>C-c C-t C-s</kbd> to run a subset of the tests defined in -the namespace prefiltered by a test selector. CIDER will ask you for this selector +the namespace filtered by test selectors. CIDER will ask you for those test selectors in the minibuffer. If you call this command with a prefix (<kbd>C-u C-c C-t C-s</kbd>) you can suppress the inference logic as for run tests for the namespace. You can also run all loaded tests with <kbd>C-c C-t l</kbd> or <kbd>C-c C-t C-l</kbd> and all tests within a project with <kbd>C-c C-t p</kbd> or <kbd>C-c C-t C-p</kbd> (note that this will load **all** namespaces in your -project). If you call these two with a prefix CIDER will ask for a test selector -and only run those tests in the project which are marked with that selector. Using +project). If you call these two with a prefix CIDER will ask for test selector filters +and only run those tests in the project which match the selector inclusions/exclusions. Using <kbd>C-c C-t t</kbd> or <kbd>C-c C-t C-t</kbd>, you can execute only the test at point. -Test selector is originally a `leiningen` feature see `lein help test` for some explanation. +Test selectors are originally a `leiningen` feature - see `lein help test` for some explanation. People use them to define subsets of tests usually run together for different purposes. For example you can mark some of your tests with the `^:smoke` metadata marker others with `^:integration`. This enables you to run these tests separately in your build pipeline. -This feature in CIDER helps you to run these subsets in your development environment. +This feature in CIDER helps you to run these test subsets in your development environment. All test commands are available in REPL buffers as well. There you can also use <kbd>,</kbd> to invoke some of the testing commands. @@ -42,7 +43,7 @@ Keyboard shortcut | Description --------------------------------|------------------------------- <kbd>g</kbd> | Run test at point. <kbd>n</kbd> | Run tests for current namespace. -<kbd>s</kbd> | Run tests for current namespace prefiltered with a selector. +<kbd>s</kbd> | Run tests for current namespace with selector filter. <kbd>l</kbd> | Run tests for all loaded namespaces. <kbd>p</kbd> | Run tests for all project namespaces. This loads the additional namespaces. <kbd>f</kbd> | Re-run test failures/errors. |