Skip to content

feat: Introduce hiero-enterprise-testcontainers for easier integration testing #154

@Aamir377300

Description

@Aamir377300

Problem

While exploring integration testing for hiero-enterprise-java, I noticed that running tests currently depends on having either a locally running Hiero node setup or access to a public test network and this works, but it can make development and testing a little harder in practice.

Some common issues are:

  • new contributors needing to manually configure infrastructure before running tests
  • CI pipelines depending on external network availability
  • local environments keeping state between test runs
  • difficulty running isolated integration tests consistently

Proposed Idea

Introduce a dedicated module hiero-enterprise-testcontainers that provides Testcontainers-based support for spinning up temporary Hiero environments during integration tests. The goal would be to make integration testing more reproducible and easier to run locally and in CI without requiring extra setup.

Possible Components

  • HieroContainer: A wrapper around the hashgraph/hedera-local-node Docker image that automatically starts the node, exposes gRPC endpoints, and provides helper methods for operator/network configuration.
  • MirrorNodeContainer: A container for Mirror Node services (REST/GRPC) so repository and historical query flows can be tested locally in a clean state.

Spring Boot Integration

Provide integration support using: @DynamicPropertySource

Why This Could Help

This could make integration testing much simpler for both contributors and downstream applications.

Benefits could include:

  • easier onboarding for contributors
  • more reliable CI/CD pipelines
  • isolated and repeatable test environments
  • less dependency on external testnets
  • better alignment with modern Java testing practices

It also feels like a natural fit for enterprise-focused tooling since many Java ecosystems already provide official Testcontainers support for local integration testing. so Spring applications can automatically connect to the temporary container environment during tests.

Example direction:

@Container
static HieroContainer hiero = new HieroContainer("hashgraph/hedera-local-node:latest");

please assign me this issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions