Skip to content

New integration tests for @sentry/browser and core. #3841

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

Closed
onurtemizkan opened this issue Jul 27, 2021 · 7 comments
Closed

New integration tests for @sentry/browser and core. #3841

onurtemizkan opened this issue Jul 27, 2021 · 7 comments
Assignees
Labels
Package: browser Issues related to the Sentry Browser SDK Package: core Issues related to the Sentry Core SDK Type: Improvement

Comments

@onurtemizkan
Copy link
Collaborator

onurtemizkan commented Jul 27, 2021

Currently, the integration tests for the browser package are flaky and so are disabled on CI.

Having a simpler set of integration tests that can be run on main browser cores (Chromium/WebKit/Firefox) could be very useful for catching issues related to stack trace formats or breadcrumbs.

The options I was thinking that could be fit for that are:

  • jest + puppeteer (chrome + firefox)
  • jest + playwright (chrome + webkit + firefox)
  • webdriver-io (simply selenium)

What would you think can be the best path to take?

@kamilogorek
Copy link
Contributor

I'm all up for it, but only as long as they will be reliable and won't take hours to run. We should discuss it during next planing @getsentry/team-webplatform

@AbhiPrasad
Copy link
Member

We've discussed this with the team internally and we figured it might be a good idea to explore playwright e2e tests for @sentry/browser. As Kamil mentioned above, the priority is that they are reliable and run relatively quickly.

@onurtemizkan do you mind exploring to see what this would look like? Once we get a grasp on how it feels, we can make a decision if we want to pursue this more indepth.

@onurtemizkan
Copy link
Collaborator Author

@AbhiPrasad, sure thing! I'll open a draft PR with a little PoC then. 👍

@github-actions
Copy link
Contributor

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@rhcarvalho
Copy link
Contributor

For the record, documenting our current state:

Currently, the integration tests for the browser package are flaky and so are disabled on CI.

I think the most flaky part was running the tests in BrowserStack.

Running the same tests on a local headless browser seems fine and the original tests have been re-enabled in #4226.

tests that can be run on main browser cores (Chromium/WebKit/Firefox)

We've also started running the original tests on those three browsers (the same browsers that come bundled with Playwright) in #4232.

@AbhiPrasad
Copy link
Member

One thing I'd like to note is that the existing karma integration tests are pretty hard to debug. I went through this while working on: #4265

Karma has issues with console.log debugging: karma-runner/karma-mocha#47, and setting up breakpoints is also a pain. In addition, it's quite hard to tell what scenarios are associated with what html + assertions at an initial glance.

@AbhiPrasad
Copy link
Member

Closing this as the playwright tests are in a pretty good spot now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: browser Issues related to the Sentry Browser SDK Package: core Issues related to the Sentry Core SDK Type: Improvement
Projects
None yet
Development

No branches or pull requests

5 participants