Configuration of test directories in a mavenized Android project

风流意气都作罢 提交于 2019-12-25 07:00:54

问题


I have an Android project, which uses Maven. Originally, it worked fine with Eclipse (ADT).

But then I added a unit test and moved the source code from src to src/main/java directory and put my unit tests into src/test/java folder.

Thereafter Eclipse started to complain about wrong package names and refuses to run/debug my unit tests.

I tried to fix the problem by adding src/main/java and src/test/java to Java source path.

But this didn't help, I still can't run unit tests.

How can I fix this?


回答1:


I found out that MoreUnit allows to change the location of the unit tests. This solved my problem.



来源:https://stackoverflow.com/questions/15210500/configuration-of-test-directories-in-a-mavenized-android-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!