Skip to content

E2E Test Setup #5506

Closed
Closed
@smeubank

Description

@smeubank

Idea

There is a gap in our tests, that we do not do a proper E2E test of our consumers using new releases of our SDK. E2E tests should catch those errors that we're unlikely to notice during normal development.

Requirements:

Examples of what an E2E test of an individual package should do:

  • Upload current version of SDK to a local fake registry (this is to test tarball contents) (we could use verdaccio as registry)
  • Download SDK package from the registry
  • Build an example app using the downloaded SDK (this is to test typing and eventual build-time stuff we do, ie. webpack plugin)
  • Run the example app
  • Intercept any outgoing requests to sentry from that example app
  • Do some stuff in the example app (cause errors, trigger transactions)
  • Check payloads of intercepted requests and their content

Consider:

  • This will have maintenance costs, changes in SDKs need to be reflected in our example apps

Prior Work:


Things to discuss and figure out

  • Do we intend these tests to be run locally? It would make the whole thing much less complicated running this only in CI because we don't have to worry about cleanup. The downside is that writing tests and adjusting the E2E test becomes a little bit more cumbersome.
    • Yes, it's a requirement to be run locally. It is definitely worth the additional effort.
  • When do we run E2E tests? As part of CI or with a cron-job?
    • Let's start off running the E2E as part of every PR. If we notice that they slow us down, we demote the checks to only run on master pushes or even only before doing a release.
    • Cron jobs will only become relevant when we test canaries for major frameworks.
  • Will E2E tests be a required check?
    • Discussed: Most likely yes. However, might turn into "no" depending on how fast the tests run.
  • Will we run E2E tests on different kinds of OSes? (Checking filepaths, etc.)
    • Yes, we should.
  • For step 2 (validating SDK behavior), would it make sense to actually send events to prod Sentry and query for the event IDs to verify the payloads?
    • Flakiness?
    • What if Sentry goes down? Bigger things to worry about.
    • What if Sentry simply has an implementation error?
    • What if the SDK has an error and doesn't return event IDs?
    • Upside: Constant stream of data flowing into Sentry for us to check out and verify things.
    • Decision: Let's send the events to prod Sentry. If we notice it's too flakey, we reevaluate.

Tasks

Next up

Verifying SDK behavior with E2E tests. Tracked in #5855

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions