婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 知識庫 > Pytest allure 命令行參數的使用

Pytest allure 命令行參數的使用

熱門標簽:上海機器人外呼系統哪家好 蓋州市地圖標注 地圖標注微信發送位置不顯示 浙江電銷卡外呼系統好用嗎 地圖制圖標注位置改變是移位嗎 房產電銷外呼系統 南京銷售外呼系統軟件 地圖標注的意義點 315電話機器人廣告

先看看 allure 命令的幫助文檔

cmd 敲

allure -h

allure 命令的語法格式

allure [options] [command] [command options]

options 列表

Options:
    --help 命令行幫助文檔
    -q, --quiet
      切換至安靜模式
      Default: false
    -v, --verbose
      切換至冗長模式
      Default: false
    --version
      版本信息
      Default: false

command 列表

  • generate
  • serve
  • open
  • plugin

這里只講前三個常用的

generate 命令行參數

作用

生成 allure 的html 報告

語法格式

generate [options]  allure 結果目錄

注:allure 結果目錄就是運行 pytest 命令,--alluredir 跟的那個目錄

pytest -sq --alluredir= ./allure

命令選項

主要就是用 -c、-o 兩個參數

open 命令行參數

作用

打開生成的 allure 報告,就是打開 generate 命令生成的報告

語法格式

open [options] allure報告目錄

注:allure 報告目錄就是運行 allure generate 命令,-o 跟的那個目錄

allure generate -o ./allure-report

命令選項

serve 命令行參數

作用

打開 allure 報告

語法格式

serve [options] allure 結果目錄

注:allure 結果目錄就是運行 pytest 命令,--alluredir 跟的那個目錄

pytest -sq --alluredir= ./allure

命令選項

瀏覽器打開 allure 報告的兩種方式

allure serve

標準寫法

# 執行 pytest,指定 allure 結果目錄
pytest -sq --alluredir=./allure

# 打開 allure 報告
allure serve ./allure

allure generate + allure open

標準寫法

# 執行 pytest,指定 allure 結果目錄
pytest -sq --alluredir=./allure

# 生成 allure 的 html 報告
allure generate -c -o ./allure-report ./allure

# 打開 allure 報告
allure open ./allure-report

當然不寫 -o 也可以

看看 allure-report 的目錄結構

  • 這種方式的目錄會好看很多,不只是一堆 json 文件
  • 而且直接打開 index.html 也是能看到 allure 報告的

到此這篇關于Pytest allure 命令行參數的使用的文章就介紹到這了,更多相關Pytest allure 命令行參數內容請搜索腳本之家以前的文章或繼續瀏覽下面的相關文章希望大家以后多多支持腳本之家!

您可能感興趣的文章:
  • python的pytest框架之命令行參數詳解(上)
  • 詳解用Pytest+Allure生成漂亮的HTML圖形化測試報告
  • python pytest進階之conftest.py詳解
  • python pytest進階之fixture詳解
  • Pytest測試框架基本使用方法詳解
  • Python 測試框架unittest和pytest的優劣
  • Pytest參數化parametrize使用代碼實例
  • 在pycharm中文件取消用 pytest模式打開的操作

標簽:克拉瑪依 日照 金華 陽泉 赤峰 貴州 臨汾 雙鴨山

巨人網絡通訊聲明:本文標題《Pytest allure 命令行參數的使用》,本文關鍵詞  Pytest,allure,命令行,參數,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《Pytest allure 命令行參數的使用》相關的同類信息!
  • 本頁收集關于Pytest allure 命令行參數的使用的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 曲阜市| 兴城市| 阜平县| 黄大仙区| 重庆市| 南宁市| 通榆县| 邯郸市| 阿坝| 临漳县| 秀山| 台湾省| 平昌县| 株洲市| 芦溪县| 上饶市| 景宁| 西和县| 宿迁市| 浮梁县| 贵定县| 长阳| 七台河市| 闵行区| 大港区| 江西省| 石城县| 安顺市| 四子王旗| 平泉县| 镇远县| 镇沅| 宁陵县| 济阳县| 靖远县| 邵阳市| 巴林左旗| 芷江| 达尔| 平顺县| 永定县|