Intellij Android + Maven can't find unit tests

Go To StackoverFlow.com

4

I'm using IntelliJ and Maven to develop an Android application and I'm trying to run unit tests with the test module automatically created by the maven archetype. However, I keep getting the following message whenever I try to run the test module:

Running tests
Test running startedFinish
Empty test suite.

Do I have to register the tests somewhere?

2012-04-04 16:34
by jshou
Check that tests Run configuration has correct settings: http://www.jetbrains.com/idea/webhelp/run-debug-configuration-junit.html - CrazyCoder 2012-04-05 03:24
Where are your tests located - ianpojman 2012-05-07 20:11
I get almost the same issue when I run android tests, I have 7 test classes and it will run and test only one of the seven even though my setting are correct - JPM 2013-02-22 18:29


0

For Intellij 15 I resolved this issue by:

  1. Opening the 'Project Structure' settings
  2. Clicking 'Modules' (on left)
  3. 'Sources' Tab
    a. Right click on your source directory (usually src) click 'Source'.
    b. Right click on your test directory click 'Test'
    c. Right click on your out directory click 'Excluded'
  4. Go to 'Paths' tab
    a. Click 'Use module compile out path' radio button
    b. Select your output path directory for 'Output Path'
    c. Select your test path directory for 'Test output Path'
  5. Click Ok
2016-01-17 20:26
by Marquis Blount
Ads