lein test

Runs tests for Leiningen projects.


Leiningen 2.9.1


OpenJDK 11

Supported Languages

Clojure ClojureScript

Official Documentation


YAML Configuration


  • input:

    Patterns to include in reports.

    Note: The input patterns are not applied when running lein test since lein test performs a regular build to run tests and the files excluded by the patterns may be required for the build. Therefore, the files excluded by the patterns are always processed and you may even see logs related to the excluded files in the job console. However, Inspecode eventually ignores any issues detected on the excluded files when generating job reports.

  • ignore:

    Patterns to exclude from reports.

    Note: Just like input:, the ignore patterns are not applied when running lein test.

  • auto-fix:


  • config-file:

    Below is the list of options that are supported:

    :only        Run selected tests.
                 For example, `lein test :only leiningen.test.test/test-default-selector`
                 only runs the specified test.
    :all         Run all tests.
    --selectors  Specify test selectors.
  • machine:

    • cpu:

      Amount of CPU. The default machine has 0.75 CPU with 2880 MiB RAM.

      Inspecode configures the maximum heap size (-Xmx) of the Java virtual machine (JVM) by applying a custom profile with :jvm-opts according to this value. Inspecode reserves 240 MiB RAM for system, and makes the rest of RAM available to JVM for heap allocation. For example, -Xmx2640m is specified by default (for 0.75 CPU), -Xmx5520m is specified for 1.5 CPU.

  • options:


  • thresholds:

    • num-issues:

      No tool specific severity levels are available.

  • experimental:

    • incremental:


      Note: The incremental analysis cannot be supported for lein test. This is because lein test performs a regular build with requiring all build dependencies and the results on unchanged files can be affected by changed files.

YAML Examples

  • With default options:

      lein-test: default
  • With custom options:

          :only: leiningen.test.test/test-default-selector
  • With custom options (2):

          --selectors: :integration
  • With custom machine:

          cpu: 1.5 # 1.5 CPU, 5760 MiB RAM

Multiple Projects In Single Repository

If there are multiple Leiningen projects (project.clj files) in single repository, Inspecode detects them and then runs lein test for each project.

Resolving Dependencies

Before running the tool, Inspecode automatically searches your repository for project.clj files and runs lein deps at each directory where project.clj is placed.

results matching ""

    No results matching ""