fakecloud vs Testcontainers

How fakecloud compares to Testcontainers. Testcontainers manages throwaway Docker containers for tests; fakecloud is an AWS emulator that Testcontainers can run.

Testcontainers is not a direct competitor — it's a test-container orchestration library for spinning up throwaway Docker containers for integration tests (PostgreSQL, Redis, Kafka, LocalStack, etc.). It provides the plumbing for managing container lifecycles in tests.

fakecloud is one of the AWS emulators Testcontainers can run. They're complementary.

How to use them together

Testcontainers has modules for local AWS emulation — historically the LocalStack module. fakecloud has a Rust Testcontainers module in progress: testcontainers-rs-modules-community PR #467.

Without the dedicated module, any Testcontainers flavor (Java, Python, Go, Rust, Node) can run fakecloud as a generic container:

// Java
GenericContainer<?> fakecloud = new GenericContainer<>("ghcr.io/faiscadev/fakecloud:latest")
    .withExposedPorts(4566)
    .waitingFor(Wait.forHttp("/_fakecloud/health"));
fakecloud.start();
String endpoint = "http://" + fakecloud.getHost() + ":" + fakecloud.getMappedPort(4566);
# Python
from testcontainers.core.container import DockerContainer
fakecloud = DockerContainer("ghcr.io/faiscadev/fakecloud:latest") \
    .with_exposed_ports(4566)
fakecloud.start()
endpoint = f"http://{fakecloud.get_container_host_ip()}:{fakecloud.get_exposed_port(4566)}"
// Go
req := testcontainers.ContainerRequest{
    Image:        "ghcr.io/faiscadev/fakecloud:latest",
    ExposedPorts: []string{"4566/tcp"},
    WaitingFor:   wait.ForHTTP("/_fakecloud/health"),
}
container, _ := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{ContainerRequest: req, Started: true})

When to use fakecloud standalone (no Testcontainers)

When to use fakecloud via Testcontainers

Testcontainers module status