- Reviewer: Chiao-Fen Zielinski-Liu
- Author:Randy Cox
- Installation Review:
- I have successfully downloaded the "myisern-xml-1.0.1007" from Randy's blog, and the installation process was very successful. I was not able to run the system with "java -jar". However, After I ran the system with Eclipse, I saw three very nice formatted table outputs . In addition, I did not see any errors or warnings after I ran the verify target. Hence, the whole installation process was very smooth. I am glad that the code that I reviewed for printing out tables is so different than the code I did with my team members. Therefore, it is more interesting to me.
- Code Format and Conventions Review:
- After running the CheckStyle target, there were no warnings on code format and conventions. Then, I decided to read through the code. I found that Randy and his team member did a very good job on writing comments, naming variables and how they organized their code. Hence, I could only find the violations as given below.
File | Line(s) | Violation | Comments |
MyIsernUtil.java | 7,15 | EJS-48 | "Utility to" can be omitted. |
HelloWorld .java | 38 | EJS-7 | Extra white space |
- Test Case Review:
- Four test classes:
- TestHelloWorld.java
- TestMyIsernPrintTables.java
- TestMyIsernUtil.java
- TestMyIsernXmlLoader.java
- Black box perspective:
- After running the "TestHelloWorld.java" class, three tables were generated and they were the same as when I ran the program in Eclipse. When tracing these test classes, I found the each test class contains methods to test the correspondents in non-test class. However, black box testing is to test a given input and check the output which should be exact the same as documented. Since tables generated by running the HelloWorld.java and tables generated by running the TestHelloWorld.java are the same, I would say that Randy's code passes black box testing.
- White box perspective:
- After running the Emma target, the result of the class, the method, the block and the line coverage were all 100%. White box testing is to see the internal structure of the system. 100% coverages tell us that all codes have been traced by these test classes. Hence, I believe that Randy's test cases cover white box testing.
- Break da buggah:
- I could not do anything to cause the system to crash or return an incorrect answer after thinking and trying a few hours. I guess I still need to think harder because somehow I believe that there must be a way to cause a system to crash.
- Summary and Lessons Learned:
- I am glad that I review Randy's code because his code makes me think how I should improve my code and the structure of my programs. For example, his test cases are clear and simple. This helps me to understand more about what I should do when I need to write test cases.
- I realize that when reviewing a better coding style, it gives me a chance to improve and enhance my way of writing a program, but when reviewing a careless coding style, it warns me not to make the same violations or mistakes.
No comments:
Post a Comment