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: Phillip Lord
Subject: Re: TDD and BDD for emacs-lisp
Date: Thu, 28 Apr 2016 17:06:38 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.93 (gnu/linux)

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.

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



reply via email to

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