From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: joakim@verona.se Newsgroups: gmane.emacs.devel Subject: Re: unit test framework Date: Tue, 23 Mar 2010 10:02:47 +0100 Message-ID: References: <20100318.163911.560917315840337376.yamato@redhat.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1269335037 13366 80.91.229.12 (23 Mar 2010 09:03:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 23 Mar 2010 09:03:57 +0000 (UTC) Cc: Nikolaj Schumacher , web@shellarchive.co.uk, Masatake YAMATO , ohler+emacs@fastmail.net, emacs-devel@gnu.org, rubikitch , Stefan Monnier , Phil Hagelberg To: Lennart Borgman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 23 10:03:50 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Nu01e-0008Ml-0b for ged-emacs-devel@m.gmane.org; Tue, 23 Mar 2010 10:03:50 +0100 Original-Received: from localhost ([127.0.0.1]:33400 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nu01d-0000VP-Ib for ged-emacs-devel@m.gmane.org; Tue, 23 Mar 2010 05:03:49 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nu00x-0000EN-AU for emacs-devel@gnu.org; Tue, 23 Mar 2010 05:03:07 -0400 Original-Received: from [140.186.70.92] (port=44624 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nu00v-0000Dk-Rr for emacs-devel@gnu.org; Tue, 23 Mar 2010 05:03:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nu00t-0004r3-IG for emacs-devel@gnu.org; Tue, 23 Mar 2010 05:03:05 -0400 Original-Received: from iwfs.imcode.com ([82.115.149.64]:48085 helo=gate.verona.se) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nu00t-0004qX-8i for emacs-devel@gnu.org; Tue, 23 Mar 2010 05:03:03 -0400 Original-Received: from localhost.localdomain (IDENT:1005@localhost [127.0.0.1]) by gate.verona.se (8.13.4/8.11.4) with ESMTP id o2N92lBP006696; Tue, 23 Mar 2010 10:02:48 +0100 In-Reply-To: (Lennart Borgman's message of "Thu, 18 Mar 2010 15:56:51 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:122537 Archived-At: Lennart Borgman writes: > On Thu, Mar 18, 2010 at 3:22 PM, Stefan Monnier > 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. =A0I 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. >>> =A0 =A0 =A0http://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 > > >> =A0 =A0 =A0 =A0Stefan >> >> >> 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 need= lessly - convenient way of defining and running tests, in group or one-by-one --=20 Joakim Verona