On Dec 2, 2012, at 5:48 AM, Kristian Rosenvold <[email protected]> 
wrote:

> Some time ago, I modernized the surefire IT's using a builder on top
> of Verifier. I think they are much simpler and more concise than they
> used to be.
> 
> Typical samples can be seen here;
> 
> https://git-wip-us.apache.org/repos/asf?p=maven-surefire.git;a=blob;f=surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire907PerThreadWithoutThreadCountIT.java
> https://git-wip-us.apache.org/repos/asf?p=maven-surefire.git;a=blob;f=surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire628ConsoleOutputBeforeAndAfterClassIT.java
> https://git-wip-us.apache.org/repos/asf?p=maven-surefire.git;a=blob;f=surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire809GroupExpressionsIT.java
> 
> Now I just worked on an IT for MNG-5208 and I must admit I felt the
> step "back" to old-school verifier tests feels painful.
> 
> The test can be seen at
> 
> https://git-wip-us.apache.org/repos/asf?p=maven-integration-testing.git;a=blob;f=core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5208EventSpyParallelTest.java
> 
> I would like to do "something" about the core it's, maybe define a
> simpler standard for newer tests. I'm really just seeking input on
> this ;)
> 
> I think there are a number of issues even with my revised tests. As
> can be seen the signal to noise ratio becomes worse than ever;
> while the test can be precisely expressed as a one-liner, we
> consistently add 35 lines of java boiler-plate including license
> header.
> 
> The "builder" I made for surefire could be generalized and moved into
> verifier; I'm really interested in both feedback and other
> pointers to "nice" ways this has been solved.. Maybe I'm missing
> something big ;)

I think the way the ITs used to work was better. Where a single project was 
entirely self-contained and there was a declarative file that described the 
desired outputs. They couldn't not be run in an IDE but I think that could be 
fixed. The problem with the current setup is that they are impenetrable for 
anyone who might want to contribute. I can count on one hand the number of ITs 
contributed by outsiders. Imagine if a single unit test was a completely self 
contained project and we used something like JBehave so that someone could 
describe the desired output given the POM for the test project?

I still think that we need to be able to debug and run from the IDE but we can 
probably make a custom test running.

I would not change any of the existing tests, but if you wanted to use your 
builder and it makes the test more succinct go for it.

> 
> Kristian
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder & CTO, Sonatype
Founder,  Apache Maven
http://twitter.com/jvanzyl
---------------------------------------------------------

We all have problems. How we deal with them is a measure of our worth.

 -- Unknown





Reply via email to