HoneyMoose
  • 首页
  • Java
  • Jersey
  • Jira
  • Confluence
  • U.S.
    • USRealEstate
    • USVisaTrack
    • H1B
  • 项目和网站
    • CWIKI.US
    • OSSEZ 社区
    • WIKI.OSSEZ.COM
    • BUG.OSSEZ.COM
    • RSS.OSSEZ.COM
BLOG.OSSEZ.COM
A responsive blog theme focused om user reading experience
  1. Home
  2. Computer Science
  3. This article

Surfire 单元测试添加 jvm参数

2023年03月28日 215Browse 0Like 0Comments

如果你执行过mvn test 或者执行其他maven命令时跑了测试用例,你就已经用过maven-surefire-plugin 了。maven-surefire-plugin 是maven里执行测试用例的插件,不显示配置就会用默认配置。

这个插件的surefire:test 命令会默认绑定maven执行的test 阶段。

我们可以在插件中添加配置:

<argLine>-noverify</argLine>

如果下面的配置:

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.20</version>
                    <configuration>
                        <argLine>-noverify</argLine>
                        <systemPropertyVariables>
                            <java.io.tmpdir>${project.build.directory}</java.io.tmpdir>
                            <forkedProcessTimeoutInSeconds>3600</forkedProcessTimeoutInSeconds>
                            <java.awt.headless>true</java.awt.headless>
                        </systemPropertyVariables>
                        <trimStackTrace>false</trimStackTrace>
                        <skipTests>true</skipTests>
                    </configuration>
                </plugin>

 

2023-03-28_14-33-49

 

可以在上面的配置参数位置设置命令行参数。

https://www.ossez.com/t/surfire-jvm/14360

Tags: None
Last updated:2023年03月28日

Kratos

stay absorbed stay excellent

Like
< Previous
Next >

Comments

Cancel reply

Newest Hotspots Random
Newest Hotspots Random
IntelliJ IDEA 2023.1 版本添加了包中类的列表功能 Jenkins 修改启动的端口 Spring 项目运行提示错误 Not a managed type Linux 查看 SELinux 的状态 WordPress 网站 Error Establishing a Database Connection(建立数据库连接时出错) Linux 开启或关闭 SELinux
Confluence 6 如何配置快速导航的同时查找数量 VUE v-bind 数据绑定 What It's Like to Study at the Strictest School in Britain PowerShell 中运行 maven 参数无法识别 NH-Manchester, Mcintyre Ski Area 考察报告 如何看待网传东航疫情期间超售回国机票、用高价票替换低价票等行为
Categories
  • Algorithm(算法)
  • AMQP
  • Angular
  • CI
  • Compile And CI
  • Computer Science
  • Confluence
  • DataBase
  • Gradle
  • H1B
  • Hibernate
  • IDE
  • Java
  • Jersey
  • Jira
  • MariaDB
  • PrestaShop
  • Spring
  • Spring Batch
  • U.S.
  • USRealEstate
  • USVisaTrack
  • 我的小厨

COPYRIGHT © 2020 HoneyMoose. ALL RIGHTS RESERVED.

THEME CWIKIUS.CN MADE BY VTROIS