emacs-devel
[Top][All Lists]
Advanced

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

Re: ert.el --- Emacs Lisp Regression Testing


From: Christian Ohler
Subject: Re: ert.el --- Emacs Lisp Regression Testing
Date: Sat, 05 Jan 2008 12:32:45 +0100

Lennart Borgman (gmail), 2007-12-31:

I will try to test it ;-)

Please do so -- perhaps by writing a few test cases for Emacs ;-)


One thing that might be handy is something that runs selected entries in a new instance of Emacs, starting from either "emacs" or "emacs -Q". I think that is one of the most common things I do when I am testing.

ERT currently allows you to run your tests in a fresh emacs by running

    emacs -Q --batch --load my-tests.el --eval '(ert-run-tests-batch t)'

in a terminal (or possibly under M-x compile, but I haven't tried that).

However, that would be an edit-compile-run development cycle. I am much more productive programming and testing interactively in one single Emacs instance.

I see two main reasons for running tests in a separate Emacs: For testing without customizations (emacs -Q) or other Emacs versions, and for long-running test suites that you don't want to block your main Emacs instance with. So far, the above method was sufficient for me in those situations (because tests that have already succeeded in my Emacs rarely fail in a separate one, so I rarely missed ERT's interactive debugging facilities).

Maybe IELM could be used to implement a convenient interface for running an inferior Emacs that runs the tests (which could, in turn, involve running another nested Emacs in M-x term). This even sounds like an interesting project to implement. However, to get started building test suites for Emacs or Elisp packages, the current options are probably sufficient.

Christian.






reply via email to

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