Skip to content

Extract Container runners from JUnit specific code #506

@raphw

Description

@raphw

I want to suggest allowing Testcontainers as an API for starting and stopping Docker images from a Java application without depending on JUnit and to therefore remove the TestRule API from the container description that is JUnit (4)-specific.

I have started using Testcontainers.org for a standalone testklient and this works really nicely. With implementing my suggestion would allow for my use case but also offer a better integration for JUnit 5 that uses its own API or for using TestNG.

This would only require a minimum change in usage, one would for example write: new ContainerRule(new SomeContainer()) rather then new SomeContainer(). Other than that, the code is already segregated nicely.

Is this something you would consider to implement? I would be happy to offer the refactoring in this case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    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