Spring testing support in IntelliJ IDEA 10
August 4th, 2010 by serega.vasilievPlease try IntelliJ IDEA X (EAP) with new Spring testing related support. There is a number of things to note:
1. @ContextConfiguration support with completion, navigation, usages search and error highlighting

2. @TransactionConfiguration

3. All Spring related inspections, quick fixes and annotators are supported for corresponding TestContext Framework configurations.

Tried IntelliJ IDEA 10 EAP already? Let us know what you think!
Develop with pleasure!
The JetBrains Team
Tags: Code Completion, ideaX, Spring, Testing

August 4th, 2010 at 1:19 pm
I always use @ContextConfiguration annotation without locations parameter, so for example if Spring test case is named MyServiceTest Spring looks for MyServiceTest-context.xml file by convention. Would it be possible to have a shortcut to quickly jump between the Spring test case and XML files (similar to Ctrl + Shift + T - test case and class under test)?
If one does not use convention and provide locations parameter, this shortcut would jump to the file pointed by this parameter (or even display quick menu allowing to choose file if more than one specified).
August 17th, 2010 at 8:02 am
+1 for the fast navigation between the Test and the -context.xml file. That is what I would love to have all the time, when building Spring tests.
October 31st, 2010 at 5:17 am
Great feature! However, noticed a small issue when specifying @ContextConfiguration with Maven based projects. Only happens when @ContextConfiguration is without parameters.
It complains “Cannot find default app context file” for maven projects even if the default app context file exists in src/test/resources/x/x/MyTest-context.xml. I can overcome this issue with something like @ContextConfiguration(”/x/x/MyTest-context.xml”).
Also, default app context file creation (via ALT+ENTER) creates is in src/test/java instead of src/test/resources.