在学习TestNG框架注解时发现在执行以下的代码

package com.groups;

import org.testng.annotations.AfterGroups;
import org.testng.annotations.BeforeGroups;
import org.testng.annotations.Test; public class GroupOnMethod {
@Test(groups = "1")
public void test1(){
System.out.println("测试1");
} @BeforeGroups("1")
public void BeforeGroup(){
System.out.println("1之前");
} @AfterGroups("1")
public void AfterGroup(){
System.out.println("1之后"); } }

出现的结果会是只打印出:

测试1

问题的处理:经过交流沟通发现使用的环境有差异,这段代码在TestNG版本为6.11正常会执行全部的,但在版本7.1.0出现了上述的情况,后来更换版本成功解决此问题

大家可以再7以上的其他版本试试有没此现象大出现,6的版本的应该是都正常的

最新文章

  1. Unity 3D学习之《Unity 3D 手机游戏开发》1
  2. 【leedcode】 Median of Two Sorted Arrays
  3. 解析json
  4. PyQt类库介绍
  5. The web application [/codeMarket] registered the JBDC driver[.........] but failed to unregister it when the web application was stopped. To prevent
  6. 测试Swift语言代码高亮-使用highlight.js
  7. 4.python中的用户交互
  8. 在后台直接调用sql
  9. Asp.Net Core(.net内核)
  10. html 文件动态加载.PDI 流程图
  11. java 值传递和引用传递。
  12. apply()
  13. Scrum Meeting 合集
  14. python学习笔记----正则表达式
  15. MySQL中间件之ProxySQL(9):ProxySQL的查询缓存功能
  16. Javaweb学习笔记——(十三)——————JSTL、JSTL核心标签库、自定义标签、有标签体的标签、带有属性的标签、MVC、Javaweb三层框架
  17. Redis高级特性介绍及实例分析
  18. pandas模块安装问题笔记
  19. POJ 3468 A Simple Problem with Integers(线段树模板之区间增减更新 区间求和查询)
  20. TensorFlow基础笔记(4) Tensor Transformation

热门文章

  1. Redis高并发快的3大原因详解
  2. 14、WindowsServer修改NTP时间同步服务器
  3. Linux:Linux安装配置JDK1.8
  4. PHP解决并发问题的几种实现(转)
  5. 从三道题目入门frida
  6. XCTF easyGo
  7. 两个有序数组合并为一个有序数组---python
  8. 如何搭建一个简易的 Web Terminal(一)
  9. C语言:for语句原理及具体执行过程
  10. C语言:宏完美定义