-
Notifications
You must be signed in to change notification settings - Fork 561
v1: Testing framework #5479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v1: Testing framework #5479
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've reviewed this pull request using the Sourcery rules engine
Deploying flet-docs with
|
Latest commit: |
90a5e01
|
Status: | ✅ Deploy successful! |
Preview URL: | https://c0e2e944.flet-docs.pages.dev |
Branch Preview URL: | https://feodor-v1-tests.flet-docs.pages.dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a comprehensive end-to-end testing framework for the Flet project to enable automated widget testing internally by the Flet team. The framework provides unified testing APIs across both Python and Dart platforms, screenshot capture capabilities, and SSIM-based image comparison for visual regression testing.
Key Changes:
- Added comprehensive testing infrastructure with Tester and TestFinder APIs in both Python and Dart
- Implemented screenshot capture and comparison functionality using SSIM algorithm
- Enhanced Android build configuration and migrated to Kotlin DSL with updated dependencies
- Modified socket server logic to support embedded testing mode (
view=None
)
Reviewed Changes
Copilot reviewed 109 out of 116 changed files in this pull request and generated 5 comments.
Show a summary per file
File | Description |
---|---|
sdk/python/pyproject.toml | Added testing dependencies (pytest_asyncio, numpy, scikit-image) |
sdk/python/packages/flet/src/flet/testing/* | Created Python testing framework with Tester, Finder, and FletTestApp classes |
sdk/python/packages/flet/src/flet/controls/services/screenshot.py | Added Screenshot service for capturing widget screenshots |
sdk/python/packages/flet/src/flet/messaging/flet_socket_server.py | Enhanced socket server with proper connection handling and teardown |
packages/flet/lib/src/testing/* | Implemented Dart testing abstractions (Tester interface, TestFinder) |
packages/flet/lib/src/services/* | Added Dart services for testing (TesterService, ScreenshotService) |
client/android/* | Migrated Android build to Kotlin DSL and updated configurations |
client/integration_test/* | Created Flutter integration test setup with custom tester implementation |
Comments suppressed due to low confidence (1)
client/android/settings.gradle.kts:21
- Android Gradle Plugin version 8.7.3 may not exist. The latest stable version as of my knowledge cutoff was 8.7.0. Please verify this version exists.
id("com.android.application") version "8.7.3" apply false
sdk/python/packages/flet/src/flet/messaging/flet_socket_server.py
Outdated
Show resolved
Hide resolved
Hi @ndonkoHenri! 👋 Only authors and team members can run @sourcery-ai commands on public repos. If you are a team member, install the @sourcery-ai bot to get access ✨ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've reviewed this pull request using the Sourcery rules engine
Co-authored-by: Copilot <[email protected]>
…to feodor/v1-tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Notes
Summary by Sourcery
Add comprehensive end-to-end testing infrastructure for Flet by introducing Tester services, screenshot capture capabilities, sample integration tests in Dart and Python, and necessary build and CI updates.
New Features:
Bug Fixes:
Enhancements:
Build:
CI:
Documentation:
Tests: