Junit With Emacs

From: JunitWithIdes

Tips and tricks


Requested Features

Quick fix: To jump to the Test file in which there is an assertion error, e.g.,:
      junit.framework.AssertionFailedError?: expected:<5> but was:<4>
      at foo.FactorialTest?.testFac(FactorialTest?.java:30)

simply add the directory name of the Test file (which might be "./tests/foo/" in this case) to compilation-search-path. This way, when you press RET or next-error or click on the file name (which is "FactorialTest?.java" here), you will jump to the correct file at the error line (line #30 here).
     (add-to-list 'compilation-search-path "./tests/foo/")
-- SPK


CategoryEmacs


EditText of this page (last edited April 25, 2013) or FindPage with title or text search