maven-surefire-plugin的插件提供了对测试目录的配置,想要细看的或者学习更多东西的可以去http://maven.apache.org/surefire/maven-surefire-plugin学习.

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-surefire-plugin</artifactId>
  <version>2.17</version>
  <configuration>
<includes>
  <include>**/Test1.java</include>
  <include>**/Test2.java</include>
</includes>
<excludes>
<exclude>**/Test3.java</exclude>
<exclude>**/Test4.java</exclude>
</excludes>
</configuration>
</plugin>

  或者

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-surefire-plugin</artifactId>
  <version>2.17</version>
  <configuration>
<includes>
   <include>com/test/action/*Test.java</include>
     </includes>
<excludes>
<exclude>com/test/action2/*Test.java</exclude>
</excludes>
</configuration>
</plugin>

  

maven项目如何跳过某些junit test,或者指定执行部分junit test的更多相关文章

  1. maven项目打包跳过单元测试

    在pom.xml中添加一下代码: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifact ...

  2. 将maven项目中依赖的jar包导出到指定的目录

    <plugin> <artifactId>maven-dependency-plugin</artifactId> <configuration> &l ...

  3. ava Maven项目之Nexus私服搭建和版本管理应用

    目录: Nexus介绍 环境.软件准备 Nexus服务搭建 Java Maven项目版本管理应用 FAQ 1.Nexus介绍 Nexus是一个强大的Maven仓库管理器,它极大地简化了自己内部仓库的维 ...

  4. Java Maven项目之Nexus私服搭建和版本管理应用

    转载自:https://cloud.tencent.com/developer/article/1010603 1.Nexus介绍 Nexus是一个强大的Maven仓库管理器,它极大地简化了自己内部仓 ...

  5. maven项目对于测试时“无法加载主类”的解决方案

    1.右键maven项目,选择  build path --------->Configure Build Path  ,执行下列操作,保存即可.

  6. Spring4.2.3+Hibernate4.3.11整合( IntelliJ maven项目)(使用Annotation注解)(Junit测试类)

    1. 在IntelliJ中新建maven项目 给出一个建好的示例 2. 在pom.xml中配置依赖 包括: spring-context spring-orm hibernate-core mysql ...

  7. Maven项目中使用JUnit进行单元测试

    1.打开maven项目中的pom.xml,添加JUnit 的jar包 2.在src/test/java下右键新建JUnit Test Cast

  8. IDEA2016 maven项目配置Junit

    添加插件:File->Settings->Plugins 设置生成模式:File->Settings->Other Settings 修改模板:File->Setting ...

  9. (四)新建Maven项目

    我们以简单的helloworld来作为入门的实例,有些人说掌握了helloworld你就掌握了这门技术的一半了,对于maven来说,你掌握helloworld,你可能还稀里糊涂的. 1.从maven模 ...

随机推荐

  1. HDU 5826 physics

    该问题和xi,di均无关,碰撞只会使得速度反向,大小不会变.因此只要计算速度. #pragma comment(linker, "/STACK:1024000000,1024000000&q ...

  2. Chapter 1 First Sight——29

    I was anxious not to be late for class on my first day. 在我第一天上学的时候我非常焦虑我会上课迟到. One of my new acquain ...

  3. 第六节,初识python和字符编码

    程序语言的发展 机器语言 程序语言,最初的计算机语言是机器语言,完全是0和1组成的二进制串  如:01010101 11010101 汇编语言 因为01010101的字符串,冗长,不利于维护,所以产生 ...

  4. LeetCode OJ 217.Contains Duplicate

    Given an array of integers, find if the array contains any duplicates. Your function should return t ...

  5. Eclipse/MyEclipse中使用复制粘贴功能卡的解决办法

    最近在MyEclipse中编辑代码时,使用快捷键进行复制粘贴,经常会导致编辑器短暂的停顿,光标不跟随,居然反应不过来,几近假死. 想来想去应该是编辑上的什么配置或者是IDE的什么功能导致,于是进入Pr ...

  6. ios 修改程序显示名称

    当你创建一个project时,会要求你输入product name & company identifier,这两个property的值should和你在apple developer mem ...

  7. 谷歌浏览器web开发教程之开始篇:使用sublime

    你的代码编辑器是主要的开发工具:你使用它去编辑和保存代码段.你可以通过学习编辑器快捷键和以及安装关键插件来好而快的写出代码. 目录 安装sublime文本编辑器 为什么使用包管理器? 安装插件 摘要 ...

  8. myeclipse 调试JSP页面

    http://jingyan.baidu.com/article/636f38bb1ef1aad6b9461048.html

  9. 【floyd 多源最短路】 poj 1125

    #include <stdio.h> #include <iostream> #include <memory.h> using namespace std; ][ ...

  10. OC与Swift桥接问题

    入职新公司后,接手了一个Swift项目.项目质量已经吐槽过一次就略过了,感兴趣的可以看我之前的博客.当然我之前对Swift只是略有了解,略到只看过没写过的程度,主要语言还是OC.不过嘛其实语言都是相通 ...