Skip to content

sayeedhussain/flutter_test_pyramid_gdg

Repository files navigation

flutter_test_pyramid_spike

This project attempts to setup the test pyramid for a flutter app. The app has been layered as prescribed by ResoCoder blog https://resocoder.com/category/tutorials/flutter/tdd-clean-architecture/.

Running the project (VSCode)

Running unit + widget + golden tests

From project root (flutter_test_pyramid_spike) run flutter test in Terminal

Running Integration tests

From project root (flutter_test_pyramid_spike) run flutter drive --target=test_driver/cart_increment.dart in Terminal

Types of tests added

Dependencies

All dependencies must be specified in pubspec.yaml

  • App Dependencies

    • dartz: ^0.8.7: For using Either data type for functional style error/repsonse handling
    • http: ^0.12.0+2: For http calls
    • flutter_bloc: ^0.22.1: For adopting the BLoc design pattern (see link below).
    • equatable: ^0.6.0: So that we don't have to define equatability. Avoiding boilerplate.
    • get_it: ^1.0.3: For dependency injection
  • Test Dependencies

    • mockito: ^4.0.0: For mocking. (see link above)

Patterns/Concepts Used

Callouts

Questions

  • Service Locator design
  • Should we group golden_tests and integration tests by feature
  • Wiremock for mocking network calls

Useful links (Optional read)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published