• centos 用docker 运行 cypress


    1.docker 拉cypress的镜像

    docker pull cypress/included:5.0.0
    

      2.上传cypress文件夹到centos,进入项目【cypress_odoo_ui】。用例写在./cypress_odoo_ui/cypress/integration/mytest下

    [root@localhost ~]# cd /usr/alam/cypress_odoo_ui
    [root@localhost cypress_odoo_ui]# docker run -it -v $PWD:/mytest -w /mytest cypress/included:5.0.0
    

    3.1 设置生成报告格式

    {
      "viewportWidth": 1280,
      "viewportHeight": 600,
      "integrationFolder": "cypress/integration/mytest",
      "testFiles": "**/*.js",
      "chromeWebSecurity": false,
      "reporter": "junit",
      "reporterOptions": {
        "mochaFile": "results/test_report_[hash].xml", 
        "toConsole": true
      },
      "reporter": "mochawesome",
      "reporterOptions": {
        "reportDir": "cypress/results",
        "overwrite": false,
        "html": false,
        "json": true
      },
      "reporter": "junit",
      "reporterOptions": {
        "mochaFile": "results/test_report_[hash].xml", 
        "toConsole": true
      }
    }
    

      

      

    3.生成报告

    [root@localhost cypress_odoo_ui]# allure serve results
    Generating report to temp directory...
    Report successfully generated to /tmp/5095319951338814878/allure-report
    Starting web server...
    2020-08-25 17:30:23.774:INFO::main: Logging initialized @1152ms to org.eclipse.jetty.util.log.StdErrLog
    Can not open browser because this capability is not supported on your platform. You can use the link below to open the report manually.
    Server started at <http://127.0.0.1:43021/>. Press <Ctrl+C> to exit
    

      4.访问地址

    http://10.11.19.55:43021/index.html#suites

     5.集成到Jenkins,Jenkins有个allure的插件

  • 相关阅读:
    python print format
    ElasticSearch的lowlevelApi和低级别API
    Ubuntu下搜狗输入法突然无法输入中文
    mysql基本操作
    eclipse配置代码自动提示
    使用JAAS登录kerberos服务器
    centos7配置kerberos服务,并使用JAAS登录
    LDAP none、simple、strong 笔记
    linux下yum安装最新稳定版nginx
    Mybatis if标签判断大小
  • 原文地址:https://www.cnblogs.com/alamZ/p/13537438.html
Copyright © 2020-2023  润新知