Integrate testing with your editor

jdavidb on 2003-11-18T16:30:58

Emacs (and maybe some versions of vi) can integrate with your compiler, running the compile for you and automatically jumping to the line in your code where the compiler indicates an error.

What if your editor were integrated with your test suite? It could run the test suite for you and jump to the location in your test program where a test failed. You could then use whatever etags-like feature your editor provides to jump to the routine that failed.

Just a thought. I keep thinking I'd like to become an editor wizard but haven't done it yet.


a fantastic non-Perl editor doing this

lachoy on 2003-11-18T16:54:12

The latest beta of IntelliJ IDEA has fantastic integration with JUnit, the defacto standard for unit testing in Java. Here's an ObScreenshot with some illustrations.

IDEA is so good that I find myself wishing for Perl refactoring capabilities in XEmacs....

Re:a fantastic non-Perl editor doing this

dws on 2003-11-18T17:14:15

Eclipse can also play nice with JUnit.

prove to the rescue

petdance on 2003-11-18T17:52:53

Please note that Test::Harness now has a command-line program, prove, specifically designed for single-test testing.

Great Idea

samtregar on 2003-11-18T19:00:26

That sounds cool. All you'll need to do is tweak Test::Harness to produce output in the expected 'filename:line:col' format output by GCC (among others). Then I think a 'M-x compile' run with 'make test' will do what you want.

-sam