Alex Rivera | Logout

Eclipse function/plugin that finds corresponding junit class?

Asked 2009-09-09T12:49:45.397
13

I've been searching high and low for an Eclipse feature that lets you right-click on a main source class and find the corresponding JUnit class(es), without me having to navigate through the test classes of my project. I am using Mylyn which helps reduce the clutter but it would be much easier if there was a feature that performs a find automagically.

I am following the Maven standard directory layout (/src/main/java, /src/test/java, etc.). And all of my test classes are named *Test. I'd imagine this can be feasibly implemented and probably already exists.

Is there a function or plugin in Eclipse that finds the corresponding JUnit test classes for a given main class?

Edit
Report

1 Answer

6

This plugin claims to be able to do this, as well as other stuff.

An useful feature of this plugin is the ability to jump between similar class, e.g FooDAO to FooService, FooService to FooAction, etc. To use this feature, one needs to configure this first. To configure, please go to Windows -> Preferences ->Fast Code Preferences -> Mapping Btween Similar Classes. This is very similar to the configuration for create similar classes.

answered 2009-09-09T13:29:43.623

Your Answer