JUnit support still in very bad shape

Hi!

The JUnit support is in very bad shape in the latest EAP builds.
1. When I right-click on a source path and select 'Run "All Tests"', the tests for the module the source path is in are run. That's an improvement. Earlier EAP builds run all tests in all modules. After running the tests a new Run configuration named is created. Now selecting any other source path in any other module will still run the tests of the first module since now the ]]> Run configuration is used which specifies the old module as its classpath. That's quite unintuitive. I want to run the tests in the selected module and not the tests in some run configuration I never asked for.
2. Since the introduction of the "in single module" option the test collector seems to be broken. It seems to find JUnit3 tests without problems, but finding JUnit4 tests seems to be a problem. It looks like it finds JUnit4 tests if they are located in the main source path of a module but not if they are located in a separate test folder.

Please, please fix this before 6.0. It really diminishes the pleasure in development with IDEA.

Cheers,
Robert

6 comments

Robert,
First problem is about to be solved by proper naming of (auto)created run
configuration, something like . Regarding 2nd problem, I was unable to reproduce this. Could you please post a JIRA issue with the sample project there ? Thanks. -- regards, -- Alexey Kudravtsev Software Developer JetBrains, Inc, http://www.jetbrains.com "Develop with pleasure!" "Robert F. Beeger" ]]> wrote in message
news:12263337.1157652268688.JavaMail.itn@is.intellij.net...

Hi!

>

The JUnit support is in very bad shape in the latest EAP builds.
1. When I right-click on a source path and select 'Run "All Tests"', the
tests for the module the source path is in are run. That's an
improvement. Earlier EAP builds run all tests in all modules. After
running the tests a new Run configuration named <default> is created. Now
selecting any other source path in any other module will still run the
tests of the first module since now the <default> Run configuration is
used which specifies the old module as its classpath. That's quite
unintuitive. I want to run the tests in the selected module and not the
tests in some run configuration I never asked for.
2. Since the introduction of the "in single module" option the test
collector seems to be broken. It seems to find JUnit3 tests without
problems, but finding JUnit4 tests seems to be a problem. It looks like it
finds JUnit4 tests if they are located in the main source path of a module
but not if they are located in a separate test folder.

>

Please, please fix this before 6.0. It really diminishes the pleasure in
development with IDEA.

>

Cheers,
Robert



0

Robert,
First problem is about to be solved by proper naming
of (auto)created run
configuration, something like <all module XXX tests>.

Yes, that should fix it. Thanks!

Regarding 2nd problem, I was unable to reproduce
this. Could you please post
a JIRA issue with the sample project there ?

I have created http://jetbrains.net/jira/browse/IDEA-9249 which contains a sample project showing the problem.

Cheers,
Robert

0

The JUnit support is in very bad shape in the latest
EAP builds.


+1

Alexey,

What about support for parameterized tests? (http://www.jetbrains.net/jira/browse/IDEADEV-7348) Is that going to get in before 6.0 is released? (It's an important one to me, if you hadn't picked up on that :) )

Thanks,
Mark

0

Yes.
I hope.
--
regards,
--
Alexey Kudravtsev
Software Developer
JetBrains, Inc, http://www.jetbrains.com
"Develop with pleasure!"

"Mark Vedder" <no_reply@jetbrains.com> wrote in message
news:28746231.1157721386862.JavaMail.itn@is.intellij.net...
>> The JUnit support is in very bad shape in the latest
>> EAP builds.
>

+1

>

Alexey,

>

What about support for parameterized tests?
(http://www.jetbrains.net/jira/browse/IDEADEV-7348) Is that going to get
in before 6.0 is released? (It's an important one to me, if you hadn't
picked up on that :) )

>

Thanks,
Mark



0

on a similar theme..
I might be doing completely the wrong thing here but:
How do I configure intyelliJ 6 (build 5661) to run Junit 4 style test suite e.g:
-


package com.zenulta.foundation;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;

@RunWith(Suite.class)
@Suite.SuiteClasses( { ZTimeTest.class })
public class TestAll {}
-



when I try to set up a configuration to run it i can't see the class in the drop down menu (presumably because it does not have a main method? Or is there a better way to do/configure test suites?

Also I had to add in the Junit 4 jar library to the module myself, is this correct or should the one that comes with intelliJ be available?

many thanks

Tom

0

Please sign in to leave a comment.