[ANN] JUnitTestPlugin 0.24.1 available for Aurora

A quick fix to the NoClassDefFountError that crippled 0.24

  • Fix detection of test class/tested class when used in project with multiple modules

  • Fix method template for tested method that throw an exception

  • Fix button to go from config to template editor


http://plugins.intellij.net/plugins/view/?id=unitTest
http://www.intellij.org/twiki/bin/view/Main/JUnitTestPlugin

3 comments
Comment actions Permalink

Jacques Morel wrote:

A quick fix to the NoClassDefFountError that crippled 0.24


Works like a charm! Nice!
Small question - the 'no unittest' pins for constructors disappear as
soon as a unittest for 1 of them (the default ctor) is provided. Is
this intentional?

Also, I made a few small changes to the testcase template others may
find useful: omitted packagename if test-package is the same as the
tested-class package, provide overridden setup & teardown methods (I now
- you can easily override them yourself, but I find myself doing that
most of the time), and provide default static suite() method. Attached.

CU,
Edwin
package $; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; #if ($ != "" && $ != "" && $ != $)
import $.$; #end #parse("File Header.java") public class $ extends TestCase { #if ($ != "")
$ $;
#end

protected void setUp() throws Exception {
super.setUp();
}

protected void tearDown() throws Exception {
super.tearDown();
}

public static Test suite() {
TestSuite suite = new TestSuite();
suite.addTestSuite(${NAME}.class);
return suite;
}
}
#parse("File Footer.java")

0
Comment actions Permalink

No it isn't intentional ;)
It is a bug.

As far as the setup/teardown I was entertaining the idea of having a intention/refactoring to move constructs to the setup/teardown. However I still have to do the multi-pattern support and multi-test class support.
I am also looking at ways to discover tests that indirectly test classes (through collaboration...). This might make possible to add a "Run affected tests" action... ;)

Jacques

0
Comment actions Permalink

Jacques Morel wrote:

No it isn't intentional ;) It is a bug.

;)

As far as the setup/teardown I was entertaining the idea of having a
intention/refactoring to move constructs to the setup/teardown.


Nice. Automagically creating them as you go? Yes, that would work for me 8-)

I am also looking at ways to discover tests that indirectly test
classes (through collaboration...). This might make possible to add a
"Run affected tests" action... ;)


Sounds very neat - and quite complicated - although I guess you'll get
some support from the newly opened (and documented! yay!) PSI?

CU,
Edwin

0

Please sign in to leave a comment.