-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a way to specify my own test method runner #1248
Comments
We're going to provide a way to execute a test (for #20 and #60) using a custom "ExecutorService"-like interface. The "Executable" we're planning to hand to this "ExecutorService" would, when executed, fire events to Is this request different from #1145? |
I don't think providing an |
Hi,
LauncherDiscoveryRequest request = LauncherDiscoveryRequestBuilder.request()
.selectors(DiscoverySelectors.selectMethod(testClass.getCanonicalName(), methodName))
.build();
launcher.execute(request); so, then I have the whole test lifecycle executed inside of the container again. But, having the way of providing my own executor for the test method block (including the callbacks) would be the best. |
How would this work in detail? Let's assume we introduced a new interface ExecutableInvoker extends Extension {
void invoke(Executable executable, ExtensionContext extensionContext) throws Throwable;
} What would the Arquillian implementation do in the non-embedded container case? Would it completely ignore the |
I'd like to see something like this so I could write an invoker and stop having to wrap all my tests that call Kotlin Coroutines |
This issue is related to #157. |
@MatousJobanek and @arjantijms, does the support introduced in #157 and #2083 meet your needs? |
This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. Thank you for your contribution. |
This issue has been automatically closed due to inactivity. If you have a good use case for this feature, please feel free to reopen the issue. |
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
The text was updated successfully, but these errors were encountered: