Repository navigation
Open
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterf: integration_testThe flutter/packages/integration_test pluginThe flutter/packages/integration_test pluginframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.platform-androidAndroid applications specificallyAndroid applications specificallyplatform-webWeb applications specificallyWeb applications specificallyteam-frameworkOwned by Framework teamOwned by Framework teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-frameworkTriaged by Framework teamTriaged by Framework team
Description
Since the area of focus for 2022 roadmap is developer experience, the developer experience regarding integration test commands could be improved. Mainly by not requiring hard coded device ids.
Currently you have to:
- for web, start chromedriver with the correct port in another shell
- for android, start the emulator and set the right emulator id in the command
Here is a few ideas, for android it could:
1. check that `adb devices` has devices
2a. if multiple devices are available display menu to pick device on which to run
3a. run
2b. there is no device then display menu to pick emulator from `emulator -list-avds`
3b. wait emulator started
4b. run test on that emulator
2c. if argument `--first-device` is passed, run test on first device found in `adb devices`, same for `--first-emulator`
For web it could:
1. start chromedriver
2. run tests with the correct port
3. kill both unless `--keep-chromedriver-alive`
The --port parameter is also lacking in web integration test, which makes whitelisting localhost:port impossible, you have to whitelist every ports.
Reacted by Abdul rehman and stnamco
Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterf: integration_testThe flutter/packages/integration_test pluginThe flutter/packages/integration_test pluginframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.platform-androidAndroid applications specificallyAndroid applications specificallyplatform-webWeb applications specificallyWeb applications specificallyteam-frameworkOwned by Framework teamOwned by Framework teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-frameworkTriaged by Framework teamTriaged by Framework team
Activity
[-][Flutter drive] improve cli experience[/-][+][Flutter drive] improve commands experience[/+]darshankawar commentedon Jan 31, 2022
@cedvdb
Is this for
flutter driverorintegration_testpackage ?Currently, to run
integration_teston Android for example, according to the documentation, we need to run./gradlew app:connectedAndroidTest -Ptarget=pwd/../integration_test/foo_test.dartSee below links for Android and iOS device settings:
https://github.com/flutter/flutter/tree/master/packages/integration_test#android-device-testing
https://github.com/flutter/flutter/tree/master/packages/integration_test#ios-device-testing
Currently, we can't directly run
flutter testcommand for web and need to start chrome driver in another shell as you mentioned.cedvdb commentedon Jan 31, 2022
@darshankawar that is not true, you do not need to run such command on android, I believe it is for firebase Lab test. Similarly this command you posted, with its required setup should also be made more developer friendly. I opened another issue this weekend about that. #97464
It is for the command flutter driver but the underlying package is integration_test (not the old deprecated package).
The command to run on android is:
Where the DEVICE_ID is either the emulator or the real device.
This command is unrealistic to be run without a predefined shell script. Because it requires too much setup. Not only you'd have to type all the command above but you have also to start up an emulator and gets its id. This becomes annoying very quickly.
Making this process easier is what I think would be a added value.
[-][Flutter drive] improve commands experience[/-][+][Flutter drive/integration_test] improve commands experience[/+]