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

Fixes #5839: Filter slow network logs for mobile tests on Browserstack. #6090

Merged
merged 3 commits into from
Jan 12, 2019

Conversation

apb7
Copy link
Contributor

@apb7 apb7 commented Jan 11, 2019

Explanation

Fixes #5839: Filter out Slow Network logs for mobile tests on Browserstack.

Checklist

  • The PR title starts with "Fix #bugnum: ", followed by a short, clear summary of the changes. (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • The PR explanation includes the words "Fixes #bugnum: ..." (or "Fixes part of #bugnum" if the PR only partially fixes an issue).
  • The linter/Karma presubmit checks have passed.
    • These should run automatically, but if not, you can manually trigger them locally using python scripts/pre_commit_linter.py and bash scripts/run_frontend_tests.sh.
  • The PR is made from a branch that's not called "develop".
  • The PR follows the style guide.
  • The PR is assigned to an appropriate reviewer.
    • If you're a new contributor, please ask on Gitter for someone to assign a reviewer.
    • If you're not sure who the appropriate reviewer is, please assign to the issue's "owner" -- see the "talk-to" label on the issue.

@apb7 apb7 requested a review from seanlip as a code owner January 11, 2019 14:58
@nithusha21
Copy link
Contributor

https://www.browserstack.com/automate/capabilities can we do something like this, to make sure the correct browser version is selected? is that feasible?

Interestingly, their FAQs mention that latest stable browser versions are added within a week, and they haven't updated it yet.

@apb7
Copy link
Contributor Author

apb7 commented Jan 11, 2019

@nithusha21, I was already in discussion with the Browserstack Support Team. They do not have any way to fix the browser version atm.

@nithusha21
Copy link
Contributor

Ah I see. Ignoring these errors is not a bad idea. I am fine with this approach if it works!

@apb7 apb7 force-pushed the console-errors-on-browserstack branch from 626b54d to 94c3244 Compare January 11, 2019 16:52
@nithusha21
Copy link
Contributor

Seems to be working! Yay :)

@codecov-io
Copy link

codecov-io commented Jan 11, 2019

Codecov Report

Merging #6090 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #6090   +/-   ##
========================================
  Coverage    45.37%   45.37%           
========================================
  Files          525      525           
  Lines        30863    30863           
  Branches      4615     4615           
========================================
  Hits         14005    14005           
  Misses       16858    16858

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 95d66da...b9d411a. Read the comment docs.

Copy link
Contributor Author

@apb7 apb7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is ready for review, @seanlip @nithusha21. I have added comments to explain the approach here as well as in the code itself. Thanks!

// This causes the tests to fail, therefore, we remove such logs.
if (browser.isMobile) {
browserLogs = browserLogs.filter(function(browserLog) {
return !(browserLog.message.includes(' Slow network is detected.'));
Copy link
Contributor Author

@apb7 apb7 Jan 11, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We compiled the logs from Browserstack (can be found out here) (Thanks @lilithxxx!). I observed a common pattern Slow network is detected. and therefore filtered out such logs in case of mobile tests.

@apb7 apb7 changed the title [WIP] Fixes #5839: Filter slow network logs for mobile tests on Browserstack. Fixes #5839: Filter slow network logs for mobile tests on Browserstack. Jan 11, 2019
@apb7 apb7 requested a review from nithusha21 January 11, 2019 17:40
Copy link
Member

@seanlip seanlip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@seanlip
Copy link
Member

seanlip commented Jan 11, 2019

(And congrats on resolving this!)

@apb7 apb7 merged commit 58c26a4 into develop Jan 12, 2019
@apb7 apb7 deleted the console-errors-on-browserstack branch January 12, 2019 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mobile tests for the develop branch are failing
4 participants