Skip to content

test: increase unit test coverage to 84%#1934

Draft
bobstrecansky wants to merge 2 commits intoopen-telemetry:mainfrom
bobstrecansky:increase-unit-test-coverage
Draft

test: increase unit test coverage to 84%#1934
bobstrecansky wants to merge 2 commits intoopen-telemetry:mainfrom
bobstrecansky:increase-unit-test-coverage

Conversation

@bobstrecansky
Copy link
Copy Markdown
Contributor

Summary

  • Increases unit test line coverage from 67.76% to 84.37% (6332/7505 lines)
  • Adds 110 new test files and enhances 12 existing test files
  • Total tests: 2262 (up from 1741)

Coverage breakdown

Area New/Enhanced Tests
API (Baggage, Behavior/Logging, Logs, Metrics Noop, Trace) 25 files
Config/SDK (ComponentProviders, Configuration, Environment) 45 files
Contrib (Otlp exporters, Protocols, ContentTypes) 4 files
SDK (Common, Logs, Metrics, Propagation, Registry, Trace) 48 files

Test plan

  • All 2262 unit tests pass
  • No changes to source code, only test files added/modified
  • All tests follow existing patterns (#[CoversClass], snake_case, TestCase)

Add comprehensive unit tests across the codebase to increase line
coverage from 67.76% to 82.27%. New and enhanced tests cover:

- API: Baggage, Behavior/Logging, Common/Time, Logs, Metrics (Noop), Trace
- Config/SDK: ComponentProviders, Configuration internals, Environment
- Contrib: Otlp exporters, Protocols, ContentTypes
- SDK: Common (Configuration, Export, InstrumentationScope, Util),
  Logs, Metrics (exporters, registry, data types), Propagation,
  Registry, Resource, Trace (limits, suppression, builders)
Add more tests for Config/SDK ComponentProviders, Configuration
internals, LogWriter implementations, Metrics data types, and
utility functions. Increases coverage from 82% to 84.37%.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant