From: Xavier Maillard <xavier@maillard.im>
To: help-gnu-emacs@gnu.org
Subject: Re: TDD and BDD for emacs-lisp
Date: Thu, 28 Apr 2016 23:05:02 +0200 [thread overview]
Message-ID: <m0vb311m2p.fsf@ll.home> (raw)
In-Reply-To: mailman.1320.1461859606.7477.help-gnu-emacs@gnu.org
phillip.lord@russet.org.uk (Phillip Lord) writes:
> Xavier Maillard <xavier@maillard.im> 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.
I am too. I just discovered Cask weeks ago and I am totally convinced and
converted user. I did not think to « M-x compile »-it but that's a great
idea. Thanks for this tip.
> 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.
That's great.
> ecukes and buttercup, I cannot really vouch for one way or the
> other. The whole BDD doesn't entirely make sense to me.
Can you explain why ? As far as I read it, it seems one is « technical »
centric while the other is more « business » oriented which makes sense to
me. Also, it seems BDD is just a derived TDD more human oriented.
> Phil
Thanks for your time and suport
Xavier
next prev parent reply other threads:[~2016-04-28 21:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-28 6:50 TDD and BDD for emacs-lisp Xavier Maillard
2016-04-28 16:06 ` Phillip Lord
[not found] ` <mailman.1320.1461859606.7477.help-gnu-emacs@gnu.org>
2016-04-28 21:05 ` Xavier Maillard [this message]
[not found] <mailman.1236.1461826513.7477.help-gnu-emacs@gnu.org>
2016-04-28 17:59 ` Pascal J. Bourguignon
2016-04-28 21:10 ` Xavier Maillard
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m0vb311m2p.fsf@ll.home \
--to=xavier@maillard.im \
--cc=help-gnu-emacs@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.