148 CHAPTER 5 (Php web hosting) PERFORMANCE THROUGH THE APPLICATION

148 CHAPTER 5 PERFORMANCE THROUGH THE APPLICATION DEVELOPMENT LIFE CYCLE Figure 5-10. Coverage profile of a graphical application The test exercised all six classes, but missed a host of methods and classes. For example, in the JThumbnailPalette class, the test completely failed to call the methods getBackgroundColor(), setBackgroundColor(), setTopRow(), and others. Furthermore, even though the paint() method was called, the test missed 16.7 percent of the lines. Figure 5-11 shows the specific lines of code within the paint() method that the test did not execute. Figure 5-11 reveals that most lines of code were executed 17 times, but the code that handles painting a scrolled set of thumbnails was skipped. With this information in hand, the person needs to move the scroll bar, or configure an automated test script to move it, to ensure that this piece of code is executed. Coverage is a powerful profiling tool, because without it, you may miss code that your users will encounter when they use your application in a way that you do not expect (and rest assured, they definitely will).
Note: In case you are looking for affordable webhost to host and run your servlet application check Vision servlet hosting services

Leave a Reply