<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
</build>

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

如果说maven已经有了maven-surefire-plugin的默认配置,我们还有必要了解maven-surefire-plugin的配置么?答案是肯定的。虽说maven-surefire-plugin有默认配置,但是当需要修改一些测试执行的策略时,就有必要我们去重新配置这个插件了。

上面代码是声明跳过测试用例,其它配置参考百度

package com.chetxt.fk.model;
import java.util.Date;import java.util.List;
import io.swagger.annotations.ApiModel;import io.swagger.annotations.ApiModelProperty;
@ApiModel(value="账号")public class User{@ApiModelProperty(value="id",example = "111111111",required=true,hidden=false)private String id;@ApiModelProperty(value="用户登录账号",example = "xxx",required=true,hidden=false)private String user_account;@ApiModelProperty(value="密码",example = "123456",required=true,hidden=false)private String password;@ApiModelProperty(value="客户名称",example = "超级管理员",required=true,hidden=false)private String name;@ApiModelProperty(value="电话",example = "18555588787",required=true,hidden=false)private String phone;@ApiModelProperty(value="电子邮件",example = "2@qq.com",required=true,hidden=false)private String email;@ApiModelProperty(value="所属客户",example = "111111111",required=true,hidden=false)private String group_id;@ApiModelProperty(value="创建时间",example = "2017-10-30 11:16:49",required=true,hidden=false)private String createtime;@ApiModelProperty(value="更新时间",example = "2017-10-30 11:16:49",required=true,hidden=false)private String updatetime;@ApiModelProperty(value="状态(0-无效,1-有效,2-删除)",example = "1",required=true,hidden=false)private int isactive;
private SystemGroup systemgroup;private List<Role> roles;
public String getId() {return id;}
public void setId(String id) {this.id = id;}
public String getUserAccount() {return user_account;}
public void setUserAccount(String userAccount) {this.user_account = userAccount;}
public String getPassword() {return password;}
public void setPassword(String password) {this.password = password;}
public String getName() {return name;}
public void setName(String name) {this.name = name;}
public String getPhone() {return phone;}
public void setPhone(String phone) {this.phone = phone;}
public String getEmail() {return email;}
public void setEmail(String email) {this.email = email;}
public String getGroupId() {return group_id;}
public void setGroupId(String groupId) {this.group_id = groupId;}
public int getIsactive() {return isactive;}
public void setIsactive(int isactive) {this.isactive = isactive;}
public String getCreatetime() {return createtime;}
public void setCreatetime(String createtime) {this.createtime = createtime;}
public String getUpdatetime() {return updatetime;}
public void setUpdatetime(String updatetime) {this.updatetime = updatetime;}
public SystemGroup getSystemGroup() {return systemgroup;}
public void setSystemGroup(SystemGroup systemGroup) {this.systemgroup = systemGroup;}
public List<Role> getRoles() {return roles;}
public void setRoles(List<Role> roles) {this.roles = roles;}
}

maven的pom文件中配置测试用例的更多相关文章

  1. maven在pom文件中引入了icepdf-core包,pom文件却莫名的报错,说jai_core包missing

    maven在pom文件中引入了icepdf-core包,却莫名的报错,说jai_core包missing,把这个jai_core包引入之后还是一样报错,PS:icepdf-core使用的时候不用引用j ...

  2. maven在pom文件中添加你想要的jar包

    概述:POM 文件里面的依赖jar包经常需要添加, 仅需要在google中代码查找 :maven 你需的jar包名称 repository 用了Maven,所需的JAR包就不能再像往常一样,自己找到并 ...

  3. maven 在pom文件下配置默认的jdk版本

    在pom.xml中加入这段代码就可以了 <!-- 设置默认的jdk --> <profiles> <profile> <id>jdk1.7</id ...

  4. maven的pom文件中指定编译的版本

    <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> ...

  5. 向pom.xml中配置Maven使用JDK8编译

    maven项目会用maven-compiler-plugin默认的jdk版本来进行编译,如果不指明版本就容易出现版本不匹配的问题,可能导致编译不通过的问题. 解决办法:在pom文件中配置maven-c ...

  6. maven里面pom文件的各标签介绍

    由于maven在工作中经常使用,但是平时要记的知识点有点多,偶尔回头来看一些东西难免忘记,特此整理一篇笔记,方便大家搜索查询,也方便自己以后查询! 后续碰见其他的标签也会进行更新! maven的pom ...

  7. Maven pom文件常用配置,转载

    什么是POM Project Object Model,项目对象模型.通过xml格式保存的pom.xml文件.作用类似ant的build.xml文件,功能更强大.该文件用于管理:源代码.配置文件.开发 ...

  8. 【IDEA】Maven踩坑:pom文件中的默认profiles不生效+IDEA中Maven的profiles使用说明

    一.问题即分析 项目pom文件中的profiles有3个配置:dev.test和production 默认配置的是dev,如下图: 但在本地起服务时,读取的配置始终是test里的. 二.原因 2.1 ...

  9. Maven pom文件中dependency scope用法

    在Maven中依赖的域有:compile.provided.runtime.system.test.import 一.compile(默认) 当依赖的scope为compile的时候,那么当前这个依赖 ...

随机推荐

  1. Unable To Import Or Enter Sale Order - ORA-20001: APP-FND-01564: ORACLE error - 1422 in get_seq_info

    In this Document   Symptoms   Cause   Solution APPLIES TO: Oracle Order Management - Version 12.0.4 ...

  2. Java-ServletRequestWrapper

    /** * * Provides a convenient implementation of the ServletRequest interface that * can be subclasse ...

  3. Linux自动安装JDK的shell脚本

    Linux自动安装JDK的shell脚本 A:本脚本运行的机器,Linux B:待安装JDK的机器, Linux 首先在脚本运行的机器A上确定可以ssh无密码登录到待安装jdk的机器B上,然后就可以在 ...

  4. Spring--ClassPathXmlApplicationContext

    public class ClassPathXmlApplicationContext extends AbstractXmlApplicationContext { private Resource ...

  5. Linux磁盘 - fdisk,partprobe, mkfs, mke2fs, fsck, badblocks, mount, mknod

    磁盘分区: fdisk [root@www ~]# fdisk [-l] 装置名称 选项与参数: -l :输出后面接的装置所有的 partition 内容.若仅有 fdisk -l 时, 则系统将会把 ...

  6. 给大家推荐一个python的学习网站 http://www.codecademy.com

    注册之后,可以跟着指导,自己编码学习,比较方面: 再推荐一个在线编译的代码网站,c/c++ python  都可以: http://codepad.org

  7. LeetCode(23)-Implement Queue using Stacks

    题目: Implement the following operations of a queue using stacks. push(x) -- Push element x to the bac ...

  8. Mac OS X 简单的方法知道何时来电了

    最近本猫所在的小区时常停电,往往半夜或是凌晨才来电啊!早上起来本猫在想如何知道确切的来电时间,但又不费事的方法呢. 方法一是用手机录音器录音,因为来电后门禁会发出"滴"的一声,所以 ...

  9. $cordovaCamera 插件 上传头像 图片功能

    首先要注入  $cordovaCamera 使用相机拍照 var useCamera = function() { var options = { //这些参数可能要配合着使用,比如选择了source ...

  10. 3sum(从数组中找出三个数的和为0)

    Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all un ...