美文网首页
Windows 下使用scoop安装allure2,以及与pyt

Windows 下使用scoop安装allure2,以及与pyt

作者: 霍格沃兹测试学院 | 来源:发表于2020-12-30 14:27 被阅读0次

安装scoop

环境要求

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

安装

在PowerShell中输入以下命令将scoop安装在默认位置(C:\Users<user>\scoop)

iwr -useb get.scoop.sh | iex

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

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

image

安装allure2

在PowerShell中输入以下命令将allure2安装在scoop下(\scoop\apps\allure\2.13.3)

scoop install allure

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

image

生成报告

安装allure-pytest

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

pip install allure-pytest

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

pytest --alluredir=./report

在执行完成后查看报告

allure serve ./report

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

参考连接:

(文章来源于霍格沃兹测试学院)
更多技术文章可点击http://qrcode.testing-studio.com/f?from=jianshu&url=https://ceshiren.com/t/topic/3822

相关文章

网友评论

      本文标题:Windows 下使用scoop安装allure2,以及与pyt

      本文链接:https://www.haomeiwen.com/subject/vfhtoktx.html