unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: joakim@verona.se
To: Lennart Borgman <lennart.borgman@gmail.com>
Cc: Nikolaj Schumacher <me@nschum.de>,
	web@shellarchive.co.uk, Masatake YAMATO <yamato@redhat.com>,
	ohler+emacs@fastmail.net, emacs-devel@gnu.org,
	rubikitch <rubikitch@ruby-lang.org>,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	Phil Hagelberg <phil@hagelb.org>
Subject: Re: unit test framework
Date: Tue, 23 Mar 2010 10:02:47 +0100	[thread overview]
Message-ID: <m3k4t3fm14.fsf@verona.se> (raw)
In-Reply-To: <e01d8a51003180756l43c0c2dbp8e59a66a1b472027@mail.gmail.com> (Lennart Borgman's message of "Thu, 18 Mar 2010 15:56:51 +0100")

Lennart Borgman <lennart.borgman@gmail.com> writes:

> On Thu, Mar 18, 2010 at 3:22 PM, Stefan Monnier
> <monnier@iro.umontreal.ca> wrote:
>>> Do you have a plan to include an elisp library for unit
>>> testing in Emacs-24?
>>
>> It's not in the current plan, but I'm in favor of adding such
>> a thing, yes.  I simply don't have the time and energy to delve much
>> into it.
>>
>>> I've tried some and I'm using ert.el written by Christian M. Ohler.
>>>      http://github.com/masatake/ert/blob/master/ert.el>
>> If other people can chime in on the various options and form
>> a consensus, that would be wonderful.
>
>
> I asked long ago for a comparision on EmacsWiki:
>
>   http://www.emacswiki.org/cgi-bin/wiki/UnitTesting
>
> However there have not been any interest in that. If have cc:ed the
> unit test framework authors, maybe they want to say something.
>
> I am not sure which of them have signed papers:
>
>   ert: Christian Ohler
>   elunit: Phil Hagelberg
>   elk-test: Nikolaj Schumacher
>   etest: Phil Jackson
>   el-mock: rubikitch
>
>
>>        Stefan
>>
>>
>> PS: One thing for which I'd like to be able to use such a test framework, is
>> to link tests<->bug numbers<->commits.

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.

- some way of isolating test runs from normal operations

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

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



-- 
Joakim Verona




  parent reply	other threads:[~2010-03-23  9:02 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-18  7:39 unit test framework Masatake YAMATO
2010-03-18  9:31 ` Lennart Borgman
2010-03-18 10:07   ` Leo
2010-03-18 10:23     ` Lennart Borgman
2010-03-18 11:25     ` Masatake YAMATO
2010-03-18 14:22 ` Stefan Monnier
2010-03-18 14:56   ` Lennart Borgman
2010-03-19  0:16     ` rubikitch
2010-03-19 19:00     ` Phil Hagelberg
2010-03-20 11:01     ` Nikolaj Schumacher
2010-03-23  9:02     ` joakim [this message]
2010-03-23 13:15       ` Lennart Borgman
2010-03-24  3:03         ` Masatake YAMATO
2010-03-23 14:22       ` Stefan Monnier
2010-04-13 10:32         ` joakim
2010-06-12  6:06           ` Christian Ohler
2010-06-12 13:48             ` Lennart Borgman
2010-06-14 11:24             ` Masatake YAMATO
2010-07-23 21:58             ` Stefan Monnier
2010-03-23 10:15     ` Philip Jackson
2010-06-27 18:50   ` Philip Jackson
2010-07-09 13:43     ` Christian Ohler
2010-07-09 23:01       ` Glenn Morris
2010-07-10  1:12         ` Christian Ohler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3k4t3fm14.fsf@verona.se \
    --to=joakim@verona.se \
    --cc=emacs-devel@gnu.org \
    --cc=lennart.borgman@gmail.com \
    --cc=me@nschum.de \
    --cc=monnier@iro.umontreal.ca \
    --cc=ohler+emacs@fastmail.net \
    --cc=phil@hagelb.org \
    --cc=rubikitch@ruby-lang.org \
    --cc=web@shellarchive.co.uk \
    --cc=yamato@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).