Authors:
rjackson
free software

JUnit 4 Synchronizer

Products: IntelliJ IDEA

Vendor: Russ Jackson

Email:

Website: N/A

Description:

Creates JUnit 4 test classes/methods for source methods annotated with the @Testable annotation. The test classes are created in a 'test' package, inside which the application package structure is duplicated. The 'test' package will be created if it does not already exist. The @Testable annotation is created automatically in the 'test' package the first time the synchronizer is run. @Testable currently has a single attribute whereby you can override the name of the test method to be created. For example, @Testable("testIntegerAddition") would create a test method named 'testIntegerAddition'. If no name attribute is specified a default name will be created that consists of the name of the annotated method prefixed with 'test'. Test classes will only be created for those source classes with at least one method annotated with @Testable. This plugin is available from the 'Tools' menu or from the project view popup menu as 'Synchronize JUnit Tests'. Instructions: #1 - RunSynchronize JUnit Tests once to create the @Testable annotation. #2 - Annotate desired source methods with @Testable annotation. #3 - Run Synchronize JUnit Tests to create test methods. #4 - Repeat steps 2 and 3 as often as desired to create new unit tests. Note 1: If you have a multi-module project simply copy the @Testable annotation from the first module (as created during step 1 above) into 'test' packages in the additional modules and proceed with steps 2 thru 4 to create the unit tests for these modules. Note 2: An enhancement request has been submitted to JUnit.org (via SourceForge.net) to include the @Testable annotation in the JUnit 4 framework.
Downloads: 9780
Rating:
Participated in rating: 4
Version Since Build Until Build File/URL Size (Kb) Date Details
0.1.1. 60.6107. . Download 23.56 2007-01-02 23:52:07 details
. .
2 updates are hidden show all updates

General usage instructions:

This plugin is available from the \'Tools\' menu or from the project view popup menu as \'Synchronize JUnit Tests\'. Run the plugin once to create the necessary @Testable annotation. Once this annotation is created you can use it to annotate the methods you want to create test units/methods for. Once you have annotated your methods run the plugin from one of the menus to create the appropriate test methods/classes.

Comments:

Anonymous
2010-03-04 12:53:30
Have just tried using this on a new install of IntelliJ - and get the same error as mentioned below, i.e.:

java.lang.NoSuchMethodError: com.intellij.openapi.project.Project.getAllScope()Lcom/intellij/psi/search/GlobalSearchScope;

What is the issue here?
.
Anonymous
2010-01-13 17:53:02
I'm getting the same error... I wonder why this plugin is part of the IntelliJ help pages for IDEA9.0
.
Anonymous
2009-09-27 18:55:53
any solution to the NoSuchMethodError?

Error during dispatching of java.awt.event.MouseEvent[MOUSE_RELEASED,(86,503),absolute(196,669),button=1,modifiers=Button1,clickCount=1] on ###overrideRedirect###: com.intellij.openapi.project.Project.getAllScope()Lcom/intellij/psi/search/GlobalSearchScope;
java.lang.NoSuchMethodError: com.intellij.openapi.project.Project.getAllScope()Lcom/intellij/psi/search/GlobalSearchScope;
at com.rjackson.intellij.plugin.junit.JUnitGeneratorAction.init(JUnitGeneratorAction.java:209)
.
Anonymous
2009-07-02 05:02:57
I get the same exception too:

rror during dispatching of java.awt.event.MouseEvent[MOUSE_RELEASED,(59,169),absolute(472,215),button=1,modifiers=Button1,clickCount=1] on ###overrideRedirect###: com.intellij.openapi.project.Project.getAllScope()Lcom/intellij/psi/search/GlobalSearchScope;
java.lang.NoSuchMethodError: com.intellij.openapi.project.Project.getAllScope()Lcom/intellij/psi/search/GlobalSearchScope;
at com.rjackson.intellij.plugin.junit.JUnitGeneratorAction.init(JUnitGeneratorAction.java:209)
.
Anonymous
Rated:
2009-03-17 13:00:39
I can't get it to work in 8.1 I get the following the first and every time i run it:
java.lang.NoSuchMethodError: com.intellij.openapi.project.Project.getAllScope()Lcom/intellij/psi/search/GlobalSearchScope;
at com.rjackson.intellij.plugin.junit.JUnitGeneratorAction.init(JUnitGeneratorAction.java:209)
at com.rjackson.intellij.plugin.junit.JUnitGeneratorAction.actionPerformed(JUnitGeneratorAction.java:58)
at
.
Anonymous
2009-01-03 12:55:11
Can anyone send me how to configure,create,run tests using junit 4 synchronizer??
or give me any link related to this??
I am using IntelliJ IDEA 6.0.4 .
.
Anonymous
Rated:
2008-02-12 07:39:10
Can anyone send me how to configure,create,run tests using junit 4 synchronizer??
or give me any link related to this??
I am using IntelliJ IDEA 7.0.2 .
But the annotation @Testable is not working in test methods..
.
Anonymous
2008-02-12 07:37:33
Can anyone send me how to configure,create,run tests using junit 4 synchronizer??
or give me any link related to this??
I am using IntelliJ IDEA 7.0.2 .
But the annotation @Testable is not working in test methods..
.
Anonymous
Rated:
2008-01-25 20:58:24
Same as above, you're forcing me to use your chosen test directory structure making this effectively unusable. I never intermingle tests with my src, that's why we have different directories in idea for them and the ability to classify each separately.

Too bad had potential.
.
Anonymous
Rated:
2007-11-21 01:17:33
What on earth is an "annotation"?
.
Anonymous
2007-10-18 05:46:11
Nifty idea, but how do I change the default test directory and package? I was going to put my test classes under a "test" dir and/or use a standard maven structure. Doesn't seem to be a way to handle it.
.