Re: Fwd: Impressions from trying to write an own Engine

"Stefan Bechtold [email protected] [junit]" <[email protected]> Mon, 30 Nov 2015 10:16:49 +0100
Newsgroups gmane.comp.java.junit.user
Message-ID <[email protected]>
Hello Jens,

thank you for your feedback. We are still discussing some of the internals =
of the TestEngine and, therefore, are open for any kind of recommendations.=
 After all, this is the first draft of the prototype.

We have also had a discussion on points 2 and 3 within the team, but we put=
 it on the backlog as we wanted to have a very early prototype to gather fe=
edback from the community. I think we will decide on them within the next i=
teration and invite you to provide feedback anytime.

Concerning your point 4: "Why is there an execute method in a TestEngine?=
=E2=80=9C

The concept of a test engine covers both, lookup and execute tests. The cor=
e framework is not supposed to execute the tests itself, because a test eng=
ine could provide very specific test behavior, e.g. running cucumber tests,=
 requiring a very specific execution path. Therefore, we decided that the e=
ngine is responsible for both. In case of the JUnit5TestEngine, we will pro=
vide extension points that can be used by extension providers to hook into =
the standard =E2=80=9EJava testing=E2=80=9C test run circle. We are still w=
orking on this extension model, therefore, there is not much within the cod=
e, yet. Please be patient about this feature. I hope that we are able to pr=
ovide it within the next iteration, too.

All the best,

Stefan


> Am 29.11.2015 um 19:41 schrieb Jens Schauder [email protected] [ju=
nit] <[email protected]>:
>=20
>=20
> Hi everybody,
> after looking at the JUnit-Lambda prototype, I was a little disappointed =
that there was no TestEngine allowing to register tests by calling a test m=
ethod.
>=20
> So I decided to write my own engine. I failed miserably, which was probab=
ly due to me being really tired after a great conference I attended. So tak=
e my impressions with a grain of salt, but anyway here are they:
>=20
>=20
> 1. (good) the API is simple (few methods to implement)
>=20
> 2. Why is discoverTest of type void? I think it should really return some=
 kind of collection of Tests/ a TestPlanSpecification, instead of getting a=
 TestPlanSpecification passed in. The merging with other results of other e=
ngines should be task of the launcher
>=20
> 3. What is an Engine Descriptor, and why does my engine gets one passed a=
s an argument??? My Engine really should know how to describe itself ... bu=
t wait an EngineDescriptor is some kind of TestDescriptor??? Is my engine a=
 test? doesn't make sense to me. If it describes a test, then why has it an=
 attribute isTest, which returns false by default?
>=20
> 4. Why is there an execute method in a TestEngine? If a TestEngine is som=
ething (possibly) provided by a third party, it should not execute tests. I=
t should register them (along with all necessary and possible meta informat=
ion) and the core of JUnit should execute them.
>=20
> 5. How is the ReflectionUtils supposed to work?  I tried findAllClassesIn=
Package and findAllClassesInClasspathRoot, but didn't to manage to get anyt=
hing out of them, except null.
>=20
> 6. As mentioned above, I'm too stupid (or was too tired) to make it work.=
 If somebody wants to take a look, the poor results are in https://github.c=
om/schauder/junit-lambda/tree/lambda-engine <https://github.com/schauder/ju=
nit-lambda/tree/lambda-engine>
>=20
> kind regards
> Jens
>=20
>=20
>=20



[Non-text portions of this message have been removed]



------------------------------------
Posted by: Stefan Bechtold <[email protected]>
------------------------------------