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

套件詳情v2.1.1

test_process

測試流程:啟動;驗證 stdout 和 stderr;檢查退出代碼

AndroidiOSmacOSWindowsLinux
近 30 天下載
11.2萬
喜歡數
12
Pub 分數
70

安裝套件

flutter pub add test_process

套件介紹

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

test_process 套件提供測試 Dart 應用程式中命令列流程的實用工具。它讓開發者能夠啟動外部流程,擷取其 stdout 與 stderr 輸出,並驗證結束代碼,非常適合用於 CLI 工具的整合測試與端對端測試。此套件設計為可與 Dart 測試框架無縫運作,提供跨多個平台的可靠流程管理。支援在 Android、iOS、macOS、Windows 及 Linux 上進行跨平台測試,確保在不同環境中行為一致。

適用情境

  • 測試 CLI 工具行為
  • 驗證過程輸出
  • 驗證退出代碼
  • 跨平台整合測試
  • 測試中的自動化命令執行

主要特色

  • 啟動和管理外部程序
  • 捕獲 stdout 和 stderr
  • 檢查退出代碼
  • 跨平台相容性
  • 與 Dart 測試框架的整合

適合對象

  • CLI 應用開發者
  • 測試自動化工程師
  • 跨平台測試
  • Shell 命令的端到端測試
  • 使用 test 包的 Dart 項目

使用建議

  • 需要 Dart 測試框架
  • 僅限進程級別測試
  • 不支援 GUI 互動
  • 依賴於平台特定命令的可用性
  • 不適合長時間運行或互動式流程

原始 README

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

Dart CI OpenSSF Scorecard

What's here?

Welcome! package:test is the standard testing library for Dart and Flutter. If you have questions about Dart testing, please see the docs for package:test. package:test_api and package:test_core are implementation details and generally not user-facing.

package:checks is a relatively new library for expressing test expectations. It's a more modern version of package:matcher and features a literate API.

Packages

Package Description Issues Version
checks A framework for checking values against expectations and building custom expectations. issues pub package
fake_async Fake asynchronous events such as timers and microtasks for deterministic testing. issues pub package
matcher Support for specifying test expectations via an extensible Matcher class. Also includes a number of built-in Matcher implementations for common cases. issues pub package
test A full featured library for writing and running Dart tests across platforms. issues pub package
test_api The user facing API for structuring Dart tests and checking expectations. pub package
test_core A basic library for writing tests and running them on the VM. pub package
test_descriptor An API for defining and verifying files and directory structures. issues pub package
test_process Test processes: starting; validating stdout and stderr; checking exit code. issues pub package

所屬分類

依賴

依賴清單 4 項

原始碼儲存庫

使用此套件的專案