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

Release v7.10.2 #1431

Merged
merged 32 commits into from
Jun 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
b10af6d
test(react-native): Pin react-native-navigation version
bengourley Jun 2, 2021
da9cfeb
test(react-native): Bump kotlin compiler version instead
bengourley Jun 2, 2021
f97a339
Split TESTING.md down for each platform
twometresteve Jun 1, 2021
024b72f
Fresh RN 0.64 project created
twometresteve Jun 1, 2021
3802663
Remove unneeded files
twometresteve Jun 1, 2021
1e30fe6
Ignore entries
twometresteve Jun 1, 2021
6925273
iOS build script
twometresteve Jun 1, 2021
fb7c778
Android-specific test fixture updates
twometresteve Jun 1, 2021
13bd903
Remove Flipper
twometresteve Jun 1, 2021
9f37618
iOS specific changes to RN 0.64 test fixture
twometresteve Jun 1, 2021
e5a4c3f
Add RN 0.64 to pipeline
twometresteve Jun 1, 2021
fdabac3
Set development team
twometresteve Jun 1, 2021
6079932
Null guard configMetaData
twometresteve Jun 2, 2021
4b26c9d
RN 0.64 on iOS soft failing pending PLAT-6696
twometresteve Jun 2, 2021
a09a108
Fix eslint violations
twometresteve Jun 2, 2021
9fb4c76
Merge pull request #1425 from bugsnag/bengourley/rn-63-ci
bengourley Jun 2, 2021
9a7ad89
fix(react-native): Only include codeBundleId in payload when it has a…
bengourley May 25, 2021
4c948ca
fix(react-native): Copy RN's internal logging for unhandled rejections
bengourley May 25, 2021
758b16c
Merge pull request #1423 from bugsnag/tms/split-testing-md
twometresteve Jun 2, 2021
d5a3fc9
test(react-native): Enable Hermes on Android for RN0.64
bengourley Jun 3, 2021
3cc12f5
test(raect-native): Update runtime version assertion for Hermes
bengourley Jun 3, 2021
37316af
test(react-native): Fix path
bengourley Jun 3, 2021
17651d9
Merge pull request #1424 from bugsnag/tms/rn-0.64
twometresteve Jun 3, 2021
b7b8f5e
Merge pull request #1427 from bugsnag/bengourley/rn-0.64-hermes
bengourley Jun 3, 2021
76e42e0
deps(react-native): Update bugsnag-cocoa to v6.9.4
nickdowell Jun 4, 2021
d7f4adf
Merge pull request #1426 from bugsnag/bengourley/rn-codebundleid-default
bengourley Jun 7, 2021
24959be
fix(react-native): Symbolicate cocoa frames to fix test failure
nickdowell Jun 7, 2021
0ffffdf
Merge pull request #1419 from bugsnag/bengourley/rn-dev-console-warn-…
bengourley Jun 7, 2021
b083f6d
Merge pull request #1428 from bugsnag/nickdowell/bugsnag-cocoa-v6.9.4
nickdowell Jun 7, 2021
dbddad2
dep: bump bugsnag-android dependency to v5.9.4
fractalwrench May 27, 2021
9515d6d
Merge pull request #1421 from bugsnag/android-594
bengourley Jun 7, 2021
24e3610
chore: update changelog for release
bengourley Jun 7, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions .buildkite/react-native-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,30 @@ steps:
commands:
- npm run test:build-react-native-ios

- label: ':android: Build RN 0.64 (Hermes) apk'
key: "rn-0-64-hermes-apk"
depends_on:
- "android-builder-image"
timeout_in_minutes: 60
env:
REACT_NATIVE_VERSION: "rn0.64-hermes"
plugins:
- docker-compose#v3.3.0:
run: react-native-android-builder
artifact_paths:
- build/rn0.64-hermes.apk

- label: ':ios: Build RN 0.64 ipa'
key: "rn-0-64-ipa"
timeout_in_minutes: 60
agents:
queue: "opensource-mac-cocoa-11"
env:
REACT_NATIVE_VERSION: rn0.64-hermes
artifact_paths: build/rn0.64.ipa
commands:
- npm run test:build-react-native-ios

- label: ':android: Build react-navigation 0.60 apk'
key: "react-navigation-0-60-apk"
depends_on:
Expand Down Expand Up @@ -255,6 +279,28 @@ steps:
concurrency: 9
concurrency_group: 'browserstack-app'

- label: ':android: RN 0.64 (Hermes) Android 11 end-to-end tests'
depends_on: "rn-0-64-hermes-apk"
timeout_in_minutes: 60
plugins:
artifacts#v1.2.0:
download: "build/rn0.64-hermes.apk"
docker-compose#v3.3.0:
pull: react-native-maze-runner
run: react-native-maze-runner
use-aliases: true
command:
- --app=build/rn0.64-hermes.apk
- --farm=bs
- --device=ANDROID_11_0
- --a11y-locator
- --fail-fast
- --resilient
env:
SKIP_NAVIGATION_SCENARIOS: "true"
concurrency: 9
concurrency_group: 'browserstack-app'

- label: ':ios: RN 0.63 iOS 12 end-to-end tests'
depends_on: "rn-0-63-ipa"
timeout_in_minutes: 60
Expand All @@ -278,6 +324,33 @@ steps:
concurrency: 9
concurrency_group: 'browserstack-app'

- label: ':ios: RN 0.64 iOS 14 end-to-end tests'
depends_on: "rn-0-64-ipa"
timeout_in_minutes: 60
plugins:
artifacts#v1.2.0:
download: "build/rn0.64.ipa"
docker-compose#v3.7.0:
pull: react-native-maze-runner
run: react-native-maze-runner
use-aliases: true
command:
- --app=build/rn0.64.ipa
- --farm=bs
- --device=IOS_14
- --a11y-locator
- --appium-version=1.18.0
- --fail-fast
- --resilient
env:
SKIP_NAVIGATION_SCENARIOS: "true"
concurrency: 9
concurrency_group: 'browserstack-app'
# TODO: Soft fail pending PLAT-6696
soft_fail:
- exit_status: "*"


- label: ':android: react-navigation 0.60 Android 9 end-to-end tests'
depends_on: "react-navigation-0-60-apk"
timeout_in_minutes: 60
Expand Down
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# Changelog

## 7.10.2 (2021-06-07)

### Fixed

- (react-native): Prevent unhandled promise rejections being split into multiple log calls [#1419](https://github.com/bugsnag/bugsnag-js/pull/1419)

### Changed

- (react-native): Update bugsnag-cocoa to v6.9.4
- Improve performance of `notify()`. [bugsnag-cocoa#1102](https://github.com/bugsnag/bugsnag-cocoa/pull/1102) [bugsnag-cocoa#1104](https://github.com/bugsnag/bugsnag-cocoa/pull/1104) [bugsnag-cocoa#1105](https://github.com/bugsnag/bugsnag-cocoa/pull/1105)
- Fix a crash in `-[BugsnagApp deserializeFromJson:]` if main Mach-O image could not be identified, and improve reliability of identification. [bugsnag-cocoa#1097](https://github.com/bugsnag/bugsnag-cocoa/issues/1097) [bugsnag-cocoa#1101](https://github.com/bugsnag/bugsnag-cocoa/pull/1101)
- Remove need for `-ObjC` linker flag if linking Bugsnag as a static library. [bugsnag-cocoa#1098](https://github.com/bugsnag/bugsnag-cocoa/pull/1098)
- (react-native): Update bugsnag-android to v5.9.4
- Unity: add methods for setting autoNotify and autoDetectAnrs
[bugsnag-android#1233](https://github.com/bugsnag/bugsnag-android/pull/1233)
- Including bugsnag.h in C++ code will no longer cause writable-strings warnings
[bugsnag-android#1260](https://github.com/bugsnag/bugsnag-android/pull/1260)
- Small performance improvements to device and app state collection
[bugsnag-android#1258](https://github.com/bugsnag/bugsnag-android/pull/1258)
- NDK: lowMemory attribute is now reported as expected
[bugsnag-android#1262](https://github.com/bugsnag/bugsnag-android/pull/1262)
- Don't include loglog.so in ndk plugin builds performed on Linux
[bugsnag-android#1263](https://github.com/bugsnag/bugsnag-android/pull/1263)
- (react-native): Only include `codeBundleId` in payload if it has a value [#1426](https://github.com/bugsnag/bugsnag-js/pull/1426)

## 7.10.1 (2021-05-25)

### Changed
Expand Down
267 changes: 6 additions & 261 deletions TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,264 +77,9 @@ npm run test:test-container-registry-login

__Your session will periodically expire__, so you'll need to run this command to re-authenticate when that happens.

### Browser

The browser tests drive real, remote browsers using BrowserStack. As a Bugsnag employee you can access the necessary
credentials in our shared password manager.

#### Building the test fixtures

Use the `local-test-util` to build the test fixture, including the notifier from the current branch:

```shell script
./bin/local-test-util init
```

#### Running the end-to-end tests

The following environment variables need to be set:

- `MAZE_DEVICE_FARM_USERNAME`
- `MAZE_DEVICE_FARM_ACCESS_KEY`
- `HOST` - the test fixture host, typically `localhost`
- `API_HOST` - the MazeRunner mock server host, typically `localhost`

The browsers available to test on are the keys in [`browsers.yml`](https://github.com/bugsnag/maze-runner/blob/master/lib/maze/browsers.yml).

To run all the tests, run the following in `test/browser`:

```shell script
bundle exec maze-runner --farm=bs --browser=chrome_latest
```

Or to run a single feature file:

```shell script
bundle exec maze-runner --farm=bs --browser=chrome_latest features/device.feature
```

### Node

To run the Node test suite:

```sh
npm run test:node
```

You can use the `NODE_VERSION` env var to choose which version of Node to run the tests on. The default version is `10`.

To run a single feature file:

```sh
npm run test:node -- features/unhandled_errors.feature
```

### Expo

The Expo tests drive real, remote mobile devices using BrowserStack. As a Bugsnag employee you can access the necessary credentials in our shared password manager.

They also require access to the Expo ecosystem in order to publish, then build, the installable app packages. As above, these credentials can also be found in the shared password manager.

The following environment variables need to be set:

- `DEVICE_TYPE`: the mobile operating system you want to test on – one of ANDROID_5_0, ANDROID_6_0, ANDROID_7_1, ANDROID_8_1, ANDROID_9_0, IOS_10, IOS_11, IOS_12
- `MAZE_DEVICE_FARM_USERNAME`
- `MAZE_DEVICE_FARM_ACCESS_KEY`
- `EXPO_USERNAME`
- `EXPO_PASSWORD`

To run against an android device:

```sh
DEVICE_TYPE=ANDROID_9_0 \
EXPO_USERNAME=xxx \
EXPO_PASSWORD=xxx \
npm run test:expo:android
```

Running tests against an iOS device locally is not currently supported.

### React-native

The React-native tests drive real, remote mobile devices using BrowserStack. As a Bugsnag employee you can access the
necessary credentials in our shared password manager.

The test fixture (a React Native app) that tests are run against needs to be built with a published version of
@bugsnag/react-native. By default, the build process will base this on the current branch/comment,
e.g. `7.5.2-my-branch.e8cbdad2f4`, which needs to be published first if building locally. For example, if using
[Verdaccio](https://verdaccio.org/docs/en/docker.html):
```
node ./scripts/publish.js http://localhost:4873
```

This can also be overridden using the environment variable `NOTIFIER_VERSION`, which is useful during development when
making test, but not notifier, changes.


If building against the current branch/commit, the packages must be published to a locally owned NPM repository
(! Not the official NPMJS repository !). This can be locally or remotely hosted, but should be versioned appropriately.

Three bits of information will need to be passed into the test run as environment variables in order to
access this package:
- `REG_BASIC_CREDENTIAL`: the basic auth credentials of an account able to access the repository
- `REG_NPM_EMAIL`: the email of the user accessing the repository
- `REGISTRY_URL`: the remote address of the repository

The targeted release of `@bugsnag/react-native` must be tagged with the short hash of the current commit in order to be
picked up by the gradle build process.

There are several react-native versions that can be targeted and the `REACT_NATIVE_VERSION` environment variable should
be set accordingly:

| React native fixture | `REACT_NATIVE_VERSION` |
|----------------------|------------------------|
| 0.60 | `rn0.60` |
| 0.63 | `rn0.63` |

#### Building the test fixture

Remember to set the following variables:
- `REACT_NATIVE_VERSION`
- `REGISTRY_URL`
- `NOTIFIER_VERSION` (optionally)

For iOS:
```shell script
npm run test:build-react-native-ios
```

Fnd Android:
```shell script
npm run test:build-react-native-android
```
These will build a `.ipa` or `.apk` file respectively and copy into `./build`.

#### Running the end-to-end tests

Ensure that the following environment variables are set:
- `MAZE_DEVICE_FARM_USERNAME` - Your BrowserStack App Automate Username
- `MAZE_DEVICE_FARM_ACCESS_KEY` - Your BrowserStack App Automate Access Key
- `MAZE_BS_LOCAL` - Location of the BrowserStack local testing binary

See https://www.browserstack.com/local-testing/app-automate for details of the required local testing binary. In
particular, these commands need the `BrowserStackLocal` binary (available
[here](https://www.browserstack.com/local-testing/releases) to reside in your home directory.

1. Change into the `test/react-native` directory
1. Check the contents of `Gemfile` to select the version of `maze-runner` to use.
1. To run a single feature on an Android device (as an example):
```shell script
bundle exec maze-runner --app=../../build/${REACT_NATIVE_VERSION}.apk \
--farm=bs \
--device=ANDROID_9_0 \
--a11y-locator \
features/app.feature
```
1. Or on iOS:
```shell script
bundle exec maze-runner --app=../../build/${REACT_NATIVE_VERSION}.ipa \
--farm=bs \
--device=IOS_13 \
--appium-version=1.18.0 \
--a11y-locator \
features/app.feature
```
1. To run all features, omit the final argument.
1. Maze Runner also supports all options that Cucumber does. Run `bundle exec maze-runner --help` for full details.

### React-native CLI

The react-native CLI come in three parts:

- CLI tests, that don't require any remote connections or special setup
- Testing an app build, which requires your local machine to be set up for building iOS and Android applications
- Testing the built app, which requires the built application from the previous test set to run

#### CLI tests

The CLI tests target the command line interface by providing a set of responses to expected queries, verifying that the CLI tool responds correctly and makes appropriate changes to the workspace.

##### Setting up

1. Run through the initial setup
1. Run `npm pack packages/react-native-cli/` to pack the react-native-cli package
1. Copy the resulting package, `bugsnag-react-native-cli-{VERSION}.tgz` into the target fixture, e.g.:
```shell script
cp bugsnag-react-native-cli-*.tgz test/react-native-cli/features/fixtures/rn0_60/
```

##### Running

1. Change directory into `test/react-native-cli`
1. Check the contents of `Gemfile` to select the version of `maze-runner` to use
1. Install maze-runner with `bundle install`
1. Run the full set of cli tests targeting a specific react-native version (`rn0_61` for example):
```shell script
REACT_NATIVE_VERSION=rn0_61 bundle exec maze-runner features/cli-tests
```

#### Build tests

The build tests come in two flavours, Android and iOS, and are required to run the subsequent tests using the resulting `.apk` and `.ipa` artefacts. These tests ensure that the app can be built after Bugsnag is installed, and subsequent build messages are sent and contain the appropriate information.

##### Setup

1. Change directory into `test/react-native-cli`
1. Check the contents of `Gemfile` to select the version of `maze-runner` to use
1. Install maze-runner with `bundle install`

##### Running the Android variant

- Run maze-runner targeting the specific Android build feature for a specific react-native version (`rn0_61` for example):
```shell script
REACT_NATIVE_VERSION=rn0_61 bundle exec maze-runner features/build-app-tests/build-android-app.feature
```

##### Running the iOS variant (MacOS only)

- Run the script to trigger the build for the specific react-native version (`rn0_62` for example):
```shell script
./scripts/init-and-build-test.sh rn0_62
```

#### App tests

These tests ensure that Bugsnag has successfully been installed by the CLI, and errors and sessions are correctly reported.

##### Setup

Before running these tests the previous tests, `Build Tests` must be run for the test fixtures to be present.

1. Change directory into `test/react-native-cli`
1. Check the contents of `Gemfile` to select the version of `maze-runner` to use
1. Install maze-runner with `bundle install`

##### Running

Ensure that the following environment variables are set:
- `MAZE_DEVICE_FARM_USERNAME` - Your BrowserStack App Automate Username
- `MAZE_DEVICE_FARM_ACCESS_KEY` - Your BrowserStack App Automate Access Key
- `MAZE_BS_LOCAL` - Location of the BrowserStack local testing binary

See https://www.browserstack.com/local-testing/app-automate for details of the required local testing binary. In
particular, these commands need the `BrowserStackLocal` binary (available
[here](https://www.browserstack.com/local-testing/releases) to reside in your home directory.

1. To run on an Android device (`rn0_63` for example):
```shell script
bundle exec maze-runner --app=./build/rn0_63.apk \
--farm=bs \
--device=ANDROID_9_0 \
--a11y-locator \
--bs-local=~/BrowserStackLocal \
features/run-app-tests
```
1. Or on iOS:
```shell script
bundle exec maze-runner --app=../../build/rn0_63.ipa \
--farm=bs \
--device=IOS_13 \
--a11y-locator \
--bs-local=~/BrowserStackLocal \
features/run-app-tests
```
For further details, see the `TESTING.md` for individual platforms:
- [Browser](./test/browser/TESTING.md)
- [Expo](./test/expo/TESTING.md)
- [Node](./test/node/TESTING.md)
- [React Native](./test/react-native/TESTING.md)
- [React Native CLI](./test/react-native-cli/TESTING.md)
Loading