测试与安全

flutter-testing-apps

flutter/agent-plugins

Implements unit, widget, and integration tests for a Flutter app. Use when ensuring code quality and preventing regressions through automated testing.

  • 8945 次安装
  • 3100 星标
  • 收录于

安装命令

npx skills add https://github.com/flutter/agent-plugins --skill flutter-testing-apps

SKILL.md

Testing Flutter Applications

Contents

Core Testing Strategies

Balance your testing suite across three main categories to optimize for confidence, maintenance cost, dependencies, and execution speed.

Unit Tests

Use unit tests to verify the correctness of a single function, method, or class under various conditions.

  • Mock all external dependencies.
  • Do not involve disk I/O, screen rendering, or user actions from outside the test process.
  • Execute using the test or flutter_test package.

Testing Flutter Applications

Contents

Core Testing Strategies

Balance your testing suite across three main categories to optimize for confidence, maintenance cost, dependencies, and execution speed.

Unit Tests

Use unit tests to verify the correctness of a single function, method, or class under various conditions.

  • Mock all external dependencies.
  • Do not involve disk I/O, screen rendering, or user actions from outside the test process.
  • Execute using the test or flutter_test package.