From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xavier Maillard Newsgroups: gmane.emacs.help Subject: Re: TDD and BDD for emacs-lisp Date: Thu, 28 Apr 2016 23:05:02 +0200 Organization: A noiseless patient Spider Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1464881669 17763 80.91.229.3 (2 Jun 2016 15:34:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 2 Jun 2016 15:34:29 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 02 17:34:28 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 1b8Udb-0005qw-Vo for geh-help-gnu-emacs@m.gmane.org; Thu, 02 Jun 2016 17:34:24 +0200 Original-Received: from localhost ([::1]:48055 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8Udb-0005sW-2Z for geh-help-gnu-emacs@m.gmane.org; Thu, 02 Jun 2016 11:34:23 -0400 Original-Path: usenet.stanford.edu!goblin2!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 56 Injection-Info: mx02.eternal-september.org; posting-host="d979e6b3555cfd8d6df644de4e29a754"; logging-data="16627"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+T0oxZsZDijSBkdxLjHaBK" User-Agent: Gnus (5.13), GNU Emacs 24.5.1 (x86_64-apple-darwin15.3.0) X-Accept-Language: en, fr Cancel-Lock: sha1:gRfkFv9LT0uN3OZH6nmugaI54wY= sha1:QDAcCTqLN0tlOCL7Zfmp6zgRJJs= X-GPG-FINGERPRINT: 9983 DCA1 1FAC 8DA7 653A F9AA BA49 09B7 8F04 DE1B X-Home-Page: https://xavier.maillard.im X-GPG: 0xBA4909B78F04DE1B Original-Xref: usenet.stanford.edu gnu.emacs.help:217544 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:110186 Archived-At: phillip.lord@russet.org.uk (Phillip Lord) writes: > 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. 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