搜尋套件、儲存庫與 APP 分類

套件詳情v0.2.0

given_when_then

一個 Flutter 套件,可在實現程式碼重用的同時讓測試更具可讀性。

AndroidiOSmacOSWindowsLinux
近 30 天下載
34
喜歡數
14
Pub 分數
150

安裝套件

flutter pub add given_when_then

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

一個 Flutter 測試套件,透過結構化的「Given-When-Then」語法提升測試的可讀性並促進程式碼重用。它讓開發者能透過分離設定(Given)、動作(When)與預期(Then)階段來清楚定義測試情境。此方法能提升單元測試與 widget 測試的可維護性與清晰度,特別是在複雜或重複的測試案例中。該套件專為重視乾淨、具表現力測試程式碼的團隊設計,並能與現有的 Flutter 測試框架無縫整合。

適用情境

  • 編寫可讀的單元測試
  • 提高小部件測試的清晰度
  • 重用測試設定邏輯
  • 建立可維護的測試套件
  • 減少測試檔案中的樣板程式碼

主要特色

  • 結構化的 '給定-當-則' 測試組織
  • 對可重複測試步驟的支援
  • 最小的 API 開銷
  • 與 Flutter 的測試生態系統相容
  • 鼓勵使用 DRY 測試模式

適合對象

  • 測試驅動開發團隊
  • 大規模 Flutter 專案
  • 專注於測試可維護性的團隊
  • 撰寫複雜整合測試的開發者
  • 任何想要測試程式碼更乾淨的人

使用建議

  • 需要理解 BDD 風格的測試
  • 最佳搭配其他測試工具,例如 mockito 使用
  • 不是核心測試框架的替代品
  • 僅限測試環境使用
  • 新使用者可能需要稍微適應一下學習曲線

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

Flutter Glove Box

This repo is no longer maintained

09/12/2024 Update:

Unfortunately we have made the tough decision to no longer actively maintain this repository. While the package has served us and the community well, we don't have the capacity to give it the attention it deserves.

We realize that this decision means that open pull requests will not be merged. Our hope is that the community will rally and focus their efforts around more actively maintained packages for aiding in golden-based tests.

Once again, we want to thank each and every one of you for your contributions over the years.

Thank you for your understanding.

Best regards,

The eBay Motors App team


Contains various testing tools that eBay Motors App team is using in their development on daily basis.

License Information

Copyright 2019-2023 eBay Inc.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • Neither the name of eBay Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。