Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider app crash tests as non-fatal if they pass on retry #456

Conversation

ravimandala
Copy link
Contributor

@ravimandala ravimandala commented Aug 11, 2020

Introducing a flag retry-app-crash-tests to retry tests that. might have caused app crashes. When this flag is turned on, the execution will not fail if all app crash tests pass on retry.

The retries will honor the error-retries count, restarts the sim before retrying the crashed test and makes the crash logs available, like before.

Ref: #455

\cc @ob @chenxiao0228

@ravimandala ravimandala force-pushed the feature-retry-app-crash-tests branch from 89dcc66 to f7159fc Compare August 11, 2020 18:57
@ravimandala ravimandala changed the title Retry app crash tests and consider then non-fatal if they pass Consider app crash tests as non-fatal if they pass on retry Aug 11, 2020
@ravimandala ravimandala requested review from ob and chenxiao0228 August 11, 2020 19:09
@ravimandala ravimandala force-pushed the feature-retry-app-crash-tests branch from f7159fc to 2c97953 Compare August 11, 2020 20:06
Introducing a flag `retry-app-crash-tests` to retry tests that
might have caused app crashes. When this flag is turned on, the
execution will not fail if all app crash tests pass on retry.

The retries will honor the `error-retries` count, restarts the
sim before retrying the crashed test and makes the crash logs
available, like before.
Copy link
Member

@ob ob left a comment

Choose a reason for hiding this comment

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

Code looks good but I wonder if we really need another flag. Our flag set is already too complicated so if we can find a way to roll this under an existing flag (or simplify the flag set somehow) that'd be much better.

README.md Show resolved Hide resolved
bp/src/BPConfiguration.m Show resolved Hide resolved
@ravimandala
Copy link
Contributor Author

Code looks good but I wonder if we really need another flag. Our flag set is already too complicated so if we can find a way to roll this under an existing flag (or simplify the flag set somehow) that'd be much better.

Oscar, I agree a few flags might have gotten complicated over time and may even have deviated from the original purpose. So, I am going to take the latter route to simplify the flag set and deprecate some of them. Created issue #457 for further discussion and follow-up on this.

Copy link
Member

@ob ob left a comment

Choose a reason for hiding this comment

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

let's clean up the flags after this...

@ravimandala
Copy link
Contributor Author

let's clean up the flags after this...

Sure. Merging this now.

@ravimandala ravimandala merged commit 506e399 into MobileNativeFoundation:master Aug 12, 2020
ravimandala added a commit that referenced this pull request Oct 2, 2020
Introducing a flag `retry-app-crash-tests` to retry tests that
might have caused app crashes. When this flag is turned on, the
execution will not fail if all app crash tests pass on retry.

The retries will honor the `error-retries` count, restarts the
sim before retrying the crashed test and makes the crash logs
available, like before.
AhmedEid added a commit to tinyspeck/bluepill that referenced this pull request Nov 18, 2020
* master:
  Reference libXCTestBundleInject.dylib only if it exists (MobileNativeFoundation#460)
  Record video using simctl (MobileNativeFoundation#441)
  Xcode 12.0 support (MobileNativeFoundation#458)
  Retry app crash tests and consider then non-fatal if they pass (MobileNativeFoundation#456)
  Do not retry crashed tests (MobileNativeFoundation#443)
  Fixing minor issues and doing some minor refactoring/clean-up (MobileNativeFoundation#444)
  Xcode 11.5 support (MobileNativeFoundation#447)
  Xcode 11.4 support (MobileNativeFoundation#446)
  Add a flag to disable Xcode version check failure (MobileNativeFoundation#436)
  Support sidecar applications (MobileNativeFoundation#438)
  Added a few more tests to mock test failure scenarios and fixed a few final Exit Status issues  (MobileNativeFoundation#430)
  make retry checks more resilient to prevent infinite retries (MobileNativeFoundation#432)
  Xcode 11.3 support (MobileNativeFoundation#426)
  Supporting tests and app hosts in subfolders (MobileNativeFoundation#419)

# Conflicts:
#	bp/src/SimulatorHelper.m
#	bp/tests/SimulatorHelperTests.m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants