-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[No QA]Separate e2e test runs #29656
Conversation
# Conflicts: # .github/workflows/e2ePerformanceTests.yml
PR description to update |
npm has a |
Going to push to my own branch as we can't run the tests on a fork. |
…/separate-test-runs
.tool-versions
Outdated
@@ -0,0 +1 @@ | |||
nodejs 16.15.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this required? We have this in package.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, sorry. I use ASDF to handle per-project environments. That way I don't have to switch installs or use multiple tools (nvm, ruby-env, etc). This is just a file that describes which version is needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove, we use and recommend nvm: https://github.com/Expensify/App#getting-started
@@ -49,7 +49,9 @@ | |||
"analyze-packages": "ANALYZE_BUNDLE=true webpack --config config/webpack/webpack.common.js --env envFile=.env.production", | |||
"symbolicate:android": "npx metro-symbolicate android/app/build/generated/sourcemaps/react/release/index.android.bundle.map", | |||
"symbolicate:ios": "npx metro-symbolicate main.jsbundle.map", | |||
"test:e2e": "node tests/e2e/testRunner.js --development", | |||
"test:e2e:main": "node tests/e2e/testRunner.js --development --branch main --skipCheckout", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why have branch as a param if it's always main
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remnant of local testing. Doesn't really matter, doesn't change the behavior of the testing script.
tests/e2e/config.js
Outdated
|
||
ENTRY_FILE: 'src/libs/E2E/reactNativeLaunchingTest.js', | ||
|
||
// The port of the testing server that communicates with the app | ||
SERVER_PORT: 4723, | ||
|
||
// The amount of times a test should be executed for average performance metrics | ||
RUNS: 90, | ||
RUNS: 30, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we try 60 as a middle ground?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
tests/e2e/manually_trigger_aws_df.sh
Outdated
|
||
set -ex | ||
|
||
PROJECT_ARN=arn:aws:devicefarm:us-west-2:015174472939:project:741d1dac-84e7-4c6f-84ed-b41a2209319d |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assume this was a testing script we want to remove?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah
tests/e2e/utils/execAsync.js
Outdated
@@ -1,40 +1,52 @@ | |||
const {exec} = require('node:child_process'); | |||
const {exec} = require('child_process'); | |||
// const _ = require('underscore'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove line if its no longer needed
tests/e2e/utils/execAsync.js
Outdated
// if (_.keys(env).length !== 0) { | ||
// Logger.log(`environment variables:`, JSON.stringify(finalEnv, null, 2)); | ||
// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// if (_.keys(env).length !== 0) { | |
// Logger.log(`environment variables:`, JSON.stringify(finalEnv, null, 2)); | |
// } |
|
||
- name: Check if test failed, if so post the results and add the DeployBlocker label | ||
run: | | ||
if grep -q '🔴' ./Host_Machine_Files/\$WORKING_DIRECTORY/output.md; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this directory correct? Or should it just be ./output.md
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, should be ./output.md
Reviewer Checklist
Screenshots/VideosWebN/A - Tests only Mobile Web - ChromeN/A - Tests only Mobile Web - SafariN/A - Tests only DesktopN/A - Tests only iOSN/A - Tests only AndroidN/A - Tests only |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/AndrewGable in version: 1.3.90-0 🚀
|
🚀 Deployed to production by https://github.com/marcaaron in version: 1.3.90-2 🚀
|
🚀 Deployed to staging by https://github.com/AndrewGable in version: 1.3.91-0 🚀
|
🚀 Deployed to production by https://github.com/marcaaron in version: 1.3.91-8 🚀
|
Details
We are attempting to reduce variance on e2e tests by separating the runs of the main (baseline) and any delta branch by queueing two separate AWS Device Farm runs.
Currently e2e have to much variance, reporting performance regressions on innocuous changes. After some testing, it was shown that there is a memory leak somewhere (maybe RN itself? found this issue over the weekend). Therefore running subsequent tests on the same device/session causes a performance regression that has nothing to do with the App code.
This is one alternative where we separate the runs on two AWS DF sessions, each with a brand new rebooted device. With the hope they will decay/regress at the same rate and therefore eliminate some of the variance in case the changes do not have a regression themselves.
Internal discussion here:
https://expensify.slack.com/archives/C05LX9D6E07/p1697185949611829
Fixed Issues
$ #29660
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop