kiri_check
1.4.0, released 4 weeks ago by szktty.jp
Property-based testing library for Dart, integrating with package:test.
What it does
It lets you define properties that are automatically tested with random data, supports custom exploration, and offers stateful testing for systems that change over time.
AI-written summary of version 1.4.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- Writing property-based tests for Dart code
- Testing stateful systems like databases or UI state machines
- Integrating tests into existing package:test suites
Skip it when
- Replacing unit tests that only check specific inputs
- Using in projects that require code generation or declarative UI patterns
Strengths
- Seamless integration with package:test
- Supports stateful testing
- Customizable exploration and shrinking
- Cross-platform support (Android, iOS, web, desktop)
Weaknesses
- No built-in async support documented
- Limited to Dart (no Flutter widgets integration)
- Requires manual setup of stateful behaviors
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 6
Add as dev_dependency and import 'package:kiri_check/kiri_check.dart'; no build_runner needed
import 'package:kiri_check/kiri_check.dart';
void main() {
property('FizzBuzz', () {
forAll(integer(min: 0, max: 100), (n) {
final result = fizzbuzz(n);
if (n % 15 == 0) {
expect(result, 'FizzBuzz');
} else if (n % 3 == 0) {
expect(result, 'Fizz');
} else if (n % 5 == 0) {
expect(result, 'Buzz');
} else {
expect(result, n.toString());
}
});
});
}Alternatives
Packages that do the same job and could replace kiri_check.
- patrol_log
Log package for Patrol, a Flutter-native UI testing framework
87Compare - flame_test
Classes and helpers for testing applications built with the Flame Engine.
80Compare - golden_screenshot
Utilities to automate screenshot generation using Flutter's golden tests.
76Compare - bdd_widget_test
Generate Flutter widget tests from Gherkin feature files
88Compare
Works with
Packages commonly used together with kiri_check: ones it builds on, ones built on it, and its own family.
- testkiri_check depends on itA full featured library for writing and running Dart tests across platforms.
- timezonekiri_check depends on itTime zone databases and time zone aware DateTime class in Dart.
- universal_platformkiri_check depends on itPlatform detection across Flutter, Dart web, and desktop without errors
- date_kitkiri_check depends on itDart package for DateTime manipulation, formatting, and parsing operations.