-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
test: Isolated testing and SentryOptions
tests
#80
base: main
Are you sure you want to change the base?
Conversation
SentryOptions
tests
@@ -2,6 +2,7 @@ | |||
project/addons | |||
project/export_presets.cfg | |||
project/.vscode | |||
project/reports |
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.
For information, reports are created when unit tests are executed in the editor or from CLI.
@@ -16,6 +16,9 @@ func _configure(options: SentryOptions) -> void: | |||
options.before_send = _before_send | |||
options.on_crash = _on_crash | |||
|
|||
# Unit testing hooks (if you're exploring the demo project, pretend the following line doesn't exist). | |||
TestingConfiguration.configure_options(options) |
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.
Allowing unit tests to hook into our configuration script. I call such tests isolated, as they need to be executed separately from other similar tests. There is a new script that automates running them in a batch.
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.
TODO: This would break if the demo project were shipped without unit test files, which is how we currently do it.
scripts/run-isolated-tests.sh
Outdated
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.
One advantage of writing the script in pwsh is that we can run these on Windows/macOS/Linux
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.
Addressed in 6aefa3c
a4fad5f
to
5f00372
Compare
I have to give it another look. Something fishy is going on when I run these tests in a different environment. |
This PR introduces isolated testing and several new testing goodies:
SentryOptions
, error logger, and more.Isolated tests are good for testing various SDK options, as we may configure those only once and only at the app start.
Closes #75
#skip-changelog