Tuesday, October 9, 2007

16. MyIsernReview

Reviewed Author: Edward Kim
Source Code: Here

Installation Review:
First, I run the project in command line and it compile in "ANT" with no error. It passed all test and also build a jar file for execute application.
Second, I import the project to eclipse and run project into eclipse, it print out valid data in table.

Tool Execution:
---------------
Junit - OKey! Successful run all the test.
-Enable to see a print out table of information from XML file, when it run.

---------------
Checkstyle - OKey!
checkstyle.tool:
-Created dir: D:\ICS413\Myisern1.0\myisern-xml-1.0.1007\build\checkstyle
-Running Checkstyle 4.3 on 2 files

---------------
PMD - Okey!
pmd.tool:
-Created dir: D:\ICS413\Myisern1.0\myisern-xml-1.0.1007\build\pmd
-No problems found!

---------------
FindBugs - Okey!
findbugs.tool:
-Created dir: D:\ICS413\Myisern1.0\myisern-xml-1.0.1007\build\findbugs
-Running FindBugs...
-Output saved to D:\ICS413\Myisern1.0\myisern-xml-1.0.1007\build\findbugs/findbugs.xml

---------------
Emma - Okey!
Emma Coverage summary
class: 100% (1/1)
method: 90% (9/10)
block: 98% (497/508)
line: 96% (104/108)
You have some code didn't cover in "printTable" method, and you call "printTable" method in main, then it only have 90% coverage in method.

---------------
Verify - Okey! Successful run all the test.
BUILD SUCCESSFUL

After done verify project that I invoke the command line use "ant jar" to generate the jar file, then I run "java -jar myisern-1-green.jar" that it print a table from xml file. Up to this point, everything is okey which it pass verify all test and the application can be run as command line.

Code Format and Conventions Review:
FileLine# violationComment
MyIsernXmlLoader.java 149,166,*EJS-9Use meaningful names
MyIsernXmlLoader.java 124,180,*EJS-7Only put white space to delineate method, but it is notthe methods


Black Box Perspective:
In this case, the black box perspective is simple, because we only expect the application print out a table contain valid information, so there are no argument input to command line. We only type "java -jar myisern-1-green.jar" to run an application and print out table. I tested it and return reasonable outcome that the black box test is pass.

White Box Perspective:
I read through your code and found out something that I thing it could be improve your EMMA coverage in order to 100%. Since, your coverage is nearly 100%:
class: 100% (1/1)
method: 90% (9/10)
block: 98% (497/508)
line: 96% (104/108)
but it didn't mean your code is bad. It could be improve a little bit more, I read your code and see you put everything on one method and invoke it in main, so it is not testing detail inside the method, I suggest you to seperate your print method by each types of xml file, then I can invoke each types print method on test case then it can see which is not coverage.

Break da buggah:
For black box perspective, there are no chance to break the system, no matter you input any argument, it still return valid result.
For white box perspective, it must happen to break the system by insert another location of xml file, and you didn't do any error checking to due with this situation, then it will break the system.

Summary and Lessons Learned:
I learned to see the emme result coverage is not exactly need to be 100%, in other word, emme coverage result return 100% is not mean pass the test fully, all code can coverage, but it only invoke main to test case. It is not tested in detail, so that emme have 100% coverage is mean not "really" good on testing.

No comments: