"Navigate to Test" is only working one-way for me in IDEA 14

Hi,

I could use some troubleshooting help.


Something has definitely changed in IDEA 14 that is preventing this feature from working with my project structure. On IDEA 12 and 13, things were peachy.

I have a Java project with 2 modules (well, for simplicity's sake). The "main" module contains a source directory marked as "Source". The "test" module contains a source directory marked as "Test Source".

I can run the tests fine, and using IvyIDEA, I had no need to explicitly add a JUnit dependency.


Now, if I open a class from the "main" module, and hit ctrl+shit+t, I only get the "Create New Test" option.
If I were to open a class from the "test" module, ctrl+shit+t tells me exactly which class it's a test for. (naming pattern: just append "Test" to class name)

If I proceed with the "Create New Test" dialog, IDEA correctly identifies the test source directory to place the new test class.

I'm a bit stumped as to what could be the cause.

I've tried tweaking the "Compile" and "Test" dependencies settings, and I've also tried adding an JUnit library to my "main" module.


What else am I missing? Anything I can try?

0
11 comments

Up! Same for me...

0
Avatar
Permanently deleted user

I have a similar problem, but I thought it was because the module with the tests in it is marked as 'source'. (We have an old project with a non-standard structure, with other modules dependent on the test module, so it's marked as 'source').

Having said that, I'm pretty sure it used to work pre-14.

0
Avatar
Permanently deleted user

I actually have multiple test source directories spread across two separate modules (unit tests vs. integration tests). I've tried specifying only a single test source, but still no good. It doesn't appear to be a case of IDEA looking in the wrong test source directory out of several.

0

What tests you are using? Are the tests you want to navigate empty or not?
Thanks

0
Avatar
Permanently deleted user

I am using JUnit 4. It's attached to the module through resolving via IvyIDEA. But I've also tried adding the JUnit 4 jar as a project library.

The tests are not empty. They are existing test classes with non-ignored tests, all annotation-marked. The navigation works fine in IDEA 13, and I used to depend on it to tell me whether a test class has been written already.

0

My case:

  • The project is a multimodule maven project
  • It uses JUnit 4
  • The class under test and the test class are not in the same maven module
  • The test class is in a directory marked as "test source root"
  • The last but not the least: It works perfectly in IDEA 13 :-D
0

Do you have Scala plugin enabled?
Thanks

0
Avatar
Permanently deleted user

I don't have that plugin installed.

0

Found the problem. Thanks!

0

Well what was the problem then?

0

Please sign in to leave a comment.