zoukankan      html  css  js  c++  java
  • 注解实战aftersuite和beforesuite

    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 beforeMethed() {
    System.out.println("这是在测试方法之前运行的");
    }

    //测试方法之后运行的
    @AfterMethod
    public void afterMethed() {
    System.out.println("这是在测试方法之后运行的");
    }

    @BeforeClass
    public void beforeclass() {
    System.out.println("beforeclass2这是在类之前运行的方法");

    }

    @AfterClass
    public void afterclass() {
    System.out.println("bafterclass2这是在类之前运行的方法");
    }

    @BeforeSuite
    public void beroresuite() {
    System.out.println("BeforeSuite测试套件");
    }

    @AfterSuite
    public void aftersuite() {
    System.out.println("AfterSuite测试套件");
    }
    }




  • 相关阅读:
    lambda表达式
    切片操作
    小样本学习(Few-shot Learning)
    TensorFlow Eager 模式
    tensorflow读入数据集的方式
    综述类解读
    pyCharm永久激活
    shell脚本教程
    GNN
    Tomcat配置优化
  • 原文地址:https://www.cnblogs.com/xuzhongtao/p/9011034.html
Copyright © 2011-2022 走看看