Tagged with #testing

Browse all tags
How to Unit Test AsyncNotifier Subclasses with Riverpod 2.0 in Flutter

How to Unit Test AsyncNotifier Subclasses with Riverpod 2.0 in Flutter

#dart
#flutter
#state-management
#riverpod
#testing

AsyncNotifier is great. But how do we write unit tests for it? Here are all the details and a template you can follow to test your AsyncNotifier subclasses.

How to Add a Custom Test Timeout in Flutter

How to Add a Custom Test Timeout in Flutter

#dart
#flutter
#testing

When a test waits for a stream value that is never emitted, it will timeout after 30 seconds (by default). Here's how to make it fail fast with a custom timeout.

How to Write Tests using Stream Matchers and Predicates in Flutter

How to Write Tests using Stream Matchers and Predicates in Flutter

#dart
#flutter
#testing

The Flutter testing APIs offer some powerful stream matchers and predicates that we can use to verify state changes over time. Let's see how to use them in practice.

How to test functions that throw in Flutter

How to test functions that throw in Flutter

#dart
#flutter
#testing

When writing tests for functions that throw, we should not invoke them directly, but rather pass them as arguments using a tear-off.

How to Generate and Analyze a Flutter Test Coverage Report in VSCode

How to Generate and Analyze a Flutter Test Coverage Report in VSCode

#dart
#flutter
#testing

How to use the flutter tool generate a test coverage report for your app or package, and improve your testing workflow with two helpful VSCode extensions.

Case Study: Automating UI/Integration Tests with Flutter Driver and Codemagic

Case Study: Automating UI/Integration Tests with Flutter Driver and Codemagic

#flutter
#dart
#testing
#CI

Let's see how to write integration tests with Flutter Driver, how they differ from widget tests, and how to run them with Codemagic.

Flutter: Deep Dive with Widget Tests and Mockito

Flutter: Deep Dive with Widget Tests and Mockito

#flutter
#dart
#testing

Deep dive into widget tests. Introduces WidgetTester, Finder, matcher objects, and shows how to write tests for a login screen. Includes test mocks, mockito, acceptance criteria.

Flutter: Add Unit Tests to Your App

Flutter: Add Unit Tests to Your App

#flutter
#dart
#testing

How to extract business logic from your apps into testable classes, and write unit tests in Flutter. Uses a login demo example to write email & password validation tests.

Take your Flutter tests to the next level with abstract classes and dependency injection

Take your Flutter tests to the next level with abstract classes and dependency injection

#flutter
#dart
#testing

This article shows how to write testable code in Flutter, and take your widget tests to the next level.

Browse all tags