dbremner / testability-explorer

Automatically exported from code.google.com/p/testability-explorer
Apache License 2.0
0 stars 0 forks source link

Main methods should not show up in reports #12

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Have a main method with some complexity (say static method calls or
something)
2. Report shows up with main method being untestable

What is the expected output? What do you see instead?

I am not sure that we should be seeing main methods as untestable ? Do we
even test main methods ? I mean, the whole point is we move our untestable,
wiring up logic to main methods, and then I see them in the reports. That
just seems backwards to me.

But should we whitelist, filter ? I dunno. Just throwing it out there.

Original issue reported on code.google.com by shyamseshadri on 27 Mar 2009 at 8:07

GoogleCodeExporter commented 8 years ago
Checked in a change not to report issues for main() methods.

I think you should still be avoiding big costs in main, though. If you call a 
bunch
of new's, that's ok, as long as you don't call the expensive methods on those
objects. If you create the object graph, then call the start() method on one of 
them,
everything can still be nice and testable since there is a seam even for the 
object
with the start().

In fact, I'm concerned that having a high cost, but then not reporting an issue 
for
it, will be misleading on the issues report. So we should just decide one way 
or the
other.

Original comment by aeagle22206 on 31 Mar 2009 at 2:55

GoogleCodeExporter commented 8 years ago

Original comment by aeagle22206 on 31 Mar 2009 at 2:55