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

패키지 상세v0.2.0

given_when_then

코드 재사용을 가능하게 하면서 테스트의 가독성을 높이는 Flutter 패키지입니다.

AndroidiOSmacOSWindowsLinux
30일 다운로드
34
좋아요
14
Pub 점수
150

패키지 설치

flutter pub add given_when_then

패키지 개요

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

구조화된 'Given-When-Then' 구문을 통해 테스트의 가독성을 향상시키고 코드 재사용을 촉진하는 플러터 테스팅 패키지입니다. 개발자가 설정(Given), 동작(When), 기대(Then) 단계를 분리하여 테스트 시나리오를 명확히 정의할 수 있도록 합니다. 이 접근 방식은 특히 복잡하거나 반복적인 테스트 케이스에서 단위 테스트 및 위젯 테스트의 유지보수성과 명확성을 높입니다. 깔끔하고 표현력 있는 테스트 코드를 우선시하는 팀을 위해 설계되었으며, 기존 플러터 테스팅 프레임워크와 원활하게 통합됩니다.

사용 사례

  • 읽기 쉬운 단위 테스트 작성
  • 위젯 테스트 명확성 향상
  • 테스트 설정 로직 재사용
  • 유지보수 가능한 테스트 세트 만들기
  • 테스트 파일 내 봇일러플레이트 줄이기

주요 기능

  • 구조화된 '주어진-때-그러면' 테스트 조직
  • 재사용 가능한 테스트 단계 지원
  • 최소한의 API 오버헤드
  • Flutter의 테스트 생태계와 호환됩니다
  • DRY 테스트 패턴을 장려합니다

적합한 대상

  • 테스트 주도 개발 팀
  • 대규모 플러터 프로젝트
  • 테스트 유지보수에 집중하는 팀
  • 복잡한 통합 테스트를 작성하는 개발자
  • 더 깔끔한 테스트 코드를 원하는 사람

고려 사항

  • BDD 스타일 테스트에 대한 이해가 필요합니다
  • 다른 테스트 도구(예: mockito)와 함께 사용하는 것이 가장 좋습니다
  • 핵심 테스트 프레임워크의 대체품이 아님
  • 테스트 환경 사용에 제한됨
  • 새 사용자에게 약간의 학습 곡선이 추가될 수 있습니다

원본 README

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

Flutter Glove Box

This repo is no longer maintained

09/12/2024 Update:

Unfortunately we have made the tough decision to no longer actively maintain this repository. While the package has served us and the community well, we don't have the capacity to give it the attention it deserves.

We realize that this decision means that open pull requests will not be merged. Our hope is that the community will rally and focus their efforts around more actively maintained packages for aiding in golden-based tests.

Once again, we want to thank each and every one of you for your contributions over the years.

Thank you for your understanding.

Best regards,

The eBay Motors App team


Contains various testing tools that eBay Motors App team is using in their development on daily basis.

License Information

Copyright 2019-2023 eBay Inc.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • Neither the name of eBay Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

카테고리

소스 저장소

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

아직 데이터가 없습니다.