Re: Unit Testing Code Coverage

2007-08-22 Thread Dinner
That wikipedia ROCKS!

Seems like the most plausible way to get that kind of
coverage is through Test Driven Design, and I mean
the kind where you sorta define the thing you're trying
to build in the empty space of the tests, or whatever.

Automated might get buffer-overflow type stuff, but I
think you could easily spend 90% more time writing
tests than actually writing code, if that makes sense,
if you haven't built it that way (TDD) from the bottom.

Seems sorta like it's a random guess type deal. =]

Thanks for the knowledge/descriptions, lovely stuff!
__
If trouble(t) halts, it must be because halt(t, t) returned false,
but that would mean that trouble(t) should not have halted.


~|
ColdFusion 8 - Build next generation apps
today, with easy PDF and Ajax features - download now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:286793
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Unit Testing Code Coverage

2007-08-22 Thread Sean Corfield
On 8/21/07, Dinner [EMAIL PROTECTED] wrote:
 That wikipedia ROCKS!

Don't believe everything you read on wikipedia - it's descriptions of
some design patterns are pitiful, for example.

 Seems like the most plausible way to get that kind of
 coverage is through Test Driven Design

The point of code coverage is *measurability*. By definition, you get
better coverage by having better tests but that's irrelevant to the
process of figuring out the *amount* of coverage.
-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/

If you're not annoying somebody, you're not really alive.
-- Margaret Atwood

~|
Check out the new features and enhancements in the
latest product release - download the What's New PDF now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:286794
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Unit Testing Code Coverage

2007-08-22 Thread Dinner
On 8/22/07, Sean Corfield wrote:

 On 8/21/07, Dinner [EMAIL PROTECTED] wrote:
  That wikipedia ROCKS!

 Don't believe everything you read on wikipedia - it's descriptions of
 some design patterns are pitiful, for example.


Fo sho- Did you see the page on Dada Art? ;-)
Do you ever edit those patterns entries?

 Seems like the most plausible way to get that kind of
  coverage is through Test Driven Design

 The point of code coverage is *measurability*. By definition, you get
 better coverage by having better tests but that's irrelevant to the
 process of figuring out the *amount* of coverage.


I could see how one could say I tested for X but it's the out of X
bit that seems like it could go on for ever.  Thus, the percentage
bit- how do you know how much you've done if you don't really
know how much you have to do?  I've tested for X is honest.

Some of the coverage tests are easy, others, don't look so easy..

I get the idea, and it's fine, I just like how it's sorta impossible.
Not like impossible-impossible- we did send peeps 2 da moon!


~|
Get involved in the latest ColdFusion discussions, product
development sharing, and articles on the Adobe Labs wiki.
http://labs/adobe.com/wiki/index.php/ColdFusion_8

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:286799
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Unit Testing Code Coverage

2007-08-22 Thread Jochem van Dieten
Dinner wrote:
 On 8/22/07, Sean Corfield wrote:
 
 The point of code coverage is *measurability*. By definition, you get
 better coverage by having better tests but that's irrelevant to the
 process of figuring out the *amount* of coverage.
 
 I could see how one could say I tested for X but it's the out of X
 bit that seems like it could go on for ever.  Thus, the percentage
 bit- how do you know how much you've done if you don't really
 know how much you have to do?

You know how much you have to do: every line.

Jochem

~|
ColdFusion 8 - Build next generation apps
today, with easy PDF and Ajax features - download now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:286805
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Unit Testing Code Coverage

2007-08-21 Thread Dinner
On 8/20/07, Rich wrote:
 Is anyone aware of a code coverage tool for CF unit tests?  If not, how
are
 the rest of you handling unit test coverage (if at all)?

The CFUnit view in CFEclipse is cool, and there's also the TPTP
JUnit auto-generated stuff, but honestly, selenium has been the
most useful (for non-regression assertion (used most (by me))).

I think most people are using ANT and CF[C]Unit (/most/ hehe).

What do you mean by code coverage?
__
Don't remember what you can infer.
-- Harry Tennant


~|
Create robust enterprise, web RIAs.
Upgrade to ColdFusion 8 and integrate with Adobe Flex
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:286659
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Unit Testing Code Coverage

2007-08-21 Thread Rich
 What do you mean by code coverage?

Per the wonders of wikipedia:

Code coverage is a measure used in software testing. It describes the
degree to which the source code of a program has been tested.

I have just joined a new team, and we have quite a bit of legacy code for
older products and we are looking to track our progress of unit test
implementation.  I can roll my own code coverage tool to give generic 5%
test coverage type responses from the meta data of the CFCs, but with the
(great!) unit testing surge in the CF community I was hoping there was a
preexisting solution.

I know that test coverage reports can be misleading as even with 100%
coverage, the quality of the tests are (generally) a more important metric.
That said, we are interested in analyzing the increase in unit tests in
relation to developer productivity (ease of refactoring), regression bugs,
etc.

Rich Kroll



~|
Create robust enterprise, web RIAs.
Upgrade to ColdFusion 8 and integrate with Adobe Flex
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:286674
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Unit Testing Code Coverage

2007-08-21 Thread Christopher Vigliotti
@dinner: code coverage determines the percentage of your code that is
actually being unit tested.  For example, you could have a function in a
component that has a test case written for it, but the function could
contain if/elself/else statements, switch statements or other conditional
logic that the test case doesn't 'cover'.

a better explanation can be found here:
http://en.wikipedia.org/wiki/Code_coverage

As far as I know, there is no ColdFusion unit testing solution that supports
code coverage.  If I'm wrong someone please chime in!

- Christopher Vigliotti
Sr. ColdFusion Developer
AboutWeb
http://www.aboutweb.com

On 8/21/07, Dinner [EMAIL PROTECTED] wrote:

 On 8/20/07, Rich wrote:
  Is anyone aware of a code coverage tool for CF unit tests?  If not, how
 are
  the rest of you handling unit test coverage (if at all)?

 The CFUnit view in CFEclipse is cool, and there's also the TPTP
 JUnit auto-generated stuff, but honestly, selenium has been the
 most useful (for non-regression assertion (used most (by me))).

 I think most people are using ANT and CF[C]Unit (/most/ hehe).

 What do you mean by code coverage?
 __
 Don't remember what you can infer.
 -- Harry Tennant


 

~|
Check out the new features and enhancements in the
latest product release - download the What's New PDF now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:286675
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Unit Testing Code Coverage

2007-08-21 Thread John Paul Ashenfelter
On 8/20/07, Rich [EMAIL PROTECTED] wrote:
 Is anyone aware of a code coverage tool for CF unit tests?  If not, how are
 the rest of you handling unit test coverage (if at all)?

I get this question a lot since I'm doing a lot of automation/testing
consulting in the CF world and the answer is no. With the size of the
market for code coverage in CF (quite small compared to Java, Ruby,
etc) it's unlikely to come from anywhere but a community effort.


 - Rich Kroll



 

~|
Create robust enterprise, web RIAs.
Upgrade to ColdFusion 8 and integrate with Adobe Flex
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:286682
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Unit Testing Code Coverage

2007-08-21 Thread Rich
It looks as though I am going to have to develop a solution for our needs,
but I will see if my company will allow me to release our efforts into the
public domain.


~|
ColdFusion 8 - Build next generation apps
today, with easy PDF and Ajax features - download now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:286685
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Unit Testing Code Coverage

2007-08-21 Thread Jaime Metcher
Given that a step debugger is basically sitting there watching line numbers
fly by waiting for a break-point, it seems to me that if the debugger kept a
record of those line numbers you'd have a test coverage tool.  I did lodge a
feature request with the FusionDebug guys, but I have no notion of whether
this is a serious possibility for them.  Maybe if there's enough demand it'd
move up the priority list?

Jaime Metcher

 -Original Message-
 From: Rich [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, 22 August 2007 12:32 AM
 To: CF-Talk
 Subject: RE: Unit Testing  Code Coverage


 It looks as though I am going to have to develop a solution for our needs,
 but I will see if my company will allow me to release our efforts into the
 public domain.


 

~|
Create robust enterprise, web RIAs.
Upgrade to ColdFusion 8 and integrate with Adobe Flex
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:286752
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4