img
. .
Verifying Test Case Code Coverage
The test cases that we developed should cover most of the business logic and user interfaces that were
developed, which is referred to as code coverage. In an ideal case, the code coverage percentage should
be 100 percent, which means that each line of code written is tested thoroughly.
In Eclipse (which STS is running on), there are a lot of plug-ins that can help you in visualizing the
code coverage of the test cases written. In this section, we will present you with a tool called CodePro
Analytix (http://code.google.com/intl/en/javadevtools/codepro/doc/index.html).
CodePro Analytix used to be a commercial tool. Google acquired the parent company, however, and
now the tool is distributed for free. CodePro Analytix provides a lot of code quality management
features, such as code analysis, JUnit test generation, code coverage, and so on. To install CodePro
Analytix in STS, choose Help Install New Software in STS, and then click the Add button. Enter the
name CodePro Analytix and the updated site URL
http://dl.google.com/eclipse/inst/codepro/latest/3.7. The components will then displayed for your
selection, as shown in Figure 19-8.
Figure 19-8. Installing CodePro Analytix in STS
Just choose all the components (although in this section, we use only the Code Coverage tool), and
click the Next button to install the plug-in.
Search WWH :
Custom Search
Previous Page
Spring Framework 3 Topic Index
Next Page
Spring Framework 3 Bookmarks
Home