Skip to content

rejeep/ert-runner.el

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
bin
 
 
 
 
 
 
 
 
 
 
 
 
 
 

ert-runner.el

Ert-runner is a tool for Emacs projects tested using Ert. It assumes a certain test structure setup and can therefore make running tests easier.

Installation

Add ert-runner to your Cask file:

(depends-on "ert-runner")

Usage

View usage information:

$ cask exec ert-runner help

Test files should be placed under the test/ directory as *-test.el files. Or let ert-runner create the test directory and files for you:

$ cask exec ert-runner init

Run all tests:

$ cask exec ert-runner

Run specific tests:

$ cask exec ert-runner test/foo-test.el test/bar-test.el

Run test whose name matches a pattern:

$ cask exec ert-runner -p pattern

Load custom files before running tests:

$ cask exec ert-runner -l test/custom.el

Run all tests whose name matches emacs-23-only and load ert.el from vendor since it's not included in Emacs-23:

$ cask exec ert-runner -p emacs-23-only -l vendor/ert.el

Run all tests which are tagged emacs-23-only or all-emacsen:

$ cask exec ert-runner -t emacs-23-only,all-emacsen

Run all tests which are not tagged emacs-24-only:

$ cask exec ert-runner -t !emacs-24-only

Run all tests, whose name matches request, and which are tagged fast or important, but not network:

$ cask exec ert-runner -p request -t fast,important -t !network

Run in "no win" mode:

$ cask exec ert-runner --no-win

Configuration

You can add a .ert-runner file (one option per row) with options you always want to include, for example:

-l test/ert-loader.el

Projects using

Contribution

Contribution is much welcome!

Install cask if you haven't already, then:

$ cd /path/to/ert-runner.el
$ cask

Run all tests with:

$ make

About

Opinionated Ert testing workflow

Resources

Stars

Watchers

Forks

Packages

No packages published