-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work lista: pluginsSupport for writing, building, and running plugin packagesSupport for writing, building, and running plugin packagespackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.toolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
Description
Currently when making a plugin via flutter create -t plugin the tests it makes are:
- Dart unit tests for the plugin (
test/) - Dart unit tests for the example app (
example/test/)
1 is useful (2 not so much), but woefully inadequate for a plugin because Dart unit tests can't load plugins, thus don't exercise any of the native code.
Based on what we've found to be best practice with our own plugins, we should add:
-
integration_test-based Flutter driver tests in example/ (this is probably the single most important category of tests for a plugin) - native unit tests for each native language
- Android Java
- Android Kotlin
- iOS Obj-C
- iOS Swift
- Linux (C)
- macOS (Swift)
- Windows (C++)
This would make it clearer for people both what tests they should probably have, and also how to get started with them.
Metadata
Metadata
Assignees
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work lista: pluginsSupport for writing, building, and running plugin packagesSupport for writing, building, and running plugin packagespackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.toolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.