zoukankan      html  css  js  c++  java
  • Windows 下使用scoop安装allure2,以及与pytest生成报告

    安装scoop

    环境要求

    • Windows 7 SP1 + / Windows Server 2008+
    • PowerShell 5(或更高版本,包括PowerShell Core)和.NET Framework 4.5(或更高版本)
    • 必须为您的用户帐户启用PowerShell
      • 在PowerShell中输入 Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser选择Y或者A

    安装

    在PowerShell中输入以下命令将scoop安装在默认位置(C:Usersscoop)

    iwr -useb get.scoop.sh | iex

    需要指定安装位置查看Scoop Github官网详细介绍

    安装完成后运行scoop help获取帮助

    安装allure2

    在PowerShell中输入以下命令将allure2安装在scoop下(\scoopappsallure2.13.3)

    scoop install allure

    安装完成后运行allure help获取帮助

    生成报告

    安装allure-pytest

    在命令行窗口输入以下命令安装allure-pytest

    pip install allure-pytest

    在pytest执行行收集测试结果(--alluredir选项指定生成报告的路径,这里指当前目录下report文件夹)

    pytest --alluredir=./report

    在执行完成后查看报告

    allure serve ./report

    默认在浏览器显示生成的报告

    参考连接:

  • 相关阅读:
    ASP.NET
    ASP.NET
    MSSQL
    ASP.NET
    HTML+CSS+JS
    HTML+CSS
    ASP.NET、WinForm、C#
    MSSQL
    WinFrom
    线性代数应该这样学一
  • 原文地址:https://www.cnblogs.com/felixqiang/p/12853847.html
Copyright © 2011-2022 走看看