emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: unit test framework


From: Lennart Borgman
Subject: Re: unit test framework
Date: Tue, 23 Mar 2010 14:15:39 +0100

On Tue, Mar 23, 2010 at 10:02 AM,  <address@hidden> wrote:
>
> I write try to write unit tests for my elisp, and it would be much
> easier if there was a canonical unit test framework in Emacs.
>
> I have written some tests for CEDET, which doesnt really use a
> framework, and should be included in Emacs(I havent looked at the merged
> version yet). I have also written some tests in elunit for other
> packages.
>
> I'm currently writing some code that would benefit from simulation of
> keyboard input, in particular code that uses read, read-number,
> completing-read etc. Some of the contenders listed above surely does
> this, right?
>
> Anyway, maybe we should make a list of requirements for a unit test
> package for inclusion. Heres my take:
>
> - possibility to generate unit tests reports in test runs during "make"
>
> - at least rudimentary user input simulation, to test read, read-number,
> completing-read etc.


I have written some extensions to ert.el that allows running commands
in the test function (ie calling relevant hooks etc).


> - some way of isolating test runs from normal operations


I have some small things that starts a new Emacs instance for the tests.


> - good error reporting, so that you dont have to spend hours in edebug 
> needlessly


ert.el have good interactive reporting (that needs some usability
enhancements, like menu entries), but not so much for saving to file
(or maybe I have just missed that part).


> - convenient way of defining and running tests, in group or one-by-one


ert.el does it by regexp matching the names of the test functions.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]