flutter_test_helpers 0.0.6
flutter_test_helpers: ^0.0.6 copied to clipboard
Comprehensive Flutter testing toolkit with mock data generators, visual regression testing, performance testing, and screenshot testing utilities.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.0.6 - 2025-01-27 #
Added #
- Visual Regression Testing: Compare widgets with golden files for visual consistency
VisualRegressionTesting.expectWidgetMatchesGolden()
for basic visual regression testsVisualRegressionTesting.createVisualTestWidget()
for consistent test widget creationVisualRegressionTesting.createMultiThemeTestWidget()
for theme-based testingVisualRegressionTesting.createResponsiveTestWidget()
for responsive design testingVisualRegressionTesting.createLocalizedTestWidget()
for internationalization testing- Configurable pixel difference thresholds and golden file management
- Performance Testing: Measure widget performance, frame times, and memory usage
PerformanceTesting.measureWidgetPerformance()
for overall widget performancePerformanceTesting.measureActionPerformance()
for specific action performancePerformanceTesting.measureScrollPerformance()
for scroll performance testingPerformanceTesting.measureAnimationPerformance()
for animation performancePerformanceTesting.measureBuildPerformance()
for widget build performance- Configurable performance thresholds and measurement durations
- Screenshot Testing: Capture and save screenshots for documentation and testing
ScreenshotTesting.takeScreenshot()
for basic screenshot captureScreenshotTesting.takeScreenshotAndSave()
for saving screenshots to filesScreenshotTesting.takeResponsiveScreenshots()
for multiple screen sizesScreenshotTesting.takeThemedScreenshots()
for different theme variationsScreenshotTesting.takeLocalizedScreenshots()
for different locale testingScreenshotTesting.createDeviceFrameWidget()
for device frame screenshots- Support for PNG and JPEG formats with configurable settings
- Extension Methods: Convenient extension methods for all testing utilities
WidgetTester.expectWidgetMatchesGolden()
for visual regression testingWidgetTester.measureWidgetPerformance()
for performance testingWidgetTester.takeScreenshot()
andWidgetTester.takeScreenshotAndSave()
for screenshots
- Advanced Example: Comprehensive example demonstrating all new testing capabilities
- Enhanced Documentation: Updated README with detailed usage examples and API documentation
- Full Web and WASM Compatibility: Complete cross-platform support
- Conditional imports for platform-specific file operations
- Web-specific implementations with graceful degradation
- WASM runtime compatibility with stub implementations
- Platform-agnostic API design for maximum compatibility
Changed #
- Updated dependencies to include
golden_toolkit
andalchemist
for enhanced testing capabilities - Enhanced package structure with new testing modules
- Improved test coverage with comprehensive tests for all new functionality
- Restructured conditional imports for optimal platform compatibility
- Updated file operation APIs to use dynamic return types for cross-platform consistency
Fixed #
- Resolved package structure analysis issues that were preventing full Pana score
- Fixed file export structure for better pub.flutter-io.cn analysis compatibility
- Corrected URI resolution issues that were causing analysis failures
- Eliminated direct
dart:io
imports that were causing Web/WASM incompatibility - Fixed conditional import structure for proper platform detection
0.0.5 - 2025-01-27 #
Fixed #
- Fixed DateTime extension methods to properly handle microseconds for endOfDay, endOfMonth, and endOfYear
- Resolved widget testing helper issues with Directionality context for cross-platform compatibility
- Fixed MediaQuery widget test conflicts by using proper widget finder strategies
- Corrected navigation widget tests to include proper route definitions
Changed #
- Updated widget testing helpers to use Directionality instead of MaterialApp/Scaffold for better test isolation
- Enhanced test coverage with 99 comprehensive tests across all functionality
- Improved analysis options configuration by removing deprecated and unrecognized lint rules
- Optimized package metadata for better discoverability and Pana scoring
Added #
- Enhanced integration tests for cross-platform functionality verification
- Improved example application demonstrating WASM compatibility
- Better error handling and test reliability across all platforms
0.0.4 - 2025-08-25 #
Changed #
- Updated package version to 0.0.4 for maintenance release
- Enhanced platform support verification and testing
- Improved WASM compatibility and web platform support
- Optimized example application structure for better testing
- Enhanced dependency management and version compatibility
0.0.3 - 2025-08-25 #
Changed #
- Updated package version to 0.0.3 for maintenance release
- Improved code quality and linting compliance
- Enhanced platform support verification
- Optimized analysis configuration for better scoring
0.0.1 - 2024-12-19 #
Added #
- Initial release of flutter_test_helpers package
- Mock data generators for common Flutter data types
- Test utilities for widget testing
- Widget testing helpers and extensions
- Support for all 6 platforms: iOS, Android, Web, Windows, macOS, Linux
- WASM compatibility
- Comprehensive test coverage
- Flutter linting rules compliance