help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: TDD and BDD for emacs-lisp


From: Xavier Maillard
Subject: Re: TDD and BDD for emacs-lisp
Date: Thu, 02 Jun 2016 15:20:43 -0000
User-agent: Gnus (5.13), GNU Emacs 24.5.1 (x86_64-apple-darwin15.3.0)

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


reply via email to

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