Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

[e2e] add support to report extra information #2873

Merged
merged 11 commits into from
Jul 16, 2020

Conversation

CareF
Copy link
Contributor

@CareF CareF commented Jul 14, 2020

Description

Added an extra field extraInfo in lib/common.dart. Use case is to use the field to report performance. E.g. in flutter/flutter#61509, I'm migrating one existing test to an e2e based performance test. The use case is not complete because I still need to add other performance metrics but for a demo of the use case it's sufficient.

I'm not naming it to performance because in some of our device lab test the reported value is not for performance.

Related Issues

Resolves flutter/flutter#61490

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (flutter analyze) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide.
  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
  • I updated CHANGELOG.md to add a description of the change.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
  • No, this is not a breaking change.

@CareF CareF requested review from dnfield and liyuqian July 14, 2020 23:43
@CareF CareF requested a review from digiter as a code owner July 14, 2020 23:43
@CareF CareF self-assigned this Jul 14, 2020
@CareF
Copy link
Contributor Author

CareF commented Jul 14, 2020

It might be good to put some part of https://github.com/CareF/flutter/blob/e2e_trial/dev/benchmarks/macrobenchmarks/test/util.dart to E2E, but I'm not sure for that.

@CareF CareF force-pushed the e2e_add_performance_metric branch from 2216192 to 182f6ad Compare July 15, 2020 01:08
@CareF CareF force-pushed the e2e_add_performance_metric branch from df96795 to e9bf7bb Compare July 15, 2020 18:52
@CareF CareF requested a review from dnfield July 15, 2020 18:52
@dnfield
Copy link
Contributor

dnfield commented Jul 15, 2020

Can you add some test(s) for this?

@CareF
Copy link
Contributor Author

CareF commented Jul 15, 2020

Can you add some test(s) for this?

@dnfield The test would require running on a device. I think I can add something to the example as test, though I don't think it will be tracked by CI.

@dnfield
Copy link
Contributor

dnfield commented Jul 15, 2020

You should be able to write some unit tests right?

@CareF CareF force-pushed the e2e_add_performance_metric branch from e9bf7bb to 9d31c55 Compare July 15, 2020 19:04
@CareF
Copy link
Contributor Author

CareF commented Jul 15, 2020

You should be able to write some unit tests right?

Currently we don't have any unit test for E2E, and I kind of believe it's because this package is all about adapting for running tests for different ways. But yeah it's probably the good point to start unit test here.

@CareF
Copy link
Contributor Author

CareF commented Jul 15, 2020

@dnfield Unit test done. I'm a little bit proud for coming up a way to unit test the binding.

@CareF CareF force-pushed the e2e_add_performance_metric branch from 1d3833a to f9eb6db Compare July 15, 2020 20:40
@CareF CareF requested a review from dnfield July 15, 2020 22:12
Copy link
Contributor

@dnfield dnfield left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

@liyuqian liyuqian left a comment

Choose a reason for hiding this comment

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

LGTM with one nit.

@CareF CareF merged commit fbd6510 into flutter:master Jul 16, 2020
@CareF CareF deleted the e2e_add_performance_metric branch July 23, 2020 15:05
jorgefspereira pushed a commit to jorgefspereira/plugins_flutter that referenced this pull request Oct 10, 2020
FlutterSu pushed a commit to FlutterSu/flutter-plugins that referenced this pull request Nov 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[plugins/e2e] Add interface in E2EWidgetsFlutterBinding to support adding extra information in the reported result field
4 participants