You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Ben Walding <be...@walding.com> on 2004/01/05 13:43:56 UTC

Re: cvs commit: maven-components/maven-model/src/test/org/apache/maven/model DependencyTest.java

Jason van Zyl wrote:

>On Sun, 2004-01-04 at 16:57, brett@apache.org wrote:
>  
>
>>brett       2004/01/04 13:57:53
>>
>>  Modified:    maven-model/src/test/org/apache/maven/model
>>                        DependencyTest.java
>>  Log:
>>  improve testing, remove stuff "to simple to fail"
>>  add ASL
>>    
>>
>
>What does "too simple to fail" mean? If you're refering to
>getters/setters then please put them back. It contributes to coverage
>and getters/setters are certainly subject to accidental typos.
>
>It's just hard to tell from the cvs log but it looked like getters/setters
>to me.
>
>  
>
I don't necessarily agree that getters and setters should be tested 
explicitly.  If you are exercising your beans properly, the getters and 
setters should be getting hit by other methods. If they are not getting 
hit, and you have good coverage across the board, then that tends to 
indicate that you might not need those attributes any more.


Just another perspective...


Ben

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: cvs commit: maven-components/maven-model/src/test/org/apache/maven/model DependencyTest.java

Posted by Jason van Zyl <jv...@maven.org>.
On Mon, 2004-01-05 at 07:43, Ben Walding wrote:

> I don't necessarily agree that getters and setters should be tested 
> explicitly.  

As far as code and development go in general I don't think there is ever
a downside in being explicit. Who knows how the code will evolve and who
knows what will change and given that it's very simple to test them I
see no harm in the additions of simple tests for properties.

> If you are exercising your beans properly, the getters and 
> setters should be getting hit by other methods. If they are not getting 
> hit, and you have good coverage across the board, then that tends to 
> indicate that you might not need those attributes any more.
> 
> 
> Just another perspective...
> 
> 
> Ben
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
-- 
jvz.

Jason van Zyl
jason@zenplex.com
http://tambora.zenplex.org

In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
  
  -- Jacques Ellul, The Technological Society


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


RE: cvs commit: maven-components/maven-model/src/test/org/apache/maven/model DependencyTest.java

Posted by Michal Maczka <mm...@interia.pl>.

> -----Original Message-----
> From: Ben Walding [mailto:ben@walding.com]
> Sent: Monday, January 05, 2004 1:44 PM
> To: Maven Developers List
> Subject: Re: cvs commit:
> maven-components/maven-model/src/test/org/apache/maven/model
> DependencyTest.java
>
>
> Jason van Zyl wrote:
>
> >On Sun, 2004-01-04 at 16:57, brett@apache.org wrote:
> >
> >
> >>brett       2004/01/04 13:57:53
> >>
> >>  Modified:    maven-model/src/test/org/apache/maven/model
> >>                        DependencyTest.java
> >>  Log:
> >>  improve testing, remove stuff "to simple to fail"
> >>  add ASL
> >>
> >>
> >
> >What does "too simple to fail" mean? If you're refering to
> >getters/setters then please put them back. It contributes to coverage
> >and getters/setters are certainly subject to accidental typos.
> >
> >It's just hard to tell from the cvs log but it looked like
> getters/setters
> >to me.
> >
> >
> >
> I don't necessarily agree that getters and setters should be tested
> explicitly.  If you are exercising your beans properly, the getters and
> setters should be getting hit by other methods. If they are not getting
> hit, and you have good coverage across the board, then that tends to
> indicate that you might not need those attributes any more.
>
>
> Just another perspective...
>
>
My 2 cents :
Test coverage tools like clover show what was not tested but they are not
really showing that something was tested.
No tool can do this.
Even if some code has 100% test cov. it doesn't mean that it is tested or
bug free.  But surely probability of "stupid" error is going down.

So I subscribe to Jason's opinion here: it's better to test everything
explicitly and tests are never harmful and nothing is "too simple to fail".


Michal







---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org