Skip to content

Add capability to flutter test --platform=chrome - #33525

Merged
jonahwilliams merged 8 commits into
flutter:masterfrom
jonahwilliams:land_flutter_tester_testing
May 31, 2019
Merged

jonahwilliams merged 8 commits into
flutter:masterfrom
jonahwilliams:land_flutter_tester_testing

Conversation

@jonahwilliams

Copy link
Copy Markdown
Contributor

Description

Allows running flutter tests compiled to JavaScript served through a chrome instance. Requires engine and framework changes to actually run tests.

Related Issues

#33349

@goderbauer goderbauer added the tool Affects the "flutter" command-line tool. See also t: labels. label May 29, 2019
@jonahwilliams
jonahwilliams requested a review from blasten May 31, 2019 16:44
Comment thread packages/flutter_tools/static/index.html
Comment thread packages/flutter_tools/lib/src/test/flutter_web_platform.dart Outdated
Comment thread packages/flutter_tools/lib/src/commands/test.dart
@blasten
blasten self-requested a review May 31, 2019 19:31

@blasten blasten left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🥁

@@ -1,5 +1,8 @@
targets:
$default:
builders:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do these need to be explicitly disabled? flutter_tools don't have any web code afaict.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because we use build_runner for running tests and build_runner scans the pubspec for dependencies to determine which targets to build. Since we now depend on build_web_compilers, it tries to initialize a bunch of web builders for the test script. This hasn't fully stopped the errors, I suspect we need to disable more builders.

@jonahwilliams
jonahwilliams merged commit 4db845f into flutter:master May 31, 2019
@jonahwilliams
jonahwilliams deleted the land_flutter_tester_testing branch May 31, 2019 22:55
@tvolkert

tvolkert commented Jun 3, 2019

Copy link
Copy Markdown
Contributor

'package:test/src/runner/browser/browser_manager.dart' isn't available inside Google, and thus is blocking a dev release. I'm going to revert for now to unblock the roll.

FYI @jonahwilliams

tvolkert added a commit that referenced this pull request Jun 3, 2019
@jonahwilliams
jonahwilliams restored the land_flutter_tester_testing branch June 4, 2019 06:44
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants