How to run unit test in IntelliJ when some modules fail to compile?

I was provided with an outdated project to quickly fix the error. This is an ant based project, so I imported it into intellij using eclipse files. A project has several modules, and some of them do not compile correctly. I would like to do the following:

I have my module, I need to work on compilation, and I need to write some unit tests to cover my changes. But I can not run these tests due to the fact that other modules do not compile. I cannot remove these modules from the project, since I am working on using some classes from these modules (ant magic).

Is there a way not to compile and do the whole project, only one module? I would like to use it, as in eclipse, where you can always run your test, even if the rest of your code has been broken.

+5
source share
1 answer

For Run configuration, you can call any combination

  • To do everything
  • Building specific artifacts
  • Launch ant targets
  • Run maven commands
  • Show settings.

Using a combination of these functions or disabling them, you should run your program, building only what you need.

+1
source

All Articles