패키지, 저장소 및 앱 카테고리 검색

패키지 상세v1.2.0

flutter_test_robots

사용자와 컴퓨터 간의 상호작용을 시뮬레이션하기 위한 Flutter 테스트 도구 및 확장 기능

30일 다운로드
6.4만
좋아요
34
Pub 점수
150

패키지 설치

flutter pub add flutter_test_robots

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

Flutter Test Robots는 Flutter 앱 테스트를 간소화하고 강화하기 위해 설계된 테스트 툴킷으로, 실제 사용자와 컴퓨터의 상호작용을 시뮬레이션하는 확장 기능을 제공합니다. 개발자가 탭, 입력, 스크롤과 같은 사용자 작업을 모방할 수 있는 더 자연스럽고 읽기 쉬운 테스트 스크립트를 작성할 수 있게 해줍니다. Flutter 테스트 프레임워크와의 통합을 위해 제작되었으며, 테스트의 신뢰성과 유지보수성을 향상시킵니다. 이 패키지는 위젯 테스트와 통합 테스트 모두를 지원하여 뼈대 코드 없이 복잡한 UI 동작을 검증하는 것을 쉽게 만듭니다.

사용 사례

  • UI 상호작용 테스트 자동화
  • 테스트에서 사용자 워크플로우 시뮬레이션
  • 테스트의 가독성과 유지보수성 향상
  • 폼 입력 및 탐색 검증
  • 동적 UI 컴포넌트 테스트

주요 기능

  • 인간과 유사한 상호작용 시뮬레이션
  • 읽기 쉬우며 표현력 있는 테스트 문법
  • Flutter 테스트 프레임워크와의 통합
  • 위젯 및 통합 테스트 지원
  • 확장 가능하고 조합 가능한 액션 체인

적합한 대상

  • Flutter 개발자가 자동화된 테스트를 작성하고 있습니다
  • 테스트 품질과 명확성을 우선시하는 팀
  • 복잡한 UI 상호작용 검증이 필요한 프로젝트
  • Flutter를 사용하는 테스트 자동화 엔지니어
  • 테스트 불안정성을 줄이려는 개발자

고려 사항

  • Flutter 테스트에 익숙해야 합니다
  • 테스트 세트 크기가 약간 증가할 수 있습니다
  • UI가 아닌 테스트 시나리오에는 적합하지 않습니다
  • 기본 예제 외에 문서가 제한적
  • 기존 테스트 프레임워크와 함께 사용하는 것이 가장 좋습니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

Flutter Test Robots - Easily simulate human behaviors in tests

Built by the Flutter Bounty Hunters



Check out our Usage Guide


Easy keyboard shortcuts

flutter_test_robots adds methods to WidgetTester for many common keyboard shortcuts.

void main() {
  testWidgets("easy shortcuts", (tester) async {
    await tester.pressEnter();

    await tester.pressShiftEnter();
    
    await tester.pressAltLeftArrow();
  });
}

Simulate hardware keyboard text input

flutter_test_robots presses key combos for every character in a given string.

void main() {
  testWidgets("type with a hardware keyboard", (tester) async {
    // Simulate every key press that's needed to type "Hello, world!".
    await tester.typeKeyboardText("Hello, world!");
  });
}

Simulate IME text input

flutter_test_robots breaks strings into text editing deltas and sends the deltas through the standard DeltaTextInputClient API.

void main() {
  testWidgets("type with the IME", (tester) async {
    // Simulate every IME delta needed to type "Hello, world!".
    await tester.ime.typeText("Hello, world!");
  });
}

Simulate popular mobile devices

flutter_test_robots can configure a WidgetTester viewport like popular recent phones.

void main() {
  testWidgets("renders on iPhone 16 Pro Max", (tester) async {
    tester.asIPhone16ProMax();

    await tester.pumpWidget(MyApp());
  });

  testWidgets("renders on every built-in test device", (tester) async {
    for (final device in TestDevices.all) {
      tester.configureForDevice(device);

      await tester.pumpWidget(MyApp());
    }
  });
}

카테고리

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.

순위