maven的pom文件中配置测试用例
2017-12-14 19:38
274 查看
<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 学习---Maven配置之pom文件配置包含和排除测试
- cxf_rs_spring 整合所需要测试maven的pom配置文件
- 【Maven实用技巧】02. Maven配置之pom文件配置包含和排除测试
- 【maven】之配置开发,测试,正式环境pom.xml文件
- 【Java常用工具】Maven配置之pom文件配置包含和排除测试
- maven-pom、生命周期、配置文件、库、插件
- MAVEN项目的配置文件pom.xml元素的含义
- 电商项目(十六)项目初始化(maven的pom文件配置)
- idea中maven下载jar在pom文件搜索配置小细节
- Maven的配置文件pom.xml
- Java Maven项目的关键参数配置到pom文件的方法
- 【Maven用户手册】Maven之pom.xml配置文件详解
- Maven的pom.xml配置文件详解
- Java maven的 pom.xml配置文件中使用全局变量配置版本号
- Maven的配置文件pom.xml
- Maven的配置文件pom.xml
- 对于maven创建spark项目的pom.xml配置文件(图文详解)
- MAVEN的POM文件以及dubbo的相关配置(service和web)
- Maven配置pom文件
- maven项目继承和聚合pom文件配置