• 點部落
  • 首頁
  • RSS
    • 登入

余小章 @ 大內殿堂

祕訣無它,唯勤而已;唯有不斷學習,才能成長 by 余小章

2025-05-04

使用 pytest 測試 API (FastAPI) - 續

  • 51
  • 0
  • Integration Test
  • 2025-05-10

上篇  使用 Memory 作為 Web API 的 Repository,這次改用 Postgresql 並搭配 DI Container,也包含了資料庫的操作驗證

...繼續閱讀 »
  • Integration Test
  • pytest
  • Python
  • Unit Test
2025-04-06

使用 pytest 測試 API (FastAPI)

  • 73
  • 0
  • Integration Test
  • 2025-04-07

在 python 利用 FastAPI 建立 API 非常的簡單,同樣的,要測試它也非常地容易,這裡我會使用一個簡單的例子,演練 pytest 測試 API (FastAPI)

...繼續閱讀 »
  • Integration Test
  • pytest
  • Python
  • Unit Test
2025-04-04

pytest 入門使用手冊

  • 75
  • 0
  • Unit Test
  • 2025-04-05

pytest 是一個功能強大且靈活的 Python 測試框架,身為一個開發者學好怎麼寫測試是基本的必要條件,以下是我對 pytest 的使用心得。

...繼續閱讀 »
  • Integration Test
  • pytest
  • Python
  • Unit Test
2025-03-31

建立 Python + TestContainers 開發環境

  • 91
  • 0
  • Integration Test
  • 2025-04-01

之前有介紹過 TestContainers 在 .NET 的使用方式 傳送們,同樣的 Python 也可以使用它,就不再贅述太多;我將使用 WSL + Python 環境搭建起開發環境。

result image
...繼續閱讀 »
  • Integration Test
  • Test
  • Unit Test
2024-01-01

Specflow table 搭配 json 資料的幾個需要注意的寫法

  • 227
  • 0
  • SpecFlow
  • 2024-01-02

Specflow 的 table 預設用來處理單一欄位,若是想要在欄位裡面塞入 json 或者是比對 json 就得自行處理,這裡列出我常用的方式。

...繼續閱讀 »
  • C#
  • Integration Test
  • SpecFlow
  • Unit Test
2023-09-08

通過 TestContainers 產生測試所依賴的環境

  • 1538
  • 0
  • Integration Test
  • 2023-09-10

在測試時,TestContainers 它可以簡化我們產生 Container 的步驟,配置 Container 的方式也相當的簡單、明確;從同事得知 TestContainers,周末則來研究一下使用方式。

Test workflow
...繼續閱讀 »
  • Docker
  • Integration Test
  • Test
2022-12-10

如何在 SpecFlow Step 注入物件 / Context Dependency Injection in Specflow

  • 358
  • 0
  • SpecFlow
  • 2022-12-11

當 SpecFlow 的測試步驟需要依賴其他物件時,SpecFlow 支援  Context Dependency Injection,只要在 Step 的建構函數開洞,SpecFlow 就會自動幫你注入

...繼續閱讀 »
  • Integration Test
  • SpecFlow
  • Unit Test
2021-10-23

[ASP.NET Core 5] 利用 WebApplicationFactory 進行 Web API 整合測試

  • 1827
  • 0
  • Integration Test
  • 2021-10-24

以往 ASP.NET Core 可以使用 TestServer 來進行整合測試,現在多了一個選擇 WebApplicationFactory,WebApplicationFactory 基於 TestServer 又封裝了更多的功能,我覺得使用起來又更簡單了,如果可以的話可以改用它

...繼續閱讀 »
  • ASP.NET Core
  • Integration Test
  • Unit Test
2019-11-14

[ASP.NET Core 3] 利用 TestServer 進行 Web API 整合測試

  • 2251
  • 0
  • Integration Test
  • 2021-10-23

 .NET Framework 可以利用 OWIN 把 Web API 掛載起來,用測試打進去,在 .NET Core 可以用 WebHost,如果你需要 .NET Framework 的請到以下連結https://dotblogs.com.tw/yc421206/2019/01/05/webapi_test_via_owin

 

...繼續閱讀 »
  • ASP.NET Core
  • Integration Test
  • Unit Test
  • 1

系列文章

最新留言

標籤雲

  • 服務規範
  • 聯絡我們
© 2025 點部落 Ver. 2022.9.27.1
電魔小鋪有限公司 製作、維運;登豐數位科技 提供資安檢測