JUnit tests pass in Eclipse but fail in Maven Surefire

前端 未结 17 2004
臣服心动
臣服心动 2020-11-29 17:28

I have written some JUnit tests using JUnit 4 and spring-test libraries. When I run the tests inside Eclipse then run fine and pass. But when I run them using Maven (during

17条回答
  •  悲&欢浪女
    2020-11-29 17:44

    It is most likely that your configuration files are in src/main/resources, while they must be under src/test/resources to work properly under maven.

    https://cwiki.apache.org/UIMA/differences-between-running-unit-tests-in-eclipse-and-in-maven.html

    I'm replying this after two years 'cause I couldn't find this answer here and I think it is the right one.

提交回复
热议问题