Liking cljdoc? Tell your friends :D

boot.test


clojurize-summariesclj

(clojurize-summaries java-summaries)

Transform Java to Clojure summaries, for instance converting keys to keywords. Returns a map of summaries indexed by command string (the boot in boot command executed, see command-str).

Transform Java to Clojure summaries, for instance converting keys to
keywords. Returns a map of summaries indexed by command string (the
boot in boot command executed, see command-str).
sourceraw docstring

deftesttaskcljmacro

(deftesttask & forms)

Define a test task. It enhances deftask so that tests can be run in parallel through boot.built-in/runtests.

Inside a task you can combine the clojure.test facilities testing, is, are, ... the only requirement is that your deftesttask follows boot's middleware pattern and return either the result of comp-ositing tasks or identity.

Example of declaration:

(deftesttask my-test "Testing." (with-pass-thru fs (testing "whatever" (is true "Whatever must be true"))))

When clojure.test/load-tests is false, deftesttask is ignored.

Define a test task. It enhances deftask so that tests can be run in
parallel through boot.built-in/runtests.

Inside a task you can combine the clojure.test facilities testing, is,
are, ... the only requirement is that your deftesttask follows boot's
middleware pattern and return either the result of comp-ositing tasks
or identity.

Example of declaration:

(deftesttask my-test
 "Testing."
  (with-pass-thru fs
    (testing "whatever"
      (is true "Whatever must be true"))))

When clojure.test/*load-tests* is false, deftesttask is ignored.
sourceraw docstring

inc-test-counterclj

(inc-test-counter & {:as *opts* :keys [help]})

No description provided.

Keyword Args: :help bool Print this help info.

No description provided.

Keyword Args:
  :help  bool  Print this help info.
sourceraw docstring

merge-summariesclj

(merge-summaries summaries)

Merge summaries. Note that it has to be in Clojure form already, see clojurize-summary.

Merge summaries. Note that it has to be in Clojure form
already, see clojurize-summary.
sourceraw docstring

namespaces->varsclj

(namespaces->vars pred namespaces)

Filter the input namespaces in order to get the test task vars according to pred, a 1-arity function that accepts a var in input and returns true it is to be considered a test var.

TODO: use transduce when switching Clojure 1.7.0

Filter the input namespaces in order to get the test task vars
according to pred, a 1-arity function that accepts a var in input and
returns true it is to be considered a test var.

TODO: use transduce when switching Clojure 1.7.0
sourceraw docstring

(print-summary! summary)

Print out (info) the summary. Note that it has to be in Clojure form already, see clojurize-summary.

Print out (info) the summary. Note that it has to be in Clojure form
already, see clojurize-summary.
sourceraw docstring

runtestsclj

(runtests & {:as *opts* :keys [help commands threads namespaces exclusions]})

Run boot-in-boot parallel tests and collect the results.

The default, no argument variant runs all the test tasks found in all the namespaces on the classpath, see boot.test/deftesttask on how to create test tasks.

If you want more control, there actually is a command mode and a namespace mode. To avoid clashing they are mutually exclusive, command mode takes precedence.

A command is the string you would use on the command line for running the task (after having it required in build.boot).

The namespaces option, instead, is self-explanatory and does not allow to specify additionally arguments to tasks.

Usage example at the command line:

$ boot runtests -c "foo-tests --param --int 5" -c "bar-tests"

Or in build.boot: (runtests :commands #{"foo-tests :param true :int 5" "bar-test"})

Last but not least, :threads is an integer that limits the number of spawned threads, defaulting to the canonical (-> (number of processors) inc inc).

Keyword Args: :help bool Print this help info. :commands ^:! #{str} The boot task cli calls + arguments (a set of strings). :threads int The maximum number of threads to spawn during the tests. :namespaces #{sym} The set of namespace symbols to run tests in. :exclusions #{sym} The set of namespace symbols to be excluded from test.

Run boot-in-boot parallel tests and collect the results.

The default, no argument variant runs all the test tasks found in all the
namespaces on the classpath, see boot.test/deftesttask on how to create test
tasks.

If you want more control, there actually is a command mode and a namespace
mode. To avoid clashing they are mutually exclusive, command mode takes
precedence.

A command is the string you would use on the command line for running the
task (after having it required in build.boot).

The namespaces option, instead, is self-explanatory and does not allow to
specify additionally arguments to tasks.

Usage example at the command line:

    $ boot runtests -c "foo-tests --param --int 5" -c "bar-tests"

Or in build.boot:
    (runtests :commands #{"foo-tests :param true :int 5"
                          "bar-test"})

Last but not least, :threads is an integer that limits the number of spawned
threads, defaulting to the canonical (-> (number of processors) inc inc).

Keyword Args:
  :help            bool    Print this help info.
  :commands    ^:! #{str}  The boot task cli calls + arguments (a set of strings).
  :threads         int     The maximum number of threads to spawn during the tests.
  :namespaces      #{sym}  The set of namespace symbols to run tests in.
  :exclusions      #{sym}  The set of namespace symbols to be excluded from test.
sourceraw docstring

set-summaryclj

(set-summary & {:as *opts* :keys [help]})

No description provided.

Keyword Args: :help bool Print this help info.

No description provided.

Keyword Args:
  :help  bool  Print this help info.
sourceraw docstring

set-summary-data!clj

(set-summary-data! data)

Set the test summary in the (shared) sync map for this pod

Set the test summary in the (shared) sync map for this pod
sourceraw docstring

summary-errorsclj

(summary-errors summary)

Retrieve the number or errors in a summary. Note that it has to be in Clojure form already, see clojurize-summary.

Retrieve the number or errors in a summary. Note that it has to be in
Clojure form already, see clojurize-summary.
sourceraw docstring

test-exitclj

(test-exit & {:as *opts* :keys [help]})

Adds the ability to exit from the test with the right code, it simply parses the input summaries and call boot.util/exit-errors in case of failures or errors.

You can omit this task if you don't care about having the return code not equal to zero (for instance during continuous testing in development).

Keyword Args: :help bool Print this help info.

Adds the ability to exit from the test with the right code, it simply parses
the input summaries and call boot.util/exit-errors in case of failures or
errors.

You can omit this task if you don't care about having the return code not
equal to zero (for instance during continuous testing in development).

Keyword Args:
  :help  bool  Print this help info.
sourceraw docstring

test-me-predclj

Return true when boot.test/test-task meta on the var is boot.test/test-me.

Return true when boot.test/test-task meta on the var is
boot.test/test-me.
sourceraw docstring

test-reportclj

(test-report & {:as *opts* :keys [help]})

Boot's default test report task, it prints out the final summary.

The usual -v/-vv control the verbosity of the report.

Keyword Args: :help bool Print this help info.

Boot's default test report task, it prints out the final summary.

The usual -v/-vv control the verbosity of the report.

Keyword Args:
  :help  bool  Print this help info.
sourceraw docstring

test-taskclj

(test-task task)

Create a boot test task by wrapping other tasks, either the result of deftask or comp. Another way to say it is that a boot middleware should be passed here.

Create a boot test task by wrapping other tasks, either the result of
deftask or comp. Another way to say it is that a boot middleware
should be passed here.
sourceraw docstring

testing-contextclj

(testing-context & {:as *opts* :keys [help]})

No description provided.

Keyword Args: :help bool Print this help info.

No description provided.

Keyword Args:
  :help  bool  Print this help info.
sourceraw docstring

update-bodyclj

(update-body forms f)

Given the split vector returned by split-deftask-forms, rebuild the correct forms for the deftask macro, replacing body with the one returned by (f old-body).

Given the split vector returned by split-deftask-forms, rebuild the
correct forms for the deftask macro, replacing body with the one
returned by (f old-body).
sourceraw docstring

var->commandclj

(var->command var)

Return a string representing the task command to trigger (needed in runboot).

Return a string representing the task command to trigger (needed in
runboot).
sourceraw docstring

with-report-countersclj

(with-report-counters & {:as *opts* :keys [help]})

No description provided.

Keyword Args: :help bool Print this help info.

No description provided.

Keyword Args:
  :help  bool  Print this help info.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close