-
Notifications
You must be signed in to change notification settings - Fork 581
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
Merged
Merged
v1: Testing framework #5479
Changes from 11 commits
Commits
Show all changes
71 commits
Select commit
Hold shift + click to select a range
7df4543
Early prototype
FeodorFitsner c409b03
Tester service and basic functionality
FeodorFitsner 3b7ba75
Cleanup, being able to test app's main
FeodorFitsner 118cf0c
guess platform
FeodorFitsner 6db221c
Fix passing FLET_TEST_APP_URL
FeodorFitsner 5793c37
Update Flet client Android template
FeodorFitsner 8f8ef75
The most of tester methods are implemented
FeodorFitsner 881f270
Run pytest packages/flet/tests only
FeodorFitsner e5056a2
Screenshot control
FeodorFitsner 6b8c0ff
Taking and comparing control screenshots
FeodorFitsner 6c23893
Golden images per platform
FeodorFitsner 841672b
Try macOS integration tests on CI
FeodorFitsner 130a9ea
Fix flutter install
FeodorFitsner 4581bcb
Run tests with debug output
FeodorFitsner a1da308
install cocoapods
FeodorFitsner e8f7b91
Simulate mouse hover event
FeodorFitsner 1b1e704
Add more logging
FeodorFitsner 6386f05
Try this trick
FeodorFitsner 4af002b
Try this
FeodorFitsner 4d85778
Merge branch 'main' into feodor/v1-tests
FeodorFitsner de98f2e
Fix windows build in yaml
FeodorFitsner 361188a
Enable ignore_cleanup_errors for temp dirs
FeodorFitsner 1707088
Fix artifacts
FeodorFitsner 1d51263
Run all CI jobs
FeodorFitsner 21bc579
Fix last job
FeodorFitsner b3ce4dd
Enable integration tests
FeodorFitsner 736f252
Fix integration test
FeodorFitsner 340bdae
brew install cocoapods
FeodorFitsner 1cd7581
Run all integration tests
FeodorFitsner 3521ec2
Save actual image
FeodorFitsner 69a8b66
Fix artifacts section
FeodorFitsner 2334ef3
Update .appveyor.yml
FeodorFitsner e0fe858
Merge branch 'main' into feodor/v1-tests
FeodorFitsner 93707b0
Push images on failure
FeodorFitsner 19fc553
Fix find path
FeodorFitsner 4c8317f
Try pixel_ratio=2.0
FeodorFitsner 8933265
More reliably close connection
FeodorFitsner 0d0bc31
Run all tests
FeodorFitsner 65be79a
Fix env var
FeodorFitsner 77479d5
Add duration to pump
FeodorFitsner fb741f3
More logging to close method
FeodorFitsner f338d43
Allow tasks to be cancelled
FeodorFitsner ab0fd32
Cancel wait timeout
FeodorFitsner 663ee27
Properly shutdown TCP server
FeodorFitsner f3790c9
More check on server close
FeodorFitsner 236a47b
Improve handle_connection()
FeodorFitsner e37ba3d
More logging to handle_connection()
FeodorFitsner b62d930
Some logging cleanup
FeodorFitsner 76f0dc5
Implement ScreenshotKey instead of Screenshot control
FeodorFitsner e7fe6f6
Use FVM to run Flutter, add more to readme
FeodorFitsner 4e3a103
Remove fvm
FeodorFitsner 0440504
TextField test and readme
FeodorFitsner a33e6f9
Fix accuracy of image compare algo
FeodorFitsner bb4c400
Re-enable all CI jobs
FeodorFitsner b83b728
Simplify integration tests
FeodorFitsner 075c25a
Text test baseline
FeodorFitsner 3c89256
`page.test` property
FeodorFitsner f4d162e
Copilot fix: The task cancellation loop with individual timeout
FeodorFitsner 99d5619
Fix double key check
FeodorFitsner 6cc79e0
Merge branch 'feodor/v1-tests' of https://github.com/flet-dev/flet in…
FeodorFitsner b9ed1cb
Configurable threshold value
FeodorFitsner 70cea5d
Fix backend imports
FeodorFitsner 5a2f4a3
Disable pgsl repo
FeodorFitsner 0e93442
Find apt for pgsql
FeodorFitsner 09e2af8
Fix pgsql
FeodorFitsner a0e37c9
Re-enable all CI jobs
FeodorFitsner 23f9d5d
Docs: Added services and testing classes
FeodorFitsner 719e936
Rollback Screenshot control
FeodorFitsner d501ad5
Fix tests to use Screenshot control
FeodorFitsner 278fadb
Docs, examples for testing and Screenshot, cleanup
FeodorFitsner 90a5e01
Fixed review notes
FeodorFitsner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
plugins { | ||
id("com.android.application") | ||
id("kotlin-android") | ||
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. | ||
id("dev.flutter.flutter-gradle-plugin") | ||
} | ||
|
||
android { | ||
namespace = "com.appveyor.flet_client" | ||
compileSdk = flutter.compileSdkVersion | ||
ndkVersion = "27.0.12077973" | ||
|
||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_11 | ||
targetCompatibility = JavaVersion.VERSION_11 | ||
} | ||
|
||
kotlinOptions { | ||
jvmTarget = JavaVersion.VERSION_11.toString() | ||
} | ||
|
||
defaultConfig { | ||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). | ||
applicationId = "com.appveyor.flet_client" | ||
// You can update the following values to match your application needs. | ||
// For more information, see: https://flutter.dev/to/review-gradle-config. | ||
minSdk = 23 | ||
targetSdk = flutter.targetSdkVersion | ||
versionCode = flutter.versionCode | ||
versionName = flutter.versionName | ||
} | ||
|
||
buildTypes { | ||
release { | ||
// TODO: Add your own signing config for the release build. | ||
// Signing with the debug keys for now, so `flutter run --release` works. | ||
signingConfig = signingConfigs.getByName("debug") | ||
} | ||
} | ||
} | ||
|
||
flutter { | ||
source = "../.." | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,25 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.appveyor.flet"> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<!-- The INTERNET permission is required for development. Specifically, | ||
the Flutter tool needs it to communicate with the running application | ||
to allow setting breakpoints, to provide hot reload, etc. | ||
--> | ||
<uses-permission android:name="android.permission.INTERNET"/> | ||
<uses-permission android:name="android.permission.INTERNET" /> | ||
<!-- Media access permissions. | ||
Android 13 or higher. | ||
https://developer.android.com/about/versions/13/behavior-changes-13#granular-media-permissions --> | ||
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" /> | ||
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" /> | ||
<!-- Storage access permissions. Android 12 or lower. --> | ||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> | ||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | ||
<uses-permission android:name="android.permission.RECORD_AUDIO" /> | ||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> | ||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> | ||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> | ||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_LOCATION" /> | ||
<uses-permission android:name="android.permission.WAKE_LOCK" /> | ||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" /> | ||
<!-- Google TV --> | ||
<uses-feature android:name="android.software.leanback" android:required="false" /> | ||
<uses-feature android:name="android.hardware.touchscreen" android:required="false" /> | ||
</manifest> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 0 additions & 6 deletions
6
client/android/app/src/main/kotlin/com/appveyor/flet/MainActivity.kt
This file was deleted.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
client/android/app/src/main/kotlin/com/appveyor/flet_client/MainActivity.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package com.appveyor.flet_client | ||
|
||
import io.flutter.embedding.android.FlutterActivity | ||
|
||
class MainActivity : FlutterActivity() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,25 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.appveyor.flet"> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<!-- The INTERNET permission is required for development. Specifically, | ||
the Flutter tool needs it to communicate with the running application | ||
to allow setting breakpoints, to provide hot reload, etc. | ||
--> | ||
<uses-permission android:name="android.permission.INTERNET"/> | ||
<uses-permission android:name="android.permission.INTERNET" /> | ||
<!-- Media access permissions. | ||
Android 13 or higher. | ||
https://developer.android.com/about/versions/13/behavior-changes-13#granular-media-permissions --> | ||
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" /> | ||
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" /> | ||
<!-- Storage access permissions. Android 12 or lower. --> | ||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> | ||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | ||
<uses-permission android:name="android.permission.RECORD_AUDIO" /> | ||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> | ||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> | ||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> | ||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_LOCATION" /> | ||
<uses-permission android:name="android.permission.WAKE_LOCK" /> | ||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" /> | ||
<!-- Google TV --> | ||
<uses-feature android:name="android.software.leanback" android:required="false" /> | ||
<uses-feature android:name="android.hardware.touchscreen" android:required="false" /> | ||
</manifest> |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
allprojects { | ||
repositories { | ||
google() | ||
mavenCentral() | ||
} | ||
} | ||
|
||
val newBuildDir: Directory = rootProject.layout.buildDirectory.dir("../../build").get() | ||
rootProject.layout.buildDirectory.value(newBuildDir) | ||
|
||
subprojects { | ||
val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name) | ||
project.layout.buildDirectory.value(newSubprojectBuildDir) | ||
} | ||
subprojects { | ||
project.evaluationDependsOn(":app") | ||
} | ||
|
||
tasks.register<Delete>("clean") { | ||
delete(rootProject.layout.buildDirectory) | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
org.gradle.jvmargs=-Xmx1536M | ||
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError | ||
android.useAndroidX=true | ||
android.enableJetifier=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
#Fri Jun 23 08:50:38 CEST 2017 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.