java 1.8 Spring Boot 2.2.4 JUnit4
src
│ ├── main
│ │ └── omis
│ │
│ └── test
│ └── java
│ └── com
│ └── testTool
│ ├── TestToolApplicationTests.java
│ └── web
│ ├── controller
│ │ └── TestToolControllerTest.java
│ └── service
│ └── TestToolServiceTest.java
$ mvn test
, tous les fichiers java sous src / test seraient exécutés.TestToolApplicationTests.java
a été exécuté[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.028 s
[INFO] Finished at: 2020-05-27T15:42:18+09:00
[INFO] ------------------------------------------------------------------------
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<!--Ajouter à partir d'ici-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit4</artifactId>
<version>2.22.0</version>
</dependency>
</dependencies>
<configuration>
<includes>
<include>**/*.java</include>
</includes>
</configuration>
</plugin>
<!--Ajouter ici-->
</plugins>
</build>
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.559 s
[INFO] Finished at: 2020-05-27T16:39:06+09:00
[INFO] ------------------------------------------------------------------------
Recommended Posts