Skip to content

Provide a way to specify my own test method runner #1248

@MatousJobanek

Description

@MatousJobanek

Overview

I'm part of Arquillian team and I've been trying to implement either Arquillian Engine or Arquilian Extension for JUnit 5. Unfortunately, nothing is feasible for now. The Engine is a bigger issue. In case of extension, there is missing only one functionality.

Specific problem

One of Arquillian modes is running in-container tests - executing test methods/classes inside of a container (as part of a deployment). Unfortunately, currently there is no way to tell JUnit 5 where the test should be executed or to provide my own runner that would execute the test method either on a client or in a container. I can only skip the test methods or let them run locally.

Possible solutions

Custom ExecutableInvoker

The easiest solution would be having an SPI (eg. using service loader) that would load inside of the TestMethodTestDescriptor a custom implementation of the ExecutableInvoker class (if none is provided, then the default would be used) and execute the method using the provided invoker.

Custom runner for test descriptors

The previous solution is easy to do, but has one side effect - the method callbacks would be executed on both sides - on a client and inside of the container (as I would need to simulate everything inside of the container again). An advanced solution would be having a possibility to provide an invoker for every TestDescriptor separately.

For more information about my research see this issue: arquillian/arquillian-core#137

Related Issues

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