From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: phillip.lord@russet.org.uk (Phillip Lord) Newsgroups: gmane.emacs.help Subject: Re: TDD and BDD for emacs-lisp Date: Thu, 28 Apr 2016 17:06:38 +0100 Message-ID: <87zisd4t0x.fsf@russet.org.uk> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1461859636 28977 80.91.229.3 (28 Apr 2016 16:07:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 Apr 2016 16:07:16 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Xavier Maillard Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Apr 28 18:07:01 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1avoSy-0005Kt-8k for geh-help-gnu-emacs@m.gmane.org; Thu, 28 Apr 2016 18:07:00 +0200 Original-Received: from localhost ([::1]:49975 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avoSu-0004tU-Bf for geh-help-gnu-emacs@m.gmane.org; Thu, 28 Apr 2016 12:06:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avoSh-0004qA-UL for help-gnu-emacs@gnu.org; Thu, 28 Apr 2016 12:06:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1avoSd-0002Ih-TV for help-gnu-emacs@gnu.org; Thu, 28 Apr 2016 12:06:43 -0400 Original-Received: from cloud103.planethippo.com ([31.216.48.48]:46070) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avoSd-0002Id-Lq for help-gnu-emacs@gnu.org; Thu, 28 Apr 2016 12:06:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=russet.org.uk; s=default; h=Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:Cc:To:From; bh=d0wWnxOADtnZOoP2DhOb5YaagDfhfrzoGLZ49XEFxmY=; b=djDXuM7dzeVL2QQ5yDpf3vwlCy 91rF51ebgBHhuXgWQOBYcvubUFBi+mNVZFe9BH8+AHFqUe0YiY1vubbLyW2ZLh/7D08VVM6EXiFZl fcUXR1xoMiZL/82Vv9ctcEORzlSfRjWd3K5NXcO3+EnoXxy05BzRZkM9MA79pUdNnQS2i2IW0qD6Z wPtILI4QRFo8QVhTyfl7zechod18S+7e2h9l5/Nt0dW7Dnzn+MNH+NkyKuQ+PyD0kxsduJ4RgZmbs jh5mcaN0SzetU4Spa027LQN6aRY9yhE4apGuYC6L9CE0OH+oBvmYLlJZ5R5UAVzaqMXT5yVy/zlWd DnnKoVQA==; Original-Received: from janus-nat-128-240-225-60.ncl.ac.uk ([128.240.225.60]:32384 helo=russet.org.uk) by cloud103.planethippo.com with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.86_1) (envelope-from ) id 1avoSc-001RBL-Q5; Thu, 28 Apr 2016 17:06:38 +0100 In-Reply-To: (Xavier Maillard's message of "Thu, 28 Apr 2016 06:50:04 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.93 (gnu/linux) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cloud103.planethippo.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - russet.org.uk X-Get-Message-Sender-Via: cloud103.planethippo.com: authenticated_id: phillip.lord@russet.org.uk X-Authenticated-Sender: cloud103.planethippo.com: phillip.lord@russet.org.uk X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 31.216.48.48 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:109822 Archived-At: Xavier Maillard writes: > Hello, > > for my next project (an IM tool), I would like to try to embrace TDD/BDD > methodology. I have never done this before and I even do not know the way I > will have to change my coding habits. > > I have looked here and there to see if it is something emacs-lisp hackers > do, it seems that it has not spread much. > > So, what tool(s) do you use if you do your devs using TDD/BDD ? Do you have > simple examples to share ? Is it recommended to do both ? Where does one > shine more than another ? etc. (I will probably have to read tons of > documentation but that's fine). > > With ERT shipped with GNU emacs >= 24, there is no reason not to use it but > for BDD, I can see at least 2 (good) tools: ecukes and buttercup. Is there > any comparison chart somewhere ? > > Any help would be appreciated to start using TDD/BDD. I am a Cask (http://github.com/cask/cask/) junkie which provides really nice command line invocation of tests, supports multiple versions of Emacs, and runs in a headless environment. I normally run it inside M-x compile. Testing, I use ert.el. The framework is nice, but the reporting can be poor, and keeping tests independent is hard work (that's Emacs' fault rather than ert, I feel). So if I may be excused the plug, I've written assess (https://github.com/phillord/assess) which adds better reporting, macros for keeping Emacs tests free of side-effects, and adds some nice predicates (for roundtripping indentation, testing font-lock and so on). Probably, assess will go into core for Emacs-26 as ert-assess. ecukes and buttercup, I cannot really vouch for one way or the other. The whole BDD doesn't entirely make sense to me. Phil