java - 如何自动运行测试?
问题描述
在 JUNIT5 中将添加哪些属性来自动运行测试?我该如何配置?
解决方案
您应该使用maven-surefire-plugin,例如:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-Xmx1024M ${additional.test.jvm.args}</argLine>
<excludes>
<exclude>**/*ManagedTest.java</exclude>
</excludes>
<runOrder>alphabetical</runOrder>
</configuration>
</plugin>
</plugins>
</build>
然后,如果您运行,mvn test
您的代码将被编译并运行测试。
推荐阅读
- solr - Solr 云是否需要负载均衡器,例如主故障中的 HAPROXY
- mongodb - 根据mongodb中对象的子元素过滤对象列表
- r - 比例 geom_bar 中 Y 轴的比例
- jasper-reports - 如何获取表格组件中每列的每页总和并返回主报表显示值?
- batch-file - 使用 WinSCP 脚本复制具有名称标准的文件
- flutter - 如何将小部件作为参数传递给函数
- css - 如何在 HTML 中的卡片内添加图片?
- c++ - 如何使用 GetPrivateProfileString() 从当前目录上移目录
- java - 如何在 Linux 中使用 Java 将变量添加到文件路径?
- swift - GetStream EnrichedActivity 类的复制问题