-
-
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
Investigate more extensible solution for test resolution #29
Comments
- discoveryTests now returns the root testDescriptor and does not take and EngineDescriptor as argument - TestPlan holds a mapping for the engines and their corresponding root test descriptor
- discoveryTests now returns the root testDescriptor and does not take and EngineDescriptor as argument - TestPlan holds a mapping for the engines and their corresponding root test descriptor
I wrote a mail to the mailing list last week, which among other things touched on the test resolution & execution process. To which @bechte replied (https://groups.yahoo.com/neo/groups/junit/conversations/messages/24734)
I still think that executing the tests should be done by some internal Java component, not some pluggable mechanism like a TestEngine. Tools like IDEs will very soon rely heavily on the correct events/information delivered through some kind of listener API. If the TestEngines have to do this, because they are executing the tests, this will be broken for many TestEngines to come. But if it has to be the same all the time, it should be implemented only once. I like the Cucumber example. I fully agree that it should be possible to execute write an Engine that registers tests as Cucumber does. And there is some challenging work in this, to find the right abstraction (like: What exactly is a Test, and do we need some Granularity above and below Tests.) But this needs to be represented in a TestSpecifcation, so JUnit can properly report on it. And in the end a Test just gets executed, succeeds, fails or gets skipped, there is not much any Engine can or should change about that. And if TestEngine actually needs itself for the execution, there is no problem in having a Statement (using the Term from JUnit4 Rules) to reference and use the TestEngine it was created by. Keep up the good work. |
If I understand you right you'd prefer something along the following:
Then the launcher could execute the tests and make sure that the correct invocation of test execution events takes places. Well worth a consideration IMO. |
Yes. |
Additional complexity: For discovery engines must be given an object / lambda with which they can do things like create dynamic tests, forward additional test data and like during test execution later. I still think we should consider this approach and see if all types of engines that we think of would fit into such a model. |
After some discussion with Marc (he did some concrete experimentation that suggests that parallelization would be a piece of cake with this approach) we feel the need to hand down stuff from a container to a child. This could be done via generics, for example instead of MutableTestDescriptor we could have two interfaces along those lines:
A specific engine could then implement type-safe classes. Intermediate containers would implement both interfaces, e.g. a nested test is both child and parent. |
I've just looked into JUnit 4 again. As much as I like the approach suggested here, I don't see how we could implement the JUnit 4 engine with it. 😢 |
I have an idea; maybe we can have two different flavours of engines. Let's 2015-12-07 19:55 GMT+01:00 Marc Philipp notifications@github.com:
|
I would like to understand what the problem is with JUnit 4 and this approach. |
------------------------------------------------------------------------ On behalf of the community, the JUnit Lambda Team thanks synyx GmbH & Co. KG (http://www.synyx.de) for supporting the JUnit crowdfunding campaign! ------------------------------------------------------------------------
…resolving for the resolved tests #29 ------------------------------------------------------------------------ On behalf of the community, the JUnit Lambda Team thanks synyx GmbH & Co. KG (http://www.synyx.de) for supporting the JUnit crowdfunding campaign! ------------------------------------------------------------------------
------------------------------------------------------------------------ On behalf of the community, the JUnit Lambda Team thanks synyx GmbH & Co. KG (http://www.synyx.de) for supporting the JUnit crowdfunding campaign! ------------------------------------------------------------------------
------------------------------------------------------------------------ On behalf of the community, the JUnit Lambda Team thanks AdNovum Informatik AG (http://www.adnovum.ch) for supporting the JUnit crowdfunding campaign! ------------------------------------------------------------------------
------------------------------------------------------------------------ On behalf of the community, the JUnit Lambda Team thanks AdNovum Informatik AG (http://www.adnovum.ch) for supporting the JUnit crowdfunding campaign! ------------------------------------------------------------------------
------------------------------------------------------------------------ On behalf of the community, the JUnit Lambda Team thanks AdNovum Informatik AG (http://www.adnovum.ch) for supporting the JUnit crowdfunding campaign! ------------------------------------------------------------------------
…resolving #29 ------------------------------------------------------------------------ On behalf of the community, the JUnit Lambda Team thanks AdNovum Informatik AG (http://www.adnovum.ch) for supporting the JUnit crowdfunding campaign! ------------------------------------------------------------------------
------------------------------------------------------------------------ On behalf of the community, the JUnit Lambda Team thanks AdNovum Informatik AG (http://www.adnovum.ch) for supporting the JUnit crowdfunding campaign! ------------------------------------------------------------------------
------------------------------------------------------------------------ On behalf of the community, the JUnit Lambda Team thanks AdNovum Informatik AG (http://www.adnovum.ch) for supporting the JUnit crowdfunding campaign! ------------------------------------------------------------------------
------------------------------------------------------------------------ On behalf of the community, the JUnit Lambda Team thanks AdNovum Informatik AG (http://www.adnovum.ch) for supporting the JUnit crowdfunding campaign! ------------------------------------------------------------------------
…claring class #29 ------------------------------------------------------------------------ On behalf of the community, the JUnit Lambda Team thanks AdNovum Informatik AG (http://www.adnovum.ch) for supporting the JUnit crowdfunding campaign! ------------------------------------------------------------------------
------------------------------------------------------------------------ On behalf of the community, the JUnit Lambda Team thanks AdNovum Informatik AG (http://www.adnovum.ch) for supporting the JUnit crowdfunding campaign! ------------------------------------------------------------------------
------------------------------------------------------------------------ On behalf of the community, the JUnit Lambda Team thanks AdNovum Informatik AG (http://www.adnovum.ch) for supporting the JUnit crowdfunding campaign! ------------------------------------------------------------------------
…#29 ------------------------------------------------------------------------ On behalf of the community, the JUnit Lambda Team thanks AdNovum Informatik AG (http://www.adnovum.ch) for supporting the JUnit crowdfunding campaign! ------------------------------------------------------------------------
------------------------------------------------------------------------ On behalf of the community, the JUnit Lambda Team thanks AdNovum Informatik AG (http://www.adnovum.ch) for supporting the JUnit crowdfunding campaign! ------------------------------------------------------------------------
------------------------------------------------------------------------ On behalf of the community, the JUnit Lambda Team thanks AdNovum Informatik AG (http://www.adnovum.ch) for supporting the JUnit crowdfunding campaign! ------------------------------------------------------------------------
…all TestResolverRegistry.notifyResolvers, instead of returning a resolver result. This allows more flexibility and empowers the resolvers to work incorporately. #29 ------------------------------------------------------------------------ On behalf of the community, the JUnit Lambda Team thanks AdNovum Informatik AG (http://www.adnovum.ch) for supporting the JUnit crowdfunding campaign! ------------------------------------------------------------------------
------------------------------------------------------------------------ On behalf of the community, the JUnit Lambda Team thanks AdNovum Informatik AG (http://www.adnovum.ch) for supporting the JUnit crowdfunding campaign! ------------------------------------------------------------------------
------------------------------------------------------------------------ On behalf of the community, the JUnit Lambda Team thanks AdNovum Informatik AG (http://www.adnovum.ch) for supporting the JUnit crowdfunding campaign! ------------------------------------------------------------------------
------------------------------------------------------------------------ On behalf of the community, the JUnit Lambda Team thanks AdNovum Informatik AG (http://www.adnovum.ch) for supporting the JUnit crowdfunding campaign! ------------------------------------------------------------------------
------------------------------------------------------------------------ On behalf of the community, the JUnit Lambda Team thanks AdNovum Informatik AG (http://www.adnovum.ch) for supporting the JUnit crowdfunding campaign! ------------------------------------------------------------------------
------------------------------------------------------------------------ On behalf of the community, the JUnit Lambda Team thanks AdNovum Informatik AG (http://www.adnovum.ch) for supporting the JUnit crowdfunding campaign! ------------------------------------------------------------------------
------------------------------------------------------------------------ On behalf of the community, the JUnit Lambda Team thanks AdNovum Informatik AG (http://www.adnovum.ch) for supporting the JUnit crowdfunding campaign! ------------------------------------------------------------------------
------------------------------------------------------------------------ On behalf of the community, the JUnit Lambda Team thanks AdNovum Informatik AG (http://www.adnovum.ch) for supporting the JUnit crowdfunding campaign! ------------------------------------------------------------------------
------------------------------------------------------------------------ On behalf of the community, the JUnit Lambda Team thanks AdNovum Informatik AG (http://www.adnovum.ch) for supporting the JUnit crowdfunding campaign! ------------------------------------------------------------------------
------------------------------------------------------------------------ On behalf of the community, the JUnit Lambda Team thanks AdNovum Informatik AG (http://www.adnovum.ch) for supporting the JUnit crowdfunding campaign! ------------------------------------------------------------------------
------------------------------------------------------------------------ On behalf of the community, the JUnit Lambda Team thanks msg systems ag (http://www.msg-systems.com) for supporting the JUnit crowdfunding campaign! ------------------------------------------------------------------------
------------------------------------------------------------------------ On behalf of the community, the JUnit Lambda Team thanks msg systems ag (http://www.msg-systems.com) for supporting the JUnit crowdfunding campaign! ------------------------------------------------------------------------
------------------------------------------------------------------------ On behalf of the community, the JUnit Lambda Team thanks msg systems ag (http://www.msg-systems.com) for supporting the JUnit crowdfunding campaign! ------------------------------------------------------------------------
No description provided.
The text was updated successfully, but these errors were encountered: