新聞中心
本文教程操作環(huán)境:windows7系統(tǒng)、python 3.9.1,DELL G3電腦。

創(chuàng)新互聯(lián)建站自2013年創(chuàng)立以來,是專業(yè)互聯(lián)網(wǎng)技術(shù)服務(wù)公司,擁有項(xiàng)目網(wǎng)站設(shè)計(jì)、網(wǎng)站建設(shè)網(wǎng)站策劃,項(xiàng)目實(shí)施與項(xiàng)目整合能力。我們以讓每一個(gè)夢(mèng)想脫穎而出為使命,1280元泊頭做網(wǎng)站,已為上家服務(wù),為泊頭各地企業(yè)和個(gè)人服務(wù),聯(lián)系電話:13518219792
1、說明
Allure 是在 Pytest 執(zhí)行完生成的測(cè)試數(shù)據(jù)的基礎(chǔ)上,對(duì)測(cè)試數(shù)據(jù)進(jìn)行處理統(tǒng)計(jì),生成格式統(tǒng)一、美觀的測(cè)試報(bào)告。
是一個(gè)由QametaSoftware團(tuán)隊(duì)開發(fā)的開源測(cè)試報(bào)告框架,旨在讓大家更容易簡(jiǎn)潔地生成和閱讀。它支持大多數(shù)測(cè)試框架,比如Pytest、TestNG等。使用方便,易于集成。
2、實(shí)例
Allure 框架基于其他的測(cè)試框架使用,例如:Pytest。
# windows env source env/Scripts/activate # 安裝 pytest 和 pytest-allure-adaptor pip3 install pytest # Allure Pytest Adaptor是Pytest的一個(gè)插件(比較舊的一個(gè)插件) # allure-pytest 比較新一點(diǎn),建議使用 pip3 install pytest-allure-adaptor pip3 instal allure-pytest # 安裝Allure工具,主要是講pytest的測(cè)試數(shù)據(jù)轉(zhuǎn)換成HTML數(shù)據(jù) # linux環(huán)境安裝 # 現(xiàn)將allure源添加到linux的源里 sudo apt-add-repository ppa:qameta/allure # 更新本地源 sudo apt-get update # 安裝allure,[allure無法使用的解決方案](https://askubuntu.com/questions/1168821/allure-report-installed-but-not-findable) sudo apt-get install allure # 上面的方法不行的話,用下面的方法 curl -o allure-2.6.0.tgz -Ls https://dl.bintray.com/qameta/generic/io/qameta/allure/allure/2.6.0/allure-2.6.0.tgz sudo tar -zxvf allure-2.6.0.tgz -C /opt/ sudo ln -s /opt/allure-2.6.0/bin/allure /usr/bin/allure allure --version # Windows 下安裝就麻煩點(diǎn),可以使用 Scoop 工具(Chocolatey工具不知道為什么安裝不了),不管了官方推薦使用 Scoop 安裝就使用 Scoop 安裝得了 # 先安裝[Scoop](https://juejin.im/entry/6844904017823285262/detail) # 檢查sccop是否安裝成功 scoop --version # 安裝 allure scoop install allure # 查看allure是否安裝成功 allure --version
以上就是python中Allure框架的介紹,希望能對(duì)大家有所幫助。更多Python學(xué)習(xí)指路:創(chuàng)新互聯(lián)Python教程
文章標(biāo)題:創(chuàng)新互聯(lián)Python教程:python中Allure框架是什么?
分享網(wǎng)址:http://fisionsoft.com.cn/article/cdodhej.html


咨詢
建站咨詢
