/lein-testem

Gotta test'em all.

Primary LanguageClojure

lein-testem

A Leiningen plugin that let's you test your Clojure projects with reduced configuration effort.

Build Status endorse

Experimental! This project is in flux and by no means stable (or maybe it is, no one knows yet). Feel free to open issues to help with lein-testem's development!

Usage

Leiningen (via Clojars)

Put the following into the :plugins vector of the :user profile in your ~/.lein/profiles.clj:

[lein-testem "0.1.0-alpha3"]

This plugin is destined for Leiningen >= 2.0.0.

Command Line

You can use lein-testem to automatically detect your current test framework(s) and run available tests.

$ lein testem 

The plugin will create profile combinations for testing by looking for those that overwrite/extend the top-level dependencies. Let's assume your project.clj looks like this:

(defproject my-project "0.1.0-SNAPSHOT"
  ...
  :dependencies [[org.clojure/clojure "1.5.1"] ...]
  :profiles {:test {:dependencies [[midje "1.5.1"]]
                    :plugins [[lein-midje "3.1.1"]]}
             :1.4 {:dependencies [[org.clojure/clojure "1.4.0"]]}}
  ...)

lein-testem will detect that you're using Midje (in the profile :test) for testing and that the profile :1.4 overwrites the artifact org.clojure/clojure of the top-level dependencies. It will then create a command similar to the following:

$ lein with-profile dev,test:dev,test,1.4 midje

You can run autotest functionality where available:

$ lein testem :autotest

Supported Frameworks

Roadmap

  • automatically provide/run common test scenarios (e.g. "test against Clojure versions >= 1.3.0")
  • ...

License

Copyright © 2013 Yannick Scherer

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