zoukankan      html  css  js  c++  java
  • TESTNG+JENKINS持续集成

    一、环境搭建

    1. 安装testNG插件到eclipse.
      -) 选择菜单 Help /Software updates / Find and Install.
      -) 点击add button然后在location中输入http://beust.com/eclipse/
      -) 确定后会自动安装testNG插件。
      二.包的引入
      WebDriver包:selenium-server-standalone.jar

      testng 包: testng-6.8.jar

      reportng包:reporting.jar,velocity-dep.jar
      ant包:ant-contrib.jar

    三、新建一个testNG工程:(手动创建lib文件夹,需要把以上三个JAR包放在lib下面)

    创建类和方法:
    import org.testng.annotations.Test;
    public class test {
    @Test(groups="init")
    public void f() {
    System.out.println("This is test f" );
    }
    @Test(groups="init")
    public void g() {
    System.out.println("This is test g" );
    }
    @Test(dependsOnGroups="init",groups="proccess")
    public void h() {
    System.out.println("This is test h " );
    }
    @Test(dependsOnGroups="init",groups="proccess")
    public void i() {
    System.out.println("This is test i" );
    }

    }
    testng.xml 文件:
    //















    ant build.xml文件内容:
    //

    JENKINS引入SVN下载工程包,编译运行:
    SVN配置:

    ANT配置:

    报告输出:
    (JENKINS安装TESTNG report 插件)
    jenkins console执行报告输出,基本上到这一步就成功了。

    再看TESTNG插件生成的TESTNG报告:

  • 相关阅读:
    重构二叉树
    LeetCode-Construct Binary Tree from Preorder and Inorder Traversal
    二叉平衡树
    二叉树的三种递归与非递归遍历算法
    Jump Game
    Ubuntu中安装最新 Node.js 和 npm
    ORACLE查看并修改最大连接数
    设计模式之工厂模式
    设计模式之单例模式
    设计模式之模板方法模式
  • 原文地址:https://www.cnblogs.com/stone-xiao/p/6029600.html
Copyright © 2011-2022 走看看