hiero-ledger / hiero-ledger/hiero-enterprise-java

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

Open
#154 0 comments 0 reactions 0 assignees View on GitHub
pending-review
Dominant language
Java
Stars
6
Forks
21
Avg merge
10h 27m
Merged PRs (30d)
37

Description

## 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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.