Skip to content

Proposed testing-common improvements and refactoringsΒ #2248

@mateuszrzeszutek

Description

@mateuszrzeszutek
  • Reuse AssertJ-based assertions from the SDK testing module. This probably requires adding a bit of functionality to the SDK assertions first (there probably are some asserts that we have here and they're missing from the SDK testing module). Ideally in this repo we should only have thin Groovy wrappers over the SDK testing assertions.
  • Migrate as many test utilities from Groovy to Java (e.g. TraceUtils)
  • Refactor InMemoryExporter: it's not really an exporter, it only provides the waitForTraces() method. We should add a shortcut method to InstrumentationSpecification/InstrumentationExtension classes so that direct calls to waitForTraces() are eliminated. This is already done
  • Package structure:
    • io.opentelemetry.testing should be the general base package for all testing classes and utilities
    • All spock-related Groovy code should be in the package io.opentelemetry.testing.spock (base classes, assertion wrappers)
    • Javaagent bridging should be in the package io.opentelemetry.testing.javaagent

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions