"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?
请先登录再写评论。
Up! Same for me...
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.
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.
What tests you are using? Are the tests you want to navigate empty or not?
Thanks
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.
My case:
Do you have Scala plugin enabled?
Thanks
Yes I do
I don't have that plugin installed.
Found the problem. Thanks!
Well what was the problem then?