Fwd: TWAIN Emma Coverage

2 views
Skip to first unread message

Jamie Ray

unread,
Jun 4, 2008, 3:04:17 PM6/4/08
to 308clas...@googlegroups.com
Here is the email from Prof. Dalbey

---------- Forwarded message ----------
From: John Dalbey <jda...@calpoly.edu>
Date: Tue, Jun 3, 2008 at 5:35 PM
Subject: Re: TWAIN Emma Coverage
To: Brian Mark <bm...@calpoly.edu>
Cc: Jamie Ray <jamie...@gmail.com>


Brian Mark wrote:

If you're still interested in seeing our Emma coverage with the java code highlighted (as well as all the code being run through the system tests rather than just the Undo.java), the data is here

Thanks for the link.

It seems that some methods such as this one,
http://users.csc.calpoly.edu/~whess/coverage/_files/1.html#7
are lacking coverage and aren't part of an IOException (or other exempted exception).

(In this case, I suspect that the offending code is probably
code that should have been identified during an Inspection
as no longer relevant to our goals, and removed.
But it wasn't.)

Also, the report doesn't include your code that is part
of Jalopy classes.  Do you know why that's not present?

Since the total coverage number of 84% is less than the desired criteria,  I'm still not convinced.   If ALL of the red code was IOExceptions, it would be easy.


So someone still needs to do the math to subtract
the "exempted" code and recompute the percentages.

If you leave me to do it, and it comes up less than 90%,
I'll require that you write more tests and rerun them,
resulting in additional late penalties.

If you do it, and it comes up less than 90%,
you can write more tests and rerun them,
rerun the report and post it and I'll never know,
so there won't be a late penalty.

So I guess the question is (to quote Dirty Harry)
"do you feel lucky?"

I would be happy to phone you in the morning, or you can come to office
hours at 9:30 - 11:30, to discuss this matter.

--Mr. Dalbey


Terence Statt

unread,
Jun 4, 2008, 3:11:39 PM6/4/08
to 308clas...@googlegroups.com, John Dalbey
Hey:
I get off of class at 9pm tonight.  If Bill would forward me the .html files, I'll recompute it and post the numbers after I get out of class and home.
--
Terence Statt

Bill Hess

unread,
Jun 4, 2008, 6:18:42 PM6/4/08
to 308clas...@googlegroups.com
I've already talked to Terence, but to make it easy, here is the whole
coverage report directory.

I just realized, that in the import button for the general settings
page that I simply modified part of the code that tries to import a
lot of strange things like URLs and JAL files. We don't do any actual
testing for this since I just left it the way it was with a change to
get a string from a normal file chooser. We can't test for it since
it's impossible to get to (I don't know what a JAL file is and the URL
part doesn't work with a file chooser). I didn't take code coverage
into consideration when I modified this part originally.

I don't think I can get this part to look good on emma without going
in and removing this code, but I take it we can't make any
modifications to the code now, even if it's just removing lines?

coverage.zip

Bill Hess

unread,
Jun 4, 2008, 6:39:15 PM6/4/08
to 308clas...@googlegroups.com
I'm just going to ask dalbey about it and see what he says.

Bill Hess

unread,
Jun 4, 2008, 6:43:29 PM6/4/08
to 308clas...@googlegroups.com
Or not. I'll just wait until he responds about this latest coverage report. :(

Terence Statt

unread,
Jun 4, 2008, 6:45:27 PM6/4/08
to 308clas...@googlegroups.com, John Dalbey
Hi:
I have calculated the new numbers and we have 92% coverage.  There is some error checking that isn't in try catch blocks but in if statements that isn't actually necessary but can't be counted since its never executed.  If we still need more coverage, we could and probably should remove those statements.  Here is the link for the new numbers
http://users.csc.calpoly.edu/~tstatt/default.htm
--
Terence Statt

On Wed, Jun 4, 2008 at 3:18 PM, Bill Hess <con...@gmail.com> wrote:

Jim Strange

unread,
Jun 4, 2008, 6:58:06 PM6/4/08
to 308clas...@googlegroups.com
Okay, well two things if we are to go forward with trying to improve the emma reports.  First it sounds like he wants us to include the files that we modified in the Jalopy source, which for me sounds like we are just going to get slammed. 

I'll need a listing of java files modified within Jalopy from you guys so that I can do the necessary compile:

javac -g *.java

Obviously, I'll need to set the classpaths accordingly, but that shouldn't be to bad now... and I'll generate a new jar with the new set of emma instrumented class files.  Unless Bill wants to modify the build script to handle the debugging flag and send me the classes that have being compiled accordingly.

I'll be able to generate the jar and pass that onto Brian who can then run the test (again) to generate a modified emma report.

This, however, will most likely generate a lower percentage in my opinion seeing that covering EVERYTHING within the Jalopy files will most likely not happen.  Unless we modify our test script to try handling each of the possibilities. 

If that is going to be the case then its going to put a lot of pressure on Brian to manipulate the test scripts.  I would be willing to help him with this...if we are to go forward with this.

Not only that but I think that I would need to add more to my particular test.  I'm not certain but its something that I should look into.  IF we proceed with adding Jalopy files to the emma report.

I await whatever decision is made.

Jim

Bill Hess <con...@gmail.com> wrote:

I'm just going to ask dalbey about it and see what he says.

On Wed, Jun 4, 2008 at 3:18 PM, Bill Hess wrote:
> I've already talked to Terence, but to make it easy, here is the whole
> coverage report directory.
>
> I just realized, that in the import button for the general settings
> page that I simply modified part of the code that tries to import a
> lot of strange things like URLs and JAL files. We don't do any actual
> testing for this since I just left it the way it was with a change to
> get a string from a normal file chooser. We can't test for it since
> it's impossible to get to (I don't know what a JAL file is and the URL
> part doesn't work with a file chooser). I didn't take code coverage
> into consideration when I modified this part originally.
>
> I don't think I can get this part to look good on emma without going
> in and removing this code, but I take it we can't make any
> modifications to the code now, even if it's just removing lines?
>

Bill Hess

unread,
Jun 4, 2008, 7:18:29 PM6/4/08
to 308clas...@googlegroups.com
Jim:

You can modify your build.xml file so that the javac tag looks like this:

<target name="compile" depends="setup" description="Compiles the source files">
<javac srcdir="${src}"
destdir="${bin}"
classpath="${lib};bluejext.jar"
source="1.5"
target="1.5"
debug="true"/>
</target>

Just add a new parameter: debug="true" after the target tag.

Jim Strange

unread,
Jun 4, 2008, 7:27:40 PM6/4/08
to 308clas...@googlegroups.com
Got it.  Thanks Bill.


Jim

Bill Hess <con...@gmail.com> wrote:

Jim:

You can modify your build.xml file so that the javac tag looks like this:



destdir="${bin}"
classpath="${lib};bluejext.jar"
source="1.5"
target="1.5"
debug="true"/>


Just add a new parameter: debug="true" after the target tag.

John Dalbey

unread,
Jun 9, 2008, 9:50:41 AM6/9/08
to Terence Statt, 308clas...@googlegroups.com
Terence Statt wrote:
> I have calculated the new numbers and we have 92% coverage. There is
> some error checking that isn't in try catch blocks but in if statements
> that isn't actually necessary but can't be counted since its never
> executed. If we still need more coverage, we could and probably should
> remove those statements. Here is the link for the new numbers
> http://users.csc.calpoly.edu/~tstatt/default.htm

Thank you, Terence.
Your hard work makes it straightforward for me to verify your
calculations, and I agree you have met the criteria.
Well done.

--Mr. Dalbey

Bill Hess

unread,
Jun 9, 2008, 1:18:45 PM6/9/08
to 308clas...@googlegroups.com
:)

Thanks for everyone's hard work.

Bill

Reply all
Reply to author
Forward
0 new messages