Stabilized TestIdTestApp integration test
Summary: - TestIdTestModule instrumentation tests is responsible for too many occasional crashes, e.g. https://circleci.com/gh/facebook/react-native/7054. This should fix the problem (will monitor over next week) - Made file naming more consistent - 5 retries don't make e2e tests more stable, reduced back to 3 but I need to investigate how to make it more reliable Closes https://github.com/facebook/react-native/pull/7784 Differential Revision: D3354444 fbshipit-source-id: d058362edbec09522a4828998e01988a82a74487
This commit is contained in:
parent
a96fcc7ce1
commit
7ca8e0e8b1
|
@ -46,8 +46,9 @@ public class TestIdTestCase extends ReactAppInstrumentationTestCase {
|
|||
"Toolbar",
|
||||
"TextInput",
|
||||
"View",
|
||||
"WebView",
|
||||
"ScrollView Item (same id used for all items)");
|
||||
// "WebView", TODO t11449130
|
||||
"ScrollView Item (same id used for all items)"
|
||||
);
|
||||
|
||||
public void testPropertyIsSetForViews() {
|
||||
for (String tag : viewTags) {
|
||||
|
|
|
@ -111,12 +111,16 @@ var TestIdTestApp = React.createClass({
|
|||
|
||||
<View testID="View" />
|
||||
|
||||
<WebView
|
||||
{/*
|
||||
Webview gets tests crashing or stalling occasionally
|
||||
e.g. https://circleci.com/gh/facebook/react-native/7054
|
||||
TODO t11449130
|
||||
<WebView
|
||||
testID="WebView"
|
||||
url={'http://newsroom.fb.com'}
|
||||
renderError={() => <View /> }
|
||||
style={styles.base}
|
||||
/>
|
||||
/>*/}
|
||||
|
||||
</View>
|
||||
);
|
||||
|
|
|
@ -47,6 +47,7 @@ test:
|
|||
- source scripts/circle-ci-android-setup.sh && waitForAVD
|
||||
|
||||
override:
|
||||
# TODO flow is disabled see t11343811 and 0.25.1
|
||||
# eslint bot
|
||||
# - cat <(echo eslint; npm run lint --silent -- --format=json; echo flow; npm run flow --silent -- check --json) | GITHUB_TOKEN="af6ef0d15709bc91d""06a6217a5a826a226fb57b7" CI_USER=$CIRCLE_PROJECT_USERNAME CI_REPO=$CIRCLE_PROJECT_REPONAME PULL_REQUEST_NUMBER=$CIRCLE_PR_NUMBER node bots/code-analysis-bot.js
|
||||
# JS tests for dependencies installed with npm3
|
||||
|
@ -69,14 +70,14 @@ test:
|
|||
# build test APK
|
||||
- buck install ReactAndroid/src/androidTest/buck-runner:instrumentation-tests --config build.threads=1
|
||||
# run installed apk with tests
|
||||
- node ./scripts/run-ci-android-instrumentation-tests.js --retries 3 --path ./ReactAndroid/src/androidTest/java/com/facebook/react/tests --package com.facebook.react.tests
|
||||
- node ./scripts/run-android-ci-instrumentation-tests.js --retries 3 --path ./ReactAndroid/src/androidTest/java/com/facebook/react/tests --package com.facebook.react.tests
|
||||
|
||||
- ./gradlew :ReactAndroid:testDebugUnitTest
|
||||
# Deprecated: these tests are executed using Buck above, while we support Gradle we just make sure the test code compiles
|
||||
- ./gradlew :ReactAndroid:assembleDebugAndroidTest
|
||||
|
||||
# Android e2e test
|
||||
- node ./scripts/run-ci-e2e-tests.js --android --js --retries 5
|
||||
- node ./scripts/run-ci-e2e-tests.js --android --js --retries 3
|
||||
|
||||
# testing docs generation is not broken
|
||||
- cd website && node ./server/generate.js
|
||||
|
|
|
@ -42,8 +42,10 @@ let exitCode = 0;
|
|||
testClasses.forEach((testClass) => {
|
||||
if (tryExecNTimes(
|
||||
() => {
|
||||
echo(`Starting ${testClass}`);
|
||||
// any faster means Circle CI crashes
|
||||
exec('sleep 10s');
|
||||
return exec(`./scripts/run-android-instrumentation-tests.sh ${argv.package} ${testClass}`).code;
|
||||
return exec(`./scripts/run-instrumentation-tests-via-adb-shell.sh ${argv.package} ${testClass}`).code;
|
||||
},
|
||||
numberOfRetries)) {
|
||||
echo(`${testClass} failed ${numberOfRetries} times`);
|
Loading…
Reference in New Issue