zoukankan      html  css  js  c++  java
  • TestNG(四) 基本注解BeforeSuite和AfterSuite

    package com.course.testng;
    
    import org.testng.annotations.*;
    
    public class BasicAnnotation {
        @Test //最基本的注解,用来把方法标记为测试的一部分
        public void testCase1(){
            System.out.println("这个测试用例1");
        }
    
        @Test
        public void testCase2(){
            System.out.println("这个测试用例2");
        }
        @BeforeMethod
        public void beforMethod(){
            System.out.println("这是在测试前运行的");
        }
    
        @AfterMethod
        public void afterMethod(){
            System.out.println("这是在测试方法之后运行的");
        }
    
        @BeforeClass
        public void bedorClass(){
            System.out.println("这是类运行之前运行的方法");
        }
    
        @AfterClass
        public void afterClass(){
            System.out.println("这是类运行后执行的方法");
        }
    
        @BeforeSuite
        public void beforSuite(){
            System.out.println("beforSuite测试套件");
        }
    
        @AfterSuite
        public void afterSuite(){
            System.out.println("afterSuite测试套件");
        }
    
    
    }

  • 相关阅读:
    隐藏 阴影 定位 js语法与导入
    js 相关知识
    选择器 常用样式 布局
    前端
    数据库 备份
    SQLAlchemy 创建 增 删 改 查
    引擎 索引 日志查询 权限管理
    pysql
    数据库的操作
    Conv1*1
  • 原文地址:https://www.cnblogs.com/dwdw/p/11404821.html
Copyright © 2011-2022 走看看