国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

pytest測試框架——allure報告

這篇具有很好參考價值的文章主要介紹了pytest測試框架——allure報告。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。

pytest測試框架——allure報告


一、allure的介紹

Allure 是由Java 語言開發(fā)的一個輕量級,靈活的測試報告工具。
Allure多平臺的 Report框架。
Allure 支持多語言,包括 python、JaveScript、PHP、Ruby 等。
可以為開發(fā)/測試/管理等人員提供詳盡的的測試報告,包括測試類別、測試步驟、日志、圖片、視
頻等。
可以為管理層提供高水準(zhǔn)的統(tǒng)計報告。
可以集成到Jenkins生成在線的趨勢匯總報告。

二、allure的運行方式

收集結(jié)果:

pytest 測試模塊/測試包/測試用例 --alluredir = 指定存儲測試結(jié)果的路徑

pytest --alluredir=./reports --clean-alluredir

生成在線的測試報告:
allure serve ./results

安裝allure-pytest

三、allure報告的生成

方式一、在線報告、會直接打開默認(rèn)瀏覽器展示當(dāng)前報告

--clean-alluredir:清理已經(jīng)生成的報告的歷史記錄

1、pytest 測試模塊/測試包/測試用例 --alluredir = 指定存儲測試結(jié)果的路徑
2、生成在線的測試報告:
allure serve ./results

方式二、靜態(tài)資源文件報告(帶index.html、css、js等文件),需要將報告布置到web服務(wù)器上。

應(yīng)用場景:如果希望隨時打開報告,可以生成一個靜態(tài)資源文件報告,將這個報告布署到web服務(wù)器上,啟動web服務(wù),即可隨時隨地打開報告。
解決方案:使用allure generate 生成帶有 index.html 的結(jié)果報告。這種方式需要
兩個步驟:
第一步:生成報告。

--clean:如果報告路徑重復(fù),清理上一次的報告

allure generate ./results --clean

-o:將測試報告生成指定的目錄

allure generate ./results --clean -o ./reports

第二步:打開報告。

allure open allure-report

打開報告指定IP地址和端口號

-h 127.0.0.1 -p 8888

allure open ./reports -h 127.0.0.1 -p 8888

四、allure中裝飾器

@allure.epic() epic描述 敏捷里面的概念,定義史詩,往下是feature
@allure.feature() 模塊名稱 功能點的描述,往下是 story
@allure.story() 用戶故事 用戶故事,往下是title
@allure.title(用例的標(biāo)題)用例的標(biāo)題 重命名 html 報告名稱
@allure.step() 操作步驟 測試用例的步驟
@allure.testcase() 測試用例的鏈接地址對應(yīng)功能測試用例系統(tǒng)里面的case
@allure.issue() 缺陷 對應(yīng)缺陷管理系統(tǒng)里面的鏈接
@allure.description() 用例描述 測試用例的描述
@allure.severity() 用例等級 blocker, critical, normal, minor, trivial
@allure.link() 鏈接 定義一個鏈接,在測試報告展現(xiàn)
@allure.attachment() 附件 報告添加附件

1、實現(xiàn)給測試報告添加用例標(biāo)題

通過使用裝飾器@allure.title可以為測試用例自定義一個可閱讀性的標(biāo)題。
allure.title的三種使用方式:

a.直接使用@allure.title為測試用例自定義標(biāo)題。

import allure

@allure.title('測試標(biāo)題')
def test_with_title():
    assert True

b.@allure.title支持通過占位符的方式傳遞參數(shù),可以實現(xiàn)測試用例標(biāo)題參數(shù)化,動態(tài)生成測試用例標(biāo)題。

@allure.title("參數(shù)化用例標(biāo)題:參數(shù)1:{p1},參數(shù)2:{p2}")
@pytest.mark.parametrize('p1,p2,p3',[[1,1,2],[2,4,6]])
def test_with_title1(p1,p2,p3):
    assert p1+p2==p3

pytest測試框架——allure報告

c.allure.dynamic.title動態(tài)更新測試用例標(biāo)題。

@allure.title('原始標(biāo)題')
def test_with_title2():
    assert True
    allure.dynamic.title('更改后的標(biāo)題')

2、allure報告中添加用例步驟

應(yīng)用場景:編寫自動化測試用例的時候經(jīng)常會遇到需要編寫流程性測試用例的場景,一般流程性的測試用例的測試步驟比較多,我們在測試用例中添加詳細(xì)的步驟會提高測試用例的可閱讀性。

方法一:使用裝飾器定義一個測試步驟,在測試用例中使用。

import allure
import pytest




@allure.step
def simple_step1(step_param1,step_param2=None):
    """定義一個測試步驟"""
    print(f'步驟1:打開頁面,參數(shù)1:{step_param1},參數(shù)2:{step_param2}')


@allure.step
def simple_step2(step_param):
    """定義一個測試步驟"""
    print(f'步驟1:完成搜索{step_param}功能')


@pytest.mark.parametrize('param1',['pytest','allure'],ids=['search pytest','search pytest'])
def test_parameterize_with_id(param1):
    simple_step2(param1)

@pytest.mark.parametrize('param1',[True, False])
@pytest.mark.parametrize('param2', ['value 1', 'value 2'])
def test_parametrize_with_two_parameters(param1, param2):
    simple_step1(param1,param2)

@pytest.mark.parametrize('param2',['pytest', 'unittest'])
@pytest.mark.parametrize('param1,param3', [[1,2]])
def test_parameterize_with_uneven_value_sets(param1, param2, param3):
    simple_step1(param1,param3)
    simple_step2(param2)

方法二:使用with allure.step()添加測試步驟。

@allure.title("搜索用例:{searchkey}")
@pytest.mark.parametrize("searchkey",['java','allure'])
def test_step_in_method(searchkey):
    with allure.step("測試步驟一:打開頁面"):
        print("操作a")
        print("操作b")
    with allure.step(f"測試步驟二:搜索{searchkey}"):
        print(f"搜索操作{searchkey}")
    with allure.step("測試步驟三:斷言"):
        assert True

pytest測試框架——allure報告

3、allure報告中添加用例鏈接

應(yīng)用場景:將報告與bug管理系統(tǒng)或測試用例管理系統(tǒng)集成,可以添加鏈接裝飾器
allure. link、@allure.issue和allure.testcase。

格式1: @allure.link (url, name)添加一個普通的link鏈接,name:起別名

import allure


@allure.link('http://www.baidu.com',name='這是一個鏈接')
def test_with_link():
    pass

pytest測試框架——allure報告

格式2: allure.testcase( url,name)添加一個用例管理系統(tǒng)鏈接。

TEST_CASE_LINK='http://www.baidu.com'

@allure.testcase(TEST_CASE_LINK,'用例管理系統(tǒng)')
def test_with_testcase():
    pass

pytest測試框架——allure報告

格式3: @allure.issue(url,name),添加bug管理系統(tǒng)鏈接。

@allure.issue('66666','bug管理系統(tǒng)')
def test_with_issue():
    pass

4、allure報告中添加用例分類

應(yīng)用場景:可以為項目,以及項目下的不同模塊對用例進(jìn)行分類管理。也可以運行某個類別下的用例。
報告展示:類別會展示在測試報告的Behaviors欄目下。
Allure提供了三個裝飾器:
@allure.epic:敏捷里面的概念,定義史詩,往下是feature。

import allure

@allure.epic('需求1')
class TestEpic:

    def test_case1(self):
        print('用例1')

    def test_case2(self):
        print('用例2')

    def test_case3(self):
        print('用例3')


@allure.epic('需求1')
class TestEpic1:

    def test_case1(self):
        print('用例1')

    def test_case2(self):
        print('用例2')

    def test_case3(self):
        print('用例3')

pytest測試框架——allure報告
場景:希望在報告中看到測試功能,子功能或場景。
子功能上加@allure.story、@allure.feature

@allure.feature:功能點的描述,理解成模塊往下是story。
@allure.story:故事story是 feature的子集。

import allure

@allure.epic('需求1')
@allure.feature('功能模塊1')
class TestEpic:

    @allure.story('子功能1')
    @allure.title('用例1')
    def test_case1(self):
        print('用例1')

    @allure.story('子功能2')
    @allure.title('用例2')
    def test_case2(self):
        print('用例2')

    @allure.story('子功能2')
    @allure.title('用例3')
    def test_case3(self):
        print('用例3')

    @allure.story('子功能1')
    @allure.title('用例4')
    def test_case4(self):
        print('用例4')

    @allure.story('子功能3')
    @allure.title('用例5')
    def test_case5(self):
        print('用例5')


@allure.epic('需求1')
@allure.feature('功能模塊2')
class TestEpic1:

    @allure.story('子功能4')
    def test_case1(self):
        print('用例1')

    @allure.story('子功能5')
    def test_case2(self):
        print('用例2')

    def test_case3(self):
        print('用例3')



@allure.epic('需求2')
@allure.feature('功能模塊1')
class TestEpic2:

    def test_case1(self):
        print('用例1')

    def test_case2(self):
        print('用例2')

    def test_case3(self):
        print('用例3')

pytest測試框架——allure報告

運行特定類別的用例

1、只運行epic名為”需求1“的測試用例

pytest demo1/test_allure_feature.py --alluredir=./reports --clean-all
uredir --allure-epics=需求1

pytest測試框架——allure報告

2、只運行feature名為”功能模塊2“的測試用例

pytest demo1/test_allure_feature.py --alluredir=./reports --clean-all
uredir --allure-features=功能模塊2

pytest測試框架——allure報告

3、只運行story名為”子功能1“的測試用例

pytest demo1/test_allure_feature.py --alluredir=./reports --clean-all
uredir --allure-stories=子功能1

4、只運行story名為”子功能2“和”子功能2“的測試用例

pytest demo1/test_allure_feature.py --alluredir=./reports --clean-all
uredir --allure-stories=子功能2,子功能3 -vs

5、運行story名為”子功能2“和 feature名”功能模塊1“的測試用例

pytest demo1/test_allure_feature.py --alluredir=./reports --clean-all
uredir --allure-stories=子功能2 --allure-features=功能模塊1

pytest測試框架——allure報告

總結(jié)

epic:相當(dāng)于定義一個項目。
feature:相當(dāng)于一個功能模塊,相當(dāng)于testsuite,可以管理很多個子分支story
story:相當(dāng)于對應(yīng)這個功能或者模塊下的不同場景,分支功能。
epic 與feature、feature 與story類似于父子關(guān)系。

5、allure報告中添加用例描述

應(yīng)用場景:Allure支持往測試報告中對測試用例添加非常詳細(xì)的描述語,用來描述測試用例詳情。
Allure添加描述的四種方式:
方式一:使用裝飾器
@allure.description()傳遞一個字符串參數(shù)來描述測試用例。

import allure

@allure.description("""
多行描述信息:<br/>
通過傳遞字符串參數(shù)添加一段描述語句,</br>
使用裝飾器@allure.description
""")
def test_description_string():
    assert True

pytest測試框架——allure報告

方式二:使用裝飾器
@allure.description_ html傳遞一段HTML文本來描述測試用例。

@allure.description_html("""
<img class="index-logo-src" src="http://www.baidu.com/img/flexible/logo/pc/result.png" alt="到百度首頁" title="到百度首頁">
""")
def test_description_html():
    assert True

pytest測試框架——allure報告

方式三:直接在測試用例方法中通過編寫文檔注釋的方法來添加描述。會按照給定的格式展示,不需要添加<br/>

def test_description_desc():
    """
    直接寫在測試用例中
    通過編寫文檔注釋的方法
    來添加描述
    會按照給定的格式展示,不需要添加<br/>
    :return:
    """
    assert True

pytest測試框架——allure報告

6、allure報告中添加用例優(yōu)先級

應(yīng)用場景:用例執(zhí)行時,希望按照嚴(yán)重級別執(zhí)行測試用例。

解決:可以為每個用例添加一個等級的裝飾器,用法: allure.severity。

Allure對嚴(yán)重級別的定義分為5個級別:

Blocker級別:中斷缺陷(客戶端程序無響應(yīng),無法執(zhí)行下一步操作)。
Critical級別:臨界缺陷(功能點缺失)。
Normal級別:普通缺陷(數(shù)值計算錯誤)。
Minor級別:次要缺陷(界面錯誤與UI需求不符)。
Trivial級別:輕微缺陷(必輸項無提示,或者提示不規(guī)范)。

使用裝飾器添加用例方法/類的級別。
類上添加的級別,對類中沒有添加級別的方法生效。

未加級別標(biāo)簽的用例,在運行時,是不會被收集上來的
但是在類中沒有加標(biāo)簽,會隨著類上加的標(biāo)簽來收集的

import allure

未加級別標(biāo)簽的用例,在運行時,是不會被收集上來的
def test_with_no_serverity_label():
    pass

@allure.severity(allure.severity_level.TRIVIAL)
def test_with_trivial_serverity():
    pass

@allure.severity(allure.severity_level.NORMAL)
def test_with_trivial_serverity1():
    pass

pytest測試框架——allure報告
對某一級別的用例運行時添加命令行參數(shù)–allure-severities:

pytest test_allure_severity.py --alluredir=./reports --clean-al
luredir --allure-severities=trivial

7、allure報告中添加用例支持tags標(biāo)簽

Allure報告支持的一些常見Pytest特性包括xfail、
skipif、fixture等。測試結(jié)果會展示特定的標(biāo)識在用例詳情頁面。

8、allure報告中添加pytest.fixture

應(yīng)用場景:fixture和finalizer是分別在測試開始之前和測試結(jié)束之后由Pytest調(diào)用的實用程序函數(shù)。Allure跟蹤每個fixture的調(diào)用,并詳細(xì)顯示調(diào)用了哪些方法以及哪些參數(shù),從而保持了調(diào)用的正確順序。

import allure
import pytest

@pytest.fixture()
def func():
    print('前置操作')
    yield
    print('后置操作')

class TestDemo:

    def test_a(self,func):
        assert True

    def test_b(self):
        pass

pytest測試框架——allure報告

五、失敗用例重試功能

Allure可以收集用例運行期間,重試的用例的結(jié)果,以及這段時間重試的歷史記錄。

安裝:
pip install pytest-rerunfailures

import pytest
import allure


@pytest.mark.flaky(reruns=2,reruns_delay=2)
class TestDemo:

    def test_a(self):
        assert True

    def test_b(self):
        assert False

pytest測試框架——allure報告
pytest測試框架——allure報告

六、allure報告中添加附件

1、添加圖片

應(yīng)用場景:在做UI自動化測試時,可以將頁面截圖,或者出錯的頁面進(jìn)行截圖,將截圖添加到測試報告中展示,輔助定位問題。

解決方案:使用allure.attach或者allure.attach.file()添加圖片。

語法:allure.attach.file( source,name, attachment_type,extension)
參數(shù)解釋:
source:文件路徑,相當(dāng)于傳一個文件。
name:附件名字。
attachment_type:附件類型,是
allure.attachment_type其中的一種(支持PNG、JPG、BMP、GIF等)。
extension:附件的擴(kuò)展名。

案例1

import pytest
import allure


class TestWithAttach:

    def test_pic(self):


        allure.attach.file(source="./1.jpeg",
                           name='圖片',
                           attachment_type=allure.attachment_type.PNG,
                           extension="jpeg")

pytest測試框架——allure報告

案例2

#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2023/2/20 18:46
# @Author  : 杜蘭特
# @File    : test_allure_pic.py

import pytest
import allure


class TestWithAttach:

    def test_pic(self):


        allure.attach.file(source="./1.jpeg",
                           name='圖片',
                           attachment_type=allure.attachment_type.PNG,
                           extension="jpeg")


    def test_pic1(self):
        with open('./1.jpeg',mode='rb') as f:
            file=f.read()
            print(file)
            allure.attach(file,name='頁面截圖',attachment_type=allure.attachment_type.PNG)

pytest測試框架——allure報告

2、添加日志

應(yīng)用場景:報告中添加詳細(xì)的日志信息,有助于分析定位問題。
解決方案:使用python自帶的logging模塊生成日志,日志會自動添加到測試報告中。

import allure

from utils.log_util import logger


@allure.epic("需求1")
@allure.feature("功能模塊一")
class TestEpic:
    @allure.story("子功能一")
    @allure.title("用例1")
    def test_case1(self):
        logger.info("這是 TestEpic 第一條用例")
        print("用例1")

    @allure.story("子功能二")
    @allure.title("用例2")
    def test_case2(self):
        logger.debug("這是 TestEpic 第二條用例")
        print("用例2")

    @allure.story("子功能二")
    @allure.title("用例3")
    def test_case3(self):
        logger.warning("這是 TestEpic 第三條用例")
        print("用例3")

    @allure.story("子功能一")
    @allure.title("用例4")
    def test_case4(self):
        logger.error("這是 TestEpic 第四條用例")
        print("用例4")

    @allure.story("子功能三")
    @allure.title("用例5")
    def test_case5(self):
        print("用例5")

@allure.epic("需求1")
@allure.feature("功能模塊二")
class TestEpic1:
    @allure.story("子功能四")
    def test_case1(self):
        print("用例1")

    @allure.story("子功能五")
    def test_case2(self):
        print("用例2")

    def test_case3(self):
        print("用例3")


@allure.epic("需求2")
class TestEpic2:
    def test_case1(self):
        print("用例1")

    def test_case2(self):
        print("用例2")

    def test_case3(self):
        print("用例3")

pytest測試框架——allure報告

3、添加html

應(yīng)用場景:可以定制測試報告頁面效果,可以將HTML類型的附件顯示在報告頁面上。
解決方案:使用allure.attach()添加html代碼。

語法:
allure.attach (body ,name,attachment_type,extension),參數(shù)解釋:
body:要寫入附件的內(nèi)容(HTML代碼塊)。
name:附件名字。
attachment_type:附件類型,是allure.attachment_type其中的一種。
extension:附件的擴(kuò)展名。

import allure
from utils.log_util import logger

class TestAllureHTML:

    def test_html(self):
        logger.info('測試日志')
        allure.attach(body="""
        <img class="index-logo-src" src="http://www.baidu.com/img/flexible/logo/pc/result.png" alt="到百度首頁" title="到百度首頁">
        """,
                      name='添加html',
                      attachment_type=allure.attachment_type.HTML,
                      extension='html')

pytest測試框架——allure報告

4、添加視頻

應(yīng)用場景:在做UI自動化測試時,可以將頁面截圖,或者出錯的頁面進(jìn)行截圖,將截圖添加到測試報告中展示,輔助定位問題。
解決方案:使用allure.attach. file()添加視頻。

語法:
allure.attach (body ,name,attachment_type,extension),參數(shù)解釋:
body:要寫入附件的內(nèi)容(HTML代碼塊)。
name:附件名字。
attachment_type:附件類型,是allure.attachment_type其中的一種。
extension:附件的擴(kuò)展名。

import allure

class TestWithAttach:

    def test_video(self):
        allure.attach.file("xxx.mp4",
                           name='視頻資源',
                           attachment_type=allure.attachment_type.MP4,
                           extension='mp4')

七、定制allure報告

應(yīng)用場景:針對不同的項目可能需要對測試報告展示的效果進(jìn)行定制,比如修改頁面的logo、修改項目的標(biāo)題或者添加一些定制的功能等等。

1、修改頁面的logo

1.修改allure.yml文件,添加logo插件custom-logo-plugin(在allure安裝路徑下,可以通過where allure或者which allure查看allure安裝路徑))。
2.編輯styles.css文件,配置logo圖片。文章來源地址http://www.zghlxwxcb.cn/news/detail-413331.html

到了這里,關(guān)于pytest測試框架——allure報告的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實不符,請點擊違法舉報進(jìn)行投訴反饋,一經(jīng)查實,立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費用

相關(guān)文章

  • 【Pytest】Allure測試報告的安裝與環(huán)境配置

    【Pytest】Allure測試報告的安裝與環(huán)境配置

    Allure基于Java開發(fā),因此需要提前安裝Java 8 或以上版本的環(huán)境。 jdk下載地址:http://www.codebaoku.com/jdk/jdk-oracle-jdk1-8.html 選擇jdk8,下載完成: 雙擊進(jìn)行安裝,安裝過程中注意記住選擇的路徑(有一個jdk包和一個jre包的保存路徑選擇,我更改了路徑分別到D:javaJDK和D:javaJRE)。

    2024年02月16日
    瀏覽(25)
  • 使用Pytest集成Allure生成漂亮的圖形測試報告

    使用Pytest集成Allure生成漂亮的圖形測試報告

    目錄 前言 依賴包安裝 Pytest Allure Pytest Adaptor 改造基于Pytest的測試用例 生成測試報告 運行測試 生成測試報告 打開測試報告 ?資料獲取方法 之前寫過一篇生成測試報告的博客,但是其實Allure首先是一個可以獨立運行的測試報告生成框架,然后才有了Jenkins的集成插件。 這一次

    2024年02月13日
    瀏覽(31)
  • 軟件測試/測試開發(fā)丨Pytest和Allure報告 學(xué)習(xí)筆記

    軟件測試/測試開發(fā)丨Pytest和Allure報告 學(xué)習(xí)筆記

    本文為霍格沃茲測試開發(fā)學(xué)社學(xué)員學(xué)習(xí)筆記分享 原文鏈接:https://ceshiren.com/t/topic/26755 類型 規(guī)則 文件 test_開頭 或者 _test 結(jié)尾 類 Test 開頭 方法/函數(shù) test_開頭 注意:測試類中不可以添加 __init__ 構(gòu)造函數(shù) 注意:pytest對于測試包的命名沒有要求 方法:類中定義的函數(shù) 函數(shù):類

    2024年02月10日
    瀏覽(51)
  • Pytest模式執(zhí)行python腳本不生成allure測試報告

    Pytest模式執(zhí)行python腳本不生成allure測試報告

    ?1.安裝allure 下載allure的zip安裝包 將allure.zip解壓到python的lib目錄中 將allure的bin路徑添加到環(huán)境變量path中(注意:配置環(huán)境變量后,一定要重啟電腦。因為環(huán)境變量沒生效,我搞了半天在pycharm不能生成報告,在cmd中可以生成報告) 安裝allure-pytest,命令為:? pip install allure-pytes

    2024年02月11日
    瀏覽(21)
  • Pytest單元測試框架 —— Pytest+Allure+Jenkins的應(yīng)用

    Pytest單元測試框架 —— Pytest+Allure+Jenkins的應(yīng)用

    一、簡介 pytest+allure+jenkins進(jìn)行接口測試、生成測試報告、結(jié)合jenkins進(jìn)行集成。 pytest是python的一種單元測試框架,與python自帶的unittest測試框架類似,但是比unittest框架使用起來更簡潔,效率更高 allure-pytest是python的一個第三方庫。用于連接pytest和allure,使它們可以配合在一起

    2024年02月07日
    瀏覽(94)
  • python代碼實現(xiàn)判斷三角形類型,使用pytest進(jìn)行代碼測試,生成allure測試報告

    python代碼實現(xiàn)判斷三角形類型,使用pytest進(jìn)行代碼測試,生成allure測試報告

    一、python代碼判斷三角形類型 寫代碼之前首先我們要知道滿足三角形的條件: 前提條件:三角形邊長都為大于0的數(shù)字 構(gòu)成三角形:兩邊之和大于第三邊 即 a+b c? and a+cb and? b+ca? ?(此三個條件需要同時滿足) 滿足構(gòu)成三角形之后,要考慮構(gòu)成三角形的類型: 三角形分為:

    2024年02月05日
    瀏覽(26)
  • 【Pytest實戰(zhàn)】Pytest+Allure+Jenkins自動化測試框架搭建

    【Pytest實戰(zhàn)】Pytest+Allure+Jenkins自動化測試框架搭建

    ??作者簡介: 小曾同學(xué).com,一個致力于測試開發(fā)的博主??,主要職責(zé):測試開發(fā)、CI/CD 如果文章知識點有錯誤的地方,還請大家指正,讓我們一起學(xué)習(xí),一起進(jìn)步。?? 座右銘:不想當(dāng)開發(fā)的測試,不是一個好測試??。 如果感覺博主的文章還不錯的話,還請點贊、收藏哦

    2024年02月15日
    瀏覽(96)
  • 接口自動化測試實戰(zhàn)之pytest框架+allure講解

    接口自動化測試實戰(zhàn)之pytest框架+allure講解

    本文章主要會講解Python中pytest框架的講解,介紹什么是pytest、為何要測試、為何使用以及參考和擴(kuò)展等等,話不多說,咱們直接進(jìn)入主題喲。 pytest是一款單元測試框架,在編程過程中,單元主要指的是代碼中最小的組成部分,例如函數(shù)或類,在面向?qū)ο笾?,最小的單元就是?/p>

    2024年02月05日
    瀏覽(241)
  • 基于Pytest+Allure+Excel的接口自動化測試框架

    基于Pytest+Allure+Excel的接口自動化測試框架

    Allure 框架是一個靈活的、輕量級的、支持多語言的測試報告工具,它不僅以 Web 的方式展示了簡介的測試結(jié)果,而且允許參與開發(fā)過程的每個人可以從日常執(zhí)行的測試中,最大限度地提取有用信息。 Allure 是由 Java 語言開發(fā)的,支持 Pytest,JaveScript、PHP、Ruby 等。 從 DEV/QA 的角

    2024年02月09日
    瀏覽(29)
  • 接口測試框架pytest+allure+jenkins之jenkins環(huán)境安裝配置步驟

    接口測試框架pytest+allure+jenkins之jenkins環(huán)境安裝配置步驟

    pytest+Allure+jenkins,可以定時跑測試用例,生成測試報告并發(fā)送郵箱,關(guān)聯(lián)git,自動更新git最新代碼,解放雙手。但是對于第一次接觸jenkins的測試人員,裝jenkins環(huán)境和配置job等步驟較繁瑣,很容易出錯。本文將記錄主要的Jenkins安裝和配置步驟,以及容易踩坑的地方。 1. 檢查是

    2024年02月03日
    瀏覽(92)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包