Skip to content
Emit Clojure test output in Junit XML format and optionally automatically invoke HTML generation
Find file
Failed to load latest commit information.
doc Initial commit.
src Add alternative options for setting the output directory.
.gitignore Initial commit Update version info in


Clojars Project

A leiningen plug-in to output test results to JUnit XML format.

These files can be used, e.g., with junitreport for creating reports in HTML format.

You can tweak some setting via your project.clj file:

  ; specify your output directory
  :test2junit-output-dir "test-results"

  ; to run ant automatically
  :test2junit-run-ant true

Example junit report output based on the output as generated by this plug-in is available at:

To use this plug-in simply add [test2junit "1.2.1"] either to your ~/.lein/profile.clj or as development dependency to an individual project. test2junit requires Leiningen 2.x.

Usage Example

Below is an example for globally adding test2junit via the ~/.lein/profiles.clj file:

{:user {:plugins [[test2junit "1.2.1"]]}}

Or you can just add it to your development profile like so:

:profiles {:dev {:plugins [[test2junit "1.2.1"]]}}

An example for the project specific setting can be found in:

This will enable you to use the plugin from your terminal:

$ lein test2junit


Copyright © 2013 Ruediger Gad, et al. (See src/test2junit/junit.clj).

Distributed under the Eclipse Public License, the same as Clojure.

Something went wrong with that request. Please try again.