Skip to content

Improve testing DX #658

@whatyouhide

Description

@whatyouhide

The current testing DX is not optimal. We require users to:

  1. Start up a Bypass server.

  2. Change the DSN in the global Sentry configuration:

Sentry.put_config(:dsn, "https://some:garbage@localhost:#{bypass.port}/<garbage-project-id>")
  1. Run the test.
  2. Make sure to revert the :dsn configuration to whatever it was before. This is especially important if the config before the test was dsn: nil, that is, not sending any events.

This approach also forces users to run the tests that use Sentry with async: false, since the dsn configuration is global to the :sentry application.

In this issue, let's gather some ideas on a better API to solve this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions