dart_test_adapter 패키지는 `dart test` 및 `flutter test` 명령과 프로그래밍 방식으로 상호 작용할 수 있는 Dart API를 제공합니다. 개발자가 테스트를 실행하고 결과를 분석하며 Dart 애플리케이션 내에서 테스트 실행을 관리할 수 있게 해주며, 사용자 정의 도구나 CI/CD 파이프라인에 테스트 워크플로우를 통합하는 데 이상적입니다. Android, iOS, macOS, Windows, Linux 등 다양한 개발 환경에서 사용하도록 설계되었으며, 쉘 스크립트에 의존하지 않고도 테스트 실행을 원활하게 자동화하고 제어할 수 있습니다. 이 패키지는 invertase.io에서 유지 관리되며 오픈 소스입니다.
사용 사례
CI/CD 파이프라인에서 테스트 실행 자동화
사용자 정의 개발 도구에 테스트 러너 통합
프로그래밍적으로 테스트 결과 분석
Dart 애플리케이션 내에서 테스트 실행
동적 테스트 구성 활성화
주요 기능
테스트 러너에 대한 프로그래밍 접근
크로스 플랫폼 지원
Flutter 및 Dart 테스트 프레임워크와의 통합
실시간 결과 파싱
오픈소스이며 지속적으로 유지 관리되고 있습니다
적합한 대상
CI/CD 자동화 엔지니어
테스트 프레임워크 개발자
도구 제작자
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.