Commit Graph

64 Commits

Author SHA1 Message Date
Konstantin Raev 457e348081 Open sourced SwipeRefreshLayoutRecordingModule
Reviewed By: dmmiller

Differential Revision: D3264212

fb-gh-sync-id: 8790200a0d3c47050d6a91c906854b3a55640829
fbshipit-source-id: 8790200a0d3c47050d6a91c906854b3a55640829
2016-05-05 08:17:34 -07:00
Konstantin Raev 110d1587ae Added stability to OSS instrumentation tests
Summary:
This change makes all instrumentation tests to be executed in sequence in independent retriable processes.

With a new test being open sourced recently our CI stability degraded.
This PR should bring back stability because tests won't affect each other and will have shorter lifetime
Closes https://github.com/facebook/react-native/pull/7353

Differential Revision: D3259081

fb-gh-sync-id: 48ccdb5dbd561d416526497ff474378db9ca3c60
fbshipit-source-id: 48ccdb5dbd561d416526497ff474378db9ca3c60
2016-05-04 10:59:33 -07:00
Martin Konicek 00167e4956 Add scripts for running tests locally
Summary:
I was going to add an integration test and realized it would be useful to have an easy way to run these test locally. Added scripts and documented how to use them.

**Test plan**

`./scripts/run-android-local-unit-tests.sh`

<img width="786" alt="screen shot 2016-05-04 at 3 55 26 pm" src="https://cloud.githubusercontent.com/assets/346214/15018667/7f4981cc-1212-11e6-9fcb-12493c29015c.png">

`./scripts/run-android-local-integration-tests.sh`

<img width="772" alt="screen shot 2016-05-04 at 3 57 23 pm" src="https://cloud.githubusercontent.com/assets/346214/15018677/90b54810-1212-11e6-83d4-58530eb41d79.png">

Buck check by replacing `which buck` by `which duck` in the scripts:

<img width="805" alt="screen shot 2016-05-04 at 4 09 37 pm" src="https://cloud.githubusercontent.com/assets/346214/15018696/aa008262-1212-11e6-9a22-173507cd771f.png">

Checked the website renders fine:

`cd website; npm install; npm start`

![screen shot 2016-05-04 at 4 05 23 pm](https://cloud.githubusercontent.com/asse
Closes https://github.com/facebook/react-native/pull/7386

Differential Revision: D3258717

fb-gh-sync-id: 023eb9fdb59b00f9507e2e0694ad0934bb564c03
fbshipit-source-id: 023eb9fdb59b00f9507e2e0694ad0934bb564c03
2016-05-04 08:58:18 -07:00
Konstantin Raev a8d2079022 Optimise e2e tests retries
Summary:Implemented smarter retries for e2e tests

E2e tests consist of two expensive and flaky steps: npm installation and tests execution.
Our CI is configured to retry a command 3 times before terminating the test.
In current setup if one of the steps fail the whole test is restarted.

This change adds ad-hoc ability to retry flaky bits of e2e script independently.
This will make tests fail faster when code gets broken while increasing the chances to succeed in case of random false errors.
Closes https://github.com/facebook/react-native/pull/7184

Differential Revision: D3218927

fb-gh-sync-id: 9be8343484bb28aa3601b651db70fc55aa840e61
fbshipit-source-id: 9be8343484bb28aa3601b651db70fc55aa840e61
2016-04-25 07:16:20 -07:00
James Ide f5130c8073 Exit with the error status code from xcodebuild
Summary:See https://github.com/supermarin/xcpretty#usage -- xcpretty will suppress xcodebuild's status code so we need to add `&& exit ${PIPESTATUS[0]}`.
Closes https://github.com/facebook/react-native/pull/7172

Differential Revision: D3216731

fb-gh-sync-id: 942fd213105cc365d1d9a9c4d146441c044dd506
fbshipit-source-id: 942fd213105cc365d1d9a9c4d146441c044dd506
2016-04-23 04:19:22 -07:00
James Ide 6fac6db4d4 Use xcodebuild and delete "Framework Search Paths" for Xcode 7.3 to un-stall the tests
Summary:The Obj-C tests were stalling when we updated TravisCI to use the OS X image with Xcode 7.3 and iOS 9.3.

On my own MBP with Xcode 7.3 the tests stall as well. Running `./scripts/objc-test.sh` prints out a warning near the end, which says `ld` couldn't find a Frameworks folder under the iPhoneSimulator9.3 SDK directory. Indeed, this directory doesn't exist on my computer. When creating a brand new project with unit tests and UI tests, both test targets don't specify "Framework Search Paths" so I don't think we need to specify it anymore.
Closes https://github.com/facebook/react-native/pull/7168

Differential Revision: D3216524

fb-gh-sync-id: 3097bda98d78289ecdba86801bcd461f3311ac47
fbshipit-source-id: 3097bda98d78289ecdba86801bcd461f3311ac47
2016-04-22 23:04:19 -07:00
Martin Konicek 5bb6926e40 Simplify manual testing steps when doing the release
Summary:Quite a few of these steps are now tested automatically on Android thanks to bestander.

**Test plan**

Just visual inspection of the code :)
Closes https://github.com/facebook/react-native/pull/7037

Differential Revision: D3191678

fb-gh-sync-id: 54702a772c5c149bdd3f05d6f4ca257bc6f27090
fbshipit-source-id: 54702a772c5c149bdd3f05d6f4ca257bc6f27090
2016-04-18 11:32:28 -07:00
Ben Alpert 6e7b00508e Update to Xcode 7.3 on Travis
Summary:Hopefully this will fix https://travis-ci.org/facebook/react-native/jobs/123444671.
Closes https://github.com/facebook/react-native/pull/7008

Differential Revision: D3188875

fb-gh-sync-id: 18d5870437b72fa28502fefd5431b0bb9184b956
fbshipit-source-id: 18d5870437b72fa28502fefd5431b0bb9184b956
2016-04-16 01:25:23 -07:00
Konstantin Raev a6a5ef4acc added cache prepare step for packager in ios e2e test
Summary: Closes https://github.com/facebook/react-native/pull/6977

Differential Revision: D3178986

fb-gh-sync-id: 642b96fefcc506d1f8ada588ed79e5de48829338
fbshipit-source-id: 642b96fefcc506d1f8ada588ed79e5de48829338
2016-04-14 06:12:29 -07:00
Konstantin Raev 59a11995b3 increased timeout for ios e2e test and fixed --js e2e after ios e2e
Summary:Packager usually builds within 250 seconds and sometimes misses test timeout.
Also added non-persistent option to make it build faster.
Should be fine because we don't test live reloading in ios
Closes https://github.com/facebook/react-native/pull/6974

Differential Revision: D3178884

fb-gh-sync-id: e9bf75456f1cf480ffea6aa2c769550b40eb3d32
fbshipit-source-id: e9bf75456f1cf480ffea6aa2c769550b40eb3d32
2016-04-14 04:30:00 -07:00
Konstantin Raev f9bd789206 E2e android
Summary:- converted shell script `scripts/e2e-test.sh` into JS script to have more programming flexibility
- using appium execute 2 tests after a fresh React Native app installation: check HMR and that debugging mode does not crash the app
- made sure tests can be stable on limited CI systems and added ways to debug any problems in the future

Using appium we can now interact with Android app and test its state.
As a follow up i am planning to write a blog post on how to use appium with android and ios for e2e testing.
Closes https://github.com/facebook/react-native/pull/6840

Differential Revision: D3173635

Pulled By: mkonicek

fb-gh-sync-id: 3cf044bc9f64d1a842ae4589dd1bcab76de3d66a
fbshipit-source-id: 3cf044bc9f64d1a842ae4589dd1bcab76de3d66a
2016-04-13 08:20:05 -07:00
Konstantin Raev 5387e09dc7 Fixed e2e test being run twice on Circle
Summary: Closes https://github.com/facebook/react-native/pull/6768

Differential Revision: D3132093

fb-gh-sync-id: 9ff9208b4549ee56c4bcf5531699857056940fc9
fbshipit-source-id: 9ff9208b4549ee56c4bcf5531699857056940fc9
2016-04-03 10:08:19 -07:00
Konstantin Raev ce1261a3dd Added BUCK to generated app with react-native-cli init
Summary:BUCK is faster than Gradle.
For example `gradle app:installDebug` vs `buck install app` is ~7 seconds vs ~2 seconds with warm caches.
This is just the beginning to allow people to become familiar with BUCK.
It is enough for running the app locally and testing on a device.

Gradle is still used for dependency resolution.
Closes https://github.com/facebook/react-native/pull/6733

Differential Revision: D3126328

Pulled By: bestander

fb-gh-sync-id: 56aad276036c029af7e0e23d60c46ba2f77b3d2c
fbshipit-source-id: 56aad276036c029af7e0e23d60c46ba2f77b3d2c
2016-04-01 08:54:19 -07:00
Konstantin Raev aec90bb46b Version release script
Summary:npm-publish.js is not cohesive enough: besides building and publishing it also modifies some files.

It is better to have a separate script that will bump versions, make a commit and tag it.

scripts/bump-oss-version.js does exactly that.

This simplifies release process and allows manual release to npm if CI is not available.
Closes https://github.com/facebook/react-native/pull/6625

Differential Revision: D3092849

fb-gh-sync-id: 92cf38bd3df31c8c9c433fc5f9e15c129855fe0e
shipit-source-id: 92cf38bd3df31c8c9c433fc5f9e15c129855fe0e
2016-03-24 08:41:24 -07:00
Konstantin Raev 945306e397 Add testing HMR into manual testing steps
Reviewed By: dmmiller

Differential Revision: D3087133

fb-gh-sync-id: cb3b073dd77d40fb051a9bc17b6c24b49a325371
shipit-source-id: cb3b073dd77d40fb051a9bc17b6c24b49a325371
2016-03-24 06:37:21 -07:00
Konstantin Raev 993835c815 Allow react-native init <version> + removed sinopia from being required for e2e testing
Reviewed By: mkonicek, frantic

Differential Revision: D3087524

fb-gh-sync-id: 048e23b55916a6be17fa9fabb6e41b0b2f3f7a16
shipit-source-id: 048e23b55916a6be17fa9fabb6e41b0b2f3f7a16
2016-03-24 05:31:23 -07:00
Martin Konicek a4b01aee51 Simplify and move e2e test script
Reviewed By: mkonicek

Differential Revision:D3064436
Ninja: oss only

fb-gh-sync-id: d6bf88628eb6b4ea1b0964410168f4021856ea53
shipit-source-id: d6bf88628eb6b4ea1b0964410168f4021856ea53
2016-03-17 09:24:54 -07:00
Martin Konicek 897ec90778 Tweak e2e test
Reviewed By: mkonicek

Differential Revision:D3059079
Ninja: oss only

fb-gh-sync-id: 12008d9771888e9dfa4f3b8ac94d6e46f0a542ae
shipit-source-id: 12008d9771888e9dfa4f3b8ac94d6e46f0a542ae
2016-03-16 10:27:54 -07:00
Martin Konicek 40732f7224 Tweak e2e test script
Reviewed By: mkonicek

Differential Revision:D3058646
Ninja: oss only

fb-gh-sync-id: a307428b403c27bee492c04f28d27f1574dbc6d8
shipit-source-id: a307428b403c27bee492c04f28d27f1574dbc6d8
2016-03-16 08:20:26 -07:00
Konstantin Raev ceb6bd5272 Npm publish
Summary:This work allows automated release deployment.

Previous semi-automation lived in release.sh and I split it into two pieces:
- test-manual-e2e.sh - that just tests that current commit is buildable and makes a quick e2e installation for manual testing
- publish-npm.js - that makes publish based on what current branch and tags are on commit that is tested/deployed by CI

This simplified `Releases.md` guide and requires you to just run
```
git checkout -b 0.22-stable
git tag v0.22.0-rc
git push origin 0.22-stable --tags
```
to have a successful npm release.
Closes https://github.com/facebook/react-native/pull/6453

Reviewed By: mkonicek

Differential Revision: D3047938

Pulled By: bestander

fb-gh-sync-id: dbebf4c3a0bc2c2a0ef75c54595ab5654f91b8ea
shipit-source-id: dbebf4c3a0bc2c2a0ef75c54595ab5654f91b8ea
2016-03-15 09:22:26 -07:00
Konstantin Raev 83095f95b5 Fixed CI stability: running android tests via emulator not graddle:co…
Summary:Running CI tests with emulator, not a graddle wrapper.
This should make things faster
Closes https://github.com/facebook/react-native/pull/6421

Differential Revision: D3042505

fb-gh-sync-id: 455264f90044c22ed3ec8cf9cb6d5edc2efedcdb
shipit-source-id: 455264f90044c22ed3ec8cf9cb6d5edc2efedcdb
2016-03-11 13:33:26 -08:00
Martin Konicek 6f7a305831 Specify path for Sinopia
Reviewed By: mkonicek

Differential Revision:D3041448
Ninja: oss only

fb-gh-sync-id: 1a977f1917062bd8b039bdc6f2b74662407a8edc
shipit-source-id: 1a977f1917062bd8b039bdc6f2b74662407a8edc
2016-03-11 09:47:22 -08:00
Martin Konicek 97300b239a Simplify npm install
Reviewed By: mkonicek

Differential Revision:D3041006
Ninja: oss only

fb-gh-sync-id: 9d472aaa0fe383084c18a303e704633dec56d57d
shipit-source-id: 9d472aaa0fe383084c18a303e704633dec56d57d
2016-03-11 06:31:26 -08:00
Konstantin Raev a611ec5f23 Added e2e tests for npm@2 and npm@3
Summary:Need to make sure we can use both versions of npm client for publishing and installing

**Test plan (required)**

Make sure tests pass on both Travis and Circle CI.
Closes https://github.com/facebook/react-native/pull/6364

Differential Revision: D3036537

fb-gh-sync-id: a3c1ea16f0aeb7b1327574b511aac7594fd3d7e6
shipit-source-id: a3c1ea16f0aeb7b1327574b511aac7594fd3d7e6
2016-03-10 11:59:25 -08:00
Martin Konicek cbae5c972a WIP: Temporarily fork e2e-test script
Reviewed By: mkonicek

Differential Revision:D3036726
Ninja: oss only

fb-gh-sync-id: 9d63ba4418a0c10ea4a5a574749f1ca9fc8c6b50
shipit-source-id: 9d63ba4418a0c10ea4a5a574749f1ca9fc8c6b50
2016-03-10 11:54:30 -08:00
Konstantin Raev 6b610995be Fixes to flow after trunk was broken
Reviewed By: mkonicek

Differential Revision: D3029511

fb-gh-sync-id: c7ac945de1676ad03136c83cbcb5a75f5a0b82b6
shipit-source-id: c7ac945de1676ad03136c83cbcb5a75f5a0b82b6
2016-03-09 06:09:24 -08:00
Konstantin Raev 3c2bf6304c react native updated to flow@0.22
Summary:Flow got updated and it broke CI
Closes https://github.com/facebook/react-native/pull/6371

Differential Revision: D3026874

fb-gh-sync-id: e1866cd885cefcef45da6d0d66ff5f3fe6d9beda
shipit-source-id: e1866cd885cefcef45da6d0d66ff5f3fe6d9beda
2016-03-08 16:22:08 -08:00
Konstantin Raev fbef6f6893 using a more safe branch of sinopia
Summary:OSS team recommended using sinopia fork without GUI folder
Closes https://github.com/facebook/react-native/pull/6297

Differential Revision: D3013279

fb-gh-sync-id: f20b67780230e1a4824b072a84b3394403cd549d
shipit-source-id: f20b67780230e1a4824b072a84b3394403cd549d
2016-03-04 13:29:22 -08:00
Martin Konicek 44997b47e2 Skeleton for running Android e2e or a separate packager e2e test
Summary:The e2e-test.sh currently only supports iOS. Most of the script will be identical for Android,
let's therefore reuse it. This diff adds one argument: --ios, --android or --packager.

`--packager` starts the packager and checks it produces a bundle. The idea is to run this
on CircleCI even before we implement the actual Android e2e test in order to reliably catch
breakages to package.json quickly.

We should only land this once Travis is green again.

**Test plan**

Ran:

    git checkout master
    ./scripts/e2e-test.sh  # Error message about required argument was printed
    ./scripts/e2e-test.sh --ios       # Ran the test as before (all the way up to xctool which I don't have locally)
    ./scripts/e2e-test.sh --android   # Message was printed
    ./scripts/e2e-test.sh --packager  # The packager created the bundle, exit code was 0
    # Made the packager fails on bad JS
    ./scripts/e2e-test.sh --packager  # Exit code was 1
Closes https://github.com/facebook/react-native/pull/6279

Differential Revision: D3007281

fb-gh-sync-id: 6ece06b933001ba0939806c69ed7c7471b134931
shipit-source-id: 6ece06b933001ba0939806c69ed7c7471b134931
2016-03-03 12:43:29 -08:00
Konstantin Raev 39b399e77b returned flow check to e2e test
Summary:e2e improvement
Closes https://github.com/facebook/react-native/pull/6274

Differential Revision: D3005954

fb-gh-sync-id: 6bd640b78e46f79bb2aaaa900aa8ec78cab04fb3
shipit-source-id: 6bd640b78e46f79bb2aaaa900aa8ec78cab04fb3
2016-03-03 08:00:35 -08:00
Konstantin Raev 39409dda2d another fix
Summary:quick fix to get CI stable
Closes https://github.com/facebook/react-native/pull/6271

Differential Revision: D3005703

fb-gh-sync-id: 88941f2bb058d65637a06a3710108cdf131c3bda
shipit-source-id: 88941f2bb058d65637a06a3710108cdf131c3bda
2016-03-03 05:40:31 -08:00
Konstantin Raev f827f7b79a instrumentation tests are executed with BUCK
Summary:Added ability to run instrumentation tests with BUCK.

This change uses BUCK to build and run instrumentation tests facebook style.
The gains are that we can execute the same tests internally at FB and in OSS.
Also running tests not via graddle:connect command is 1.5 minutes faster.

I'll keep keep an eye on stability Gradle and BUCK builds for a while.
Closes https://github.com/facebook/react-native/pull/6176

Differential Revision: D2999878

Pulled By: bestander

fb-gh-sync-id: d715ba231769e57100685a1256f2e530c589921c
shipit-source-id: d715ba231769e57100685a1256f2e530c589921c
2016-03-02 06:55:35 -08:00
Konstantin Raev 3e52df8c2a Using an updated version of Sinopia that works with node 4&5
Differential Revision: D2939188

fb-gh-sync-id: 0189d820c818df249ed26dbeb0d2d6e1d43c82b1
shipit-source-id: 0189d820c818df249ed26dbeb0d2d6e1d43c82b1
2016-02-16 10:57:08 -08:00
Martin Konicek 47dac4ff50 New release process: Fix path in release.sh 2016-02-09 16:13:33 +00:00
Martin Konicek 8a9996c5c7 New release process: Update release script and docs 2016-02-09 16:09:10 +00:00
Martin Konicek cb5314243e Update release.sh 2016-01-22 18:53:47 +00:00
Pieter De Baets adfc573a75 Move tests to iOS9.2 2016-01-06 17:12:02 +00:00
Martin Konicek a5d6e46fa8 Tweak the release script 2016-01-05 18:52:04 +00:00
Satyajit Sahoo 1b766ddd2c Add a script for making releases easier 2016-01-05 16:59:43 +00:00
Konstantin Raev 88baaa1239 increased stability of circleCI e2e tests
Summary:
Out of 57 builds in the 5 days during Christmas only 15 were successful.
15 of the failed ones were caused by `com.android.ddmlib.ShellCommandUnresponsiveException` when running unstrumentation tests.
Another 10 were because of crashes probably related to memory usage.

This PR follows ideas from https://github.com/Originate/guide/blob/master/android/guide/Continuous%20Integration.md

So far I've made 6 successful builds with this setup.
Need to run it for a few more days to get accurate stats.
Closes https://github.com/facebook/react-native/pull/5021

Reviewed By: svcscm

Differential Revision: D2795713

Pulled By: androidtrunkagent

fb-gh-sync-id: 33373fed7ca7c5fb83b35cf551f8501286e33d7b
2015-12-30 11:39:32 -08:00
Pieter De Baets ed0b45ef8e Merge pull request #3578 from javache/xcode-7
Use latest simulator version
2015-10-23 16:04:22 +01:00
Martin Bigio 26df016600 [react-native-cli] Fix errors on tests refering `packager.js` 2015-10-22 14:17:29 -04:00
Pieter De Baets 59bb57a002 Use latest simulator version 2015-10-22 16:10:09 +01:00
Alex Kotliarskyi 2f5681d4f2 Fix e2e tests
Internally we don't mirror `scripts` folder from GitHub, which means
when importing #3523 changes to `scripts/e2e-test.sh` will not make it to
GitHub. This commit contains those changes.
2015-10-21 16:36:28 -07:00
Felix Oghină 3e7af6e1a4 [SampleApp] adding unsynced changes from PR #3025 2015-09-30 15:15:30 +01:00
James Ide 1b0da33b47 [Travis] Update CI to run with Xcode 6.4
Use Xcode 6.4 instead of Travis' beta support for 6.3.
2015-09-04 02:39:37 -07:00
Felix Oghină 3b7bffa2a1 [e2e] fix e2e tests
* use new _flowconfig in generator template
* increase sinopia max_body_size
* remove breaking `cd` command from e2e-test.sh
2015-08-18 11:51:03 +01:00
Felix Oghină f0dd9fb358 Merge pull request #2298 from foghina/yo
[cli] convert project generation to use yeoman
2015-08-17 13:51:24 +01:00
Tadeu Zagallo 28fb229266 [ReactNative] Fix e2e tests 2015-08-13 13:50:04 +01:00
Felix Oghină f83675d191 [cli] convert project generation to use yeoman 2015-08-12 12:04:27 +01:00