-
Notifications
You must be signed in to change notification settings - Fork 71
Description
Feature description
I'm working on code that integrates with Datadog android APIs that I'd like to test effectively without relying on heavyweight mocks for Datadog objects and functionality.
For example, for internal use in my organisation I have a wrapper library which assists with configuring Datadog correctly across a handful of different apps. I also have an Otel LoggerProvider
implementation which routes logs to the Datadog logger. I'd like to be able to write tests that can verify the correct interactions with the Datadog API such as verifying that specific features are enabled and inspecting their config, or capturing the log entries received and processed by Datadog.
At the moment many of the elements of the SDK are accessed via separate static objects and builder functions around an SdkCore instance. I haven't seen anything in the docs or code which looks like a publicly available set of testing utilities which could be used to avoid lots of mocking of the public parts of the Datadog SDK.
Proposed solution
I'd expose a testing library containing a TestRule for managing a Datadog instance during tests, along with a collection of Fakes for different features and the SDK core.
Other relevant information
No response