简体   繁体   English

java 项目中集成测试的最佳文件夹约定

[英]Best folder convention for integration tests in java project

I am creating a Microservices application with java Spring Boot and Maven.我正在使用 java Spring 引导和 Maven 创建一个微服务应用程序。 As I am new in Java world, would like to know the best folder/filename convention to my integration tests.因为我是 Java 世界的新手,所以想知道我的集成测试的最佳文件夹/文件名约定。 I know that maven convention says we should segregate the two by suffix "Test" and "IT", but should the two be in the same package?我知道 maven 约定说我们应该通过后缀“Test”和“IT”将两者分开,但是两者应该在同一个 package 中吗?

You can keep your integration tests as a separate maven module.您可以将集成测试保留为单独的 maven 模块。

parent-pom.
├── module-a
├── module-b
├── ...
└── integration-tests

Frameworks like spring and quarkus are using this convention. spring 和 quarkus 等框架正在使用这种约定。

Quarkus Spring Quarkus Spring

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM