Commit Graph

105 Commits

Author SHA1 Message Date
Douglas Lowder a531efe26e Add an integration test for WebSocket
Summary:
**Motivation**

See if we can safely run a WebSocket test in Travis CI
Closes https://github.com/facebook/react-native/pull/11433

Differential Revision: D4342024

Pulled By: ericvicenti

fbshipit-source-id: 137fb0c39ed7ea3726e2778d5c0bdac4cef6ab89
2017-01-16 13:28:43 -08:00
dlowder-salesforce d625a72f63 Apple TV support 6: Add tvOS target to react-native-cli template project
Summary:
**Motivation**

New iOS project generation with react-native-cli should allow developers to build for Apple TV as well as iPhone/iPad.

**Test plan**

Added to `scripts/run-ci-e2e-tests.js` and `.travis.yml` to have the new tvOS target automatically built and tested in Travis CI.
Closes https://github.com/facebook/react-native/pull/11591

Differential Revision: D4375593

Pulled By: mkonicek

fbshipit-source-id: 4e241caa400a88e6b2f91416fa26b48ae01cb7b6
2016-12-30 18:43:59 -08:00
Konstantin Raev a77d17c014 Updated extra-android-m2repository to get android support v4 23.4.0
Summary:
Circle CI has an older m2repository version by default
Closes https://github.com/facebook/react-native/pull/11671

Differential Revision: D4372795

Pulled By: kentaromiura

fbshipit-source-id: ac563fe3825a57087fbf806c913383e1ade8535f
2016-12-29 05:43:31 -08:00
Pieter De Baets c92ad5f6ae Apple TV support 4: support for input (tvOS focus engine)
Reviewed By: shergin

Differential Revision: D4333546

fbshipit-source-id: 8655070e81dbb62a80ab1f00a43ef6c2d9654618
2016-12-19 06:28:40 -08:00
Kevin Lacker 133d410ee6 attempt to fix tests
Summary:
This PR attempts to fix the iOS tests by fixing a flag in the e2e tests, and "fix" the Android tests by commenting out the e2e test. I propose that if these fix the tests, we accept them, and then follow up attempting to fix the Android e2e tests for real afterwards.
Closes https://github.com/facebook/react-native/pull/11466

Differential Revision: D4328304

Pulled By: mkonicek

fbshipit-source-id: 3c497921ea0359bed633c7bd390495046634c123
2016-12-14 12:13:41 -08:00
Kevin Lacker affd5ac681 Improve Android testing scripts
Summary:
The goal of this pull request is to make it easier for contributors to run Android tests locally, specifically the unit tests and integration tests. I added a bunch of checks to the local testing scripts that will warn you if your environment is misconfigured, and tell you how to fix it. I also updated the testing docs, so that the regular "Testing" page should be a decent resource to point people to when you are telling them "hey this pull request needs a test." Just Android, though, I haven't gotten to the iOS parts yet.

I also disabled a couple tests that seemed quite flaky while running on a local machine, and don't seem to be providing much value. In particular, the `TestId` test just hangs on my emulator a lot and has been flaky on CI in the past, so I removed about half of its test cases to make the sample app smaller. The testMetions test appears to be dependent on screen size so I commented it out.
Closes https://github.com/facebook/react-native/pull/11442

Differential Revision: D4323569

Pulled By: bestander

fbshipit-source-id: 9c869f3915d5c7cee438615f37986b07ab251f8c
2016-12-13 17:13:35 -08:00
Emil Sjolander 7f8c2985a8 Rename directories
Reviewed By: gkassabli

Differential Revision: D4284681

fbshipit-source-id: f0c6855c2c6e4389b7867f48f72cbb697830fc5a
2016-12-07 05:14:12 -08:00
Tim Yung 23331df5a4 RN: Cleanup OSS JS & Flow Declarations
Reviewed By: vjeux

Differential Revision: D4210763

fbshipit-source-id: 5abaa547100b8badd13bcf311ceffc5b4098d252
2016-11-20 17:58:29 -08:00
Martin Konicek a477aec10d Rewrite 'react-native init' and 'react-native upgrade' without using Yeoman in preparation for templates support
Summary:
This is the manually imported version of https://github.com/facebook/react-native/pull/10786

This was mostly straigthforward by replacing the local-cli folder with the version I had in my local git checkout,
plus a few other files I listed with git diff --name-only.

Reviewed By: hramos

Differential Revision: D4201118

fbshipit-source-id: 4d0fb54b0edda9de1abba427958e420fd2ac105c
2016-11-18 18:28:51 -08:00
Konstantin Raev 7e8bef872a limited max workers in packager to 1 to stop crashes in Ci…
Summary:
This should stop Circle CI from crashing.

Let's wait for the test to pass.

cc davidaurelio matryoshcow mkonicek
Closes https://github.com/facebook/react-native/pull/10962

Differential Revision: D4186949

Pulled By: kentaromiura

fbshipit-source-id: 2542376a6e4bf0d7dc423c574bd4573ae9bdfc96
2016-11-15 18:58:37 -08:00
Kevin Gozali a217c8bc9c Allow specifying no destination for the uiexplorer test run
Summary: This is a simple change to allow not specifying xcodebuild's `-destination` flag if we just need to build the project without running the test.

Reviewed By: bestander

Differential Revision: D4173546

fbshipit-source-id: 0b77bb5fc01d8cb6a8c9bc765294796631839655
2016-11-15 12:58:40 -08:00
Ovidiu Viorel Iepure 33fb428a07 Use npm for e2e tests
Summary:
Force npm for e2e tests.
Bonus: tracked down and removed a non-standard `.done()` call that was breaking e2e tests.

Reviewed By: bestander

Differential Revision: D4153514

fbshipit-source-id: 079939874ea75c7ea6e3e5376d37873c95fc74c1
2016-11-09 09:31:12 -08:00
Cristian Carlesso 6d3e074dd4 Adding Jest preset so that people can configure Jest using react-native as preset
Reviewed By: cpojer

Differential Revision: D4081817

fbshipit-source-id: 43cf2ec467ea69651705162b6a58e0b3f1ad1dbf
2016-10-31 12:58:35 -07:00
Ovidiu Viorel Iepure 4cff039d78 Circle CI releases now work with Java 8
Reviewed By: bestander

Differential Revision: D4095313

fbshipit-source-id: 1806db054bbca86f6394af077baeccac4e7efbe1
2016-10-28 07:58:52 -07:00
Konstantin Raev 25d9f86f99 Added ability to not run IOS tests on CI
Reviewed By: emilsjolander

Differential Revision: D4051046

fbshipit-source-id: c17fbe5d75f4f513a3ed4b708cac7cb7f9377f0b
2016-10-24 12:43:34 -07:00
Konstantin Raev 0e5c0d2f2c test refurb: removed xcpretty on travis + using yarn + e2e tests
Summary:
- switched to yarn on travis (experimental)
- removed xcpretty, we need more verbose logs
- returned jest test for e2e
Closes https://github.com/facebook/react-native/pull/10442

Differential Revision: D4043991

Pulled By: davidaurelio

fbshipit-source-id: 50062f6a77a17643bf9a7ba7add8cee5b3bb26d2
2016-10-19 07:58:38 -07:00
dlowder-salesforce 64a4c6070d Travis CI reliability fixes: preload package manager and increase tim…
Summary:
- Consolidate common code in iOS and tvOS test scripts
- Start the packager before starting tests, to improve reliability
- Increase timeout value in RCTTestRunner.m
Closes https://github.com/facebook/react-native/pull/10378

Differential Revision: D4028364

Pulled By: bestander

fbshipit-source-id: 24c2124a1c62643a02f0668b60a67b971e08d1a3
2016-10-16 15:43:44 -07:00
Ovidiu Viorel Iepure f0a3a25cd2 Add destination to e2e xcode build
Summary: Closes https://github.com/facebook/react-native/pull/10286

Differential Revision: D3987787

Pulled By: bestander

fbshipit-source-id: fc6295f499bc2d47e52c855080952353568bd7b7
2016-10-07 10:14:21 -07:00
Ovidiu Viorel Iepure 3968e0ac45 Bump iOS version to 10.0
Summary: Bump iOS version for `react-native-ios-uiexplorer`.

Reviewed By: javache

Differential Revision: D3987501

fbshipit-source-id: f0a247efff89ca2785f7054b7c0ca159179cdbce
2016-10-07 08:43:35 -07:00
dlowder-salesforce ccea759b71 Apple TV support 3: Run Travis CI for tvOS in separate script
Summary:
* Motivation

Fix a possible issue with Travis CI by running tvOS tests in a separate script.
Closes https://github.com/facebook/react-native/pull/10268

Differential Revision: D3980775

Pulled By: matryoshcow

fbshipit-source-id: 66dc52f4c0e5c492eb51d53fba209fc25361ce3e
2016-10-06 03:28:33 -07:00
Douglas Lowder 8622998335 Apple TV support 2: Xcode projects and CI (scripts/objc-test.sh)
Summary:
* Motivation *

Second PR for Apple TV support.

* Test plan *

Apple TV tests have been added to scripts/objc-test.sh
Closes https://github.com/facebook/react-native/pull/10227

Differential Revision: D3974064

Pulled By: javache

fbshipit-source-id: 36dffb4517efa489e40fa713a30655d1d76ef646
2016-10-05 07:28:44 -07:00
Konstantin Raev 3a2bb3dbc5 Disabled jest tests in e2e
Summary:
Currently too much noise is coming because of broken tests
Closes https://github.com/facebook/react-native/pull/10083

Differential Revision: D3919029

Pulled By: davidaurelio

fbshipit-source-id: e75bb38d4be1c8427dfa0c3f6df60d04582ddb2c
2016-09-24 06:13:35 -07:00
Mike Grabowski db06fc6814 Better release script
Summary: Automatically tags and publish them upstream, less steps required in order to do the release rather than just `bump-oss-version.js`

Differential Revision: D3913826

Pulled By: bestander

fbshipit-source-id: 6e023e7ab7b486ff6e6cc8e946f19e10a7ceeef8
2016-09-23 08:28:35 -07:00
kentaromiura 8689b0f21c Adding jest and jest babel preset to the react-native init command
Summary:
Adding jest and its presets to the react-native init command

**Test plan (required)**
run react-native init foo (using `npm link` to use the local `react-native` version)
inside foo there are now a .babelrc file and the package.json is set up as described by
https://facebook.github.io/jest/docs/tutorial-react-native.html#setup
Closes https://github.com/facebook/react-native/pull/9719

Differential Revision: D3843037

Pulled By: bestander

fbshipit-source-id: 004e27ebd3f257a202ed43f378d6fe6cc23ced52
2016-09-09 17:43:42 -07:00
Pieter De Baets 0b6f0fcf55 Correctly specify run_tests for all apps in ci_config
Reviewed By: talah

Differential Revision: D3552776

fbshipit-source-id: 690ab316fa3dc761cf8f2903542ee6ed5cb15b37
2016-07-15 08:58:28 -07:00
Konstantin Raev 3ddf3db551 Fixed objc test runner and bezier test
Summary:
- kill -9 SERVER_PID does not work for packager currently because it is started as daemon.
- And lego tests just hang until they are killed e.g. intern/sandcastle/1952254070/187417721/
- fixed bezier test because it annoyed me with random breaks because of precision

Reviewed By: davidaurelio

Differential Revision: D3528588

fbshipit-source-id: 87e5b4330fa69bc9a8a7f48e2250f3c2239f2b35
2016-07-08 03:28:58 -07:00
Konstantin Raev c58a7aa546 Improved android e2e tests stability
Summary:
Some tweaks to make CircleCI pass
Closes https://github.com/facebook/react-native/pull/8425

Differential Revision: D3485087

Pulled By: bestander

fbshipit-source-id: b1941ecedbcaf81f0bcb34a10686f21f2ded3114
2016-06-24 16:58:28 -07:00
Konstantin Raev 8af217641f Fixed manual e2e test runner script
Summary:
Android folder may contain versions from previous runs and it may affect e2e test execution.
This should make tests independent of cached jars.
Closes https://github.com/facebook/react-native/pull/8277

Differential Revision: D3462901

fbshipit-source-id: 25b1f75b9b207617431e26ad60f5d4de322ab1f4
2016-06-21 05:28:31 -07:00
Pieter De Baets 0a9cc99a4f Update css-layout sync scripts
Reviewed By: emilsjolander

Differential Revision: D3424265

fbshipit-source-id: b1a765bbe11f776e418ae8b01c5c2a292f590a6b
2016-06-15 09:58:52 -07:00
Valentin Agachi 4fe7a25d01 Internal fixes for the iOS Explorer test script
Summary:
Some changes are required to this scripts in order to successfully run it on Sandcastle:

- the packager needs to be started before the test, doing this only when not running in Travis
- no xcpretty available, piping to anything else (e.g. `cat`) fails
Closes https://github.com/facebook/react-native/pull/8127

Differential Revision: D3437268

Pulled By: avaly

fbshipit-source-id: a0a52f08b31f50b88f5d0fd4d9d6c827df179d71
2016-06-15 08:59:11 -07:00
Valentin Agachi b98a05ebd3 Reverted commit D3436833
Summary:
Some changes are required to this scripts in order to successfully run it on Sandcastle:

- the packager needs to be started before the test
- no xcpretty available, piping to anything else (e.g. `cat`) fails
Closes https://github.com/facebook/react-native/pull/8123

Differential Revision: D3436833

Pulled By: avaly

fbshipit-source-id: e284d6eaf370720b9a0f2468b114a596028f7107
2016-06-15 06:44:07 -07:00
Valentin Agachi 63b813128a Internal fixes for the iOS Explorer test script
Summary:
Some changes are required to this scripts in order to successfully run it on Sandcastle:

- the packager needs to be started before the test
- no xcpretty available, piping to anything else (e.g. `cat`) fails
Closes https://github.com/facebook/react-native/pull/8123

Differential Revision: D3436833

Pulled By: avaly

fbshipit-source-id: 893ac5cba4197cf5bb6b492701171910fd10f99d
2016-06-15 05:43:44 -07:00
Konstantin Raev 58881fc57f <Replace this line with a title. Use 1 line only, 67 chars or less>
Reviewed By: matryoshcow

Differential Revision: D3432084

fbshipit-source-id: fa94b1aca40c931cc273a5561adf37f458aaa0ff
2016-06-15 03:14:20 -07:00
Valentin Agachi 66a13d548b Add flexibility to the iOS UIExplorer test script
Summary:
Add more flexibility to the iOS UIExplorer test scripts:
- support environments without `xcpretty` installed
- support custom xcode destination argument

Initial PR is based on the last git commit which passed on Travis today (2a92b52) in order to test Travis build.

I'll rebase to latest, in order to fix merge conflicts, before merging.

**Test plan (required)**

Make sure tests pass on Travis.
Closes https://github.com/facebook/react-native/pull/7982

Differential Revision: D3404574

Pulled By: avaly

fbshipit-source-id: 48aabd81fba67d482af46728a9c3975842f03060
2016-06-08 04:43:22 -07:00
Valentin Agachi 282df0ed07 Remove extra packager call from objc-test
Reviewed By: bestander

Differential Revision: D3398448

fbshipit-source-id: dd0676021eac7169e55e7049d3edac6ee0c8bf45
2016-06-07 08:13:19 -07:00
Konstantin Raev 9172597019 Returned flow checks to CI
Summary: Closes https://github.com/facebook/react-native/pull/7894

Differential Revision: D3379513

fbshipit-source-id: 49290b3582ae66ea99d19ec3f490bdb4436536dd
2016-06-02 10:58:36 -07:00
Konstantin Raev 7ca8e0e8b1 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
2016-05-26 13:43:29 -07:00
Konstantin Raev 5d06402b4a Made npm deployment to be independent of git tags cache
Summary:
Fixes npm deployment script as in https://circleci.com/gh/facebook/react-native/6745.

Example situation:
- admin is ready to release 0.26.0
- admin adds tag v0.26.0 and pushes to origin
- Circle CI build fails because of code error
- admin cherry-picks a fix and tags v0.26.0 again and pushes to origin
- Circle does not update local tag v0.26.0 because it already has it cached, compiles the code but fails to deploy to npm because v0.26.0 is not on branch HEAD from Circle point of view

The previous version of the script was checking the tags on current commit as well but it used the local branch tags.
This change fetches tags from `origin` fresh and allows us to redeploy the same version multiple times.
Closes https://github.com/facebook/react-native/pull/7619

Differential Revision: D3334469

fbshipit-source-id: b423fc19516dc4f5f7f2605224e62b8a378c8a7d
2016-05-23 06:58:28 -07:00
Konstantin Raev 6a34c9c3da Disabled flow in e2e test because it causes memory crashes
Summary: Closes https://github.com/facebook/react-native/pull/7620

Differential Revision: D3322029

fbshipit-source-id: e0406770d011956af6b47d15c5b49a68b1b611f5
2016-05-19 03:58:25 -07:00
Konstantin Raev 588183b166 Increased timeouts and retries for instrumentation tests
Summary:
Tests fail quite often but retries seem to help.
Closes https://github.com/facebook/react-native/pull/7537

Differential Revision: D3295833

fbshipit-source-id: e74be5d62b7fb9c1859477e51bf18fe3d1d25ce4
2016-05-12 17:43:35 -07:00
Konstantin Raev 1958e93f3a Fixed instrumentation test runner OK sniffing
Summary:
Fixed regex that looks for OK sign

**Test plan (required)**

- circle CI results
Closes https://github.com/facebook/react-native/pull/7410

Differential Revision: D3265016

fb-gh-sync-id: 1eba7297116d31f8bf3393733141058cf6a7454a
fbshipit-source-id: 1eba7297116d31f8bf3393733141058cf6a7454a
2016-05-05 12:54:02 -07:00
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