无法使用Maven从终端运行测试

时间:2019-06-20 12:19:49

标签: java maven junit

我有一个带有一些测试的包装。结构如下:

enter image description here

我导航到test文件夹,然后尝试以下操作:

home/me/cust/tests/test$ mvn clean test
[INFO] Scanning for projects...
[INFO] 
[INFO] ------------------< se.cust.i70ds01:i70ds01-test >-------------------
[INFO] Building i70ds01-test 2.6.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ i70ds01-test ---
[INFO] Deleting /home/me/custtotal/cust/tests/test/target
[INFO] 
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-rules) @ i70ds01-test ---
[INFO] 
[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ i70ds01-test ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @ i70ds01-test ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 11 source files to /home/me/custtotal/cust/tests/test/target/classes
[INFO] 
[INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @ i70ds01-test ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/me/custtotal/cust/tests/test/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ i70ds01-test ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ i70ds01-test ---
[INFO] No tests to run.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.340 s
[INFO] Finished at: 2019-06-20T14:12:56+02:00
[INFO] ------------------------------------------------------------------------

如您所见,没有运行测试。为什么不?我遵循了命名约定,POM中没有跳过任何内容:

<parent>
    <groupId>se.cust.i70ds01</groupId>
    <artifactId>i70ds01-parent</artifactId>
    <version>2.6.1-SNAPSHOT</version>
    <relativePath>../../pom.xml</relativePath>
</parent>

<artifactId>i70ds01-test</artifactId>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <spring.version>4.1.6.RELEASE</spring.version>
    <indexsvc.version>2.8.2</indexsvc.version>
    <jellyfish.version>1.4.2</jellyfish.version>
    <skipTests>false</skipTests>
</properties>

0 个答案:

没有答案