spec_cli 는 Dart 및 Flutter 애플리케이션을 위한 간소화된 테스트 프레임워크인 Spec 에 사용되는 명령줄 인터페이스 도구입니다. 직관적인 명령어를 통해 테스트 생성, 실행 및 관리를 단순화합니다. invertase.io 가 개발한 이 도구는 macOS, Windows, Linux 를 지원하며, 개발자가 다양한 플랫폼에서 효율적으로 테스트를 실행할 수 있도록 합니다. `flutter pub add spec_cli` 로 최소한의 설정만으로 기존 워크플로우에 원활하게 통합됩니다. CLI 는 반복 코드를 줄이고 테스트 실행 중 명확한 피드백을 제공하여 생산성을 높입니다. 경량 설계로 속도와 개발자 경험에 집중하고 있습니다.
사용 사례
CI/CD 파이프라인에서 테스트 실행 자동화
빠르게 테스트 파일 생성
최소 구성으로 테스트 실행
기존 Dart/Flutter 프로젝트와의 통합
테스트 탐지 및 보고 간소화
주요 기능
테스트 관리용 간단한 CLI 명령어
크로스 플랫폼 지원 (macOS, Windows, Linux)
Flutter 및 Dart와의 원활한 통합
빠른 테스트 실행 및 피드백
내장 테스트 파일 생성
적합한 대상
효율적인 테스트를 찾는 Dart 및 Flutter 개발자
CI/CD 워크플로우를 사용하는 팀
테스트를 위한 최소한의 설정을 원하는 개발자
테스트 자동화 초보자
개발자 경험을 우선시하는 프로젝트
고려 사항
완전한 기능을 사용하려면 Flutter SDK가 필요합니다
Spec 테스팅 프레임워크를 사용하는 프로젝트에 한정
복잡한 테스트 설정을 위해 추가 구성이 필요할 수 있습니다
Dart/Flutter 프로젝트가 아닌 경우 적합하지 않습니다
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
✅ Spec
A streamlined testing framework for Dart & Flutter.
What is it?
Spec builds on-top of existing Dart & Flutter testing tools to provide a streamlined & elegant testing environment. Spec provides both a CLI tool
and Dart package.
The Spec CLI allows you to run the spec command from your CLI environment and run your tests:
Intuitive testing output interface, inspired by Jest.
Interactive CLI (via spec --watch); automatically re-run tests when source code changes & rerunning of only failed tests.
Run both Dart & Flutter tests in parallel with a single command.
Run tests from multiple packages at the same time using Melos.
Package
The spec package provides a different take on how to write tests. Designed with type-safety and IDE autocompletion in mind, spec alters the way you
write your tests to be more declarative, less error prone and force good habits.
Getting Started
Matchers
Spec CLI works alongside normal Dart test matchers, however also ships with custom matchers, see the API reference docs.
Interactive mode supports a number of keyboard shortcuts:
WatchUsage:
› Press f to run only failed tests.
› Press t to filter by a test name regex pattern.
› Press q to quit watch mode.
› PressEnter to trigger a test run.
GitHub Action
If you want to use Spec in your GitHub actions pipeline you can utilize the
Spec GitHub action, instructions for
how to use it can be found on the the spec-action's marketplace page and in its
repository.