Skip to content

Conversation

@jmagman
Copy link
Member

@jmagman jmagman commented Jan 21, 2022

On drive test failure, take a screenshot before the app is stopped to capture the state of the running app.

If that screenshot is taken, do not take another screenshot on exceptions (screenshotTaken).

Reverts some of the behavior from
#96828 (comment) which added a screenshot if the app fails to start, before tests are run.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@jmagman jmagman added the tool Affects the "flutter" command-line tool. See also t: labels. label Jan 21, 2022
@jmagman jmagman self-assigned this Jan 21, 2022
@jmagman jmagman force-pushed the drive-fail-screenshot branch from e5b2d43 to 06ff0ae Compare January 24, 2022 19:10
@fluttergithubbot fluttergithubbot merged commit c171072 into flutter:master Jan 25, 2022
@jmagman jmagman deleted the drive-fail-screenshot branch January 25, 2022 22:47
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 26, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Feb 4, 2022
@jmagman jmagman added team: flakes a: tests "flutter test", flutter_test, or one of our tests labels Feb 18, 2022
clocksmith pushed a commit to clocksmith/flutter that referenced this pull request Mar 8, 2022
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Nov 6, 2024
…ntegration_test runs (#7430)

1. Native Xcode tests will output a helpful "xcresult" package on failure containing logs, screenshots, and screen recordings.  Zip and upload these results when tests fail.

2. Pass `flutter test --debug-logs-dir` flag to upload logs  like flutter/flutter#142643.

3. Pass `flutter drive --screenshot` flag to upload screenshots on timeout like flutter/flutter#96973.

Example of [failing Xcode analyzer build](https://ci.chromium.org/ui/p/flutter/builders/try/Mac_arm64%20ios_platform_tests_shard_5%20master/17374/overview) has the [zipped xcresult](https://storage.googleapis.com/flutter_logs/flutter/ff98c32e-18ca-4ad4-a910-9db1d7f7e4b0/xcode%20analyze/ff98c32e-18ca-4ad4-a910-9db1d7f7e4b0/xcodebuild-2024-10-25T09:56:46.440913.zip) attached as a log.
![Screenshot 2024-10-25 at 10 10 36�AM](https://github.com/user-attachments/assets/dd7ae9bc-6161-4381-8a4f-f10b8c981801)

The unzipped xcresult looks like this in Xcode:

![Screenshot 2024-10-25 at 10 11 55�AM](https://github.com/user-attachments/assets/d4dd8420-f272-459c-9785-ab0c03887a74)

A [failing "native test" step build](https://ci.chromium.org/ui/p/flutter/builders/try/Mac_arm64%20macos_platform_tests%20master%20-%20packages/17315/overview):

![Screenshot 2024-10-25 at 10 19 55�AM](https://github.com/user-attachments/assets/76a86a15-2150-482a-8b15-e3e7ac90485e)

Fixes flutter/flutter#144795
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: tests "flutter test", flutter_test, or one of our tests tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants