Java Doc for JBlanketReport.java in  » Code-Analyzer » JBlanket » csdl » jblanket » report » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Code Analyzer » JBlanket » csdl.jblanket.report 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   csdl.jblanket.JBlanket
      csdl.jblanket.report.JBlanketReport

JBlanketReport
public class JBlanketReport extends JBlanket (Code)
Creates reports for method coverage.

This is the last step in JBlanket.

There are two main functions of this class:

  • Combines the methods invoked during testing in "COVER-*.xml" files into one XML file, where * is the fully qualified name of the test class, then derives the methods that were not tested.
  • Calls the AggregateTransformer class to combine JBlanket output and transform them into HTML files.

The above mentioned functions are achieved by invoking the main method. Arguments to pass to the main method include:

Required command line argument:

    none.

Optional command line argument:

    'enable' - describes if a JBlanket report should be created. Valid values include "true", "on", "yes" to create a report or "false", "off", or "no" to not create a report.
    For example: -enable true

    'verbose' - describes if report should be created in verbose mode
    For example: -verbose true

    'reportFormat' - format of the HTML report, either 'frames' or 'noframes'
    For example: -reportFormat frames

    'toDir' - directory where all HTML files should be sent
    For example: -toDir jblanket/html

    'excludeOneLineMethods' - describes if one-line methods were excluded
    For example: -excludeOneLineMethods false

    'excludeConstructors' - describes if constructors were excluded
    For example: -excludeConstructors false

    'excludeIndividualMethods' - describes if individual methods were excluded
    For example: -excludeIndividualMethods false

    'totalFile' - name of XML file containing all methods included in the coverage measurement
    For example: -totalFile totalMethods.xml

    'testedFile' - name of XML file to contain all methods that were tested
    For example: -testedFile testedMethods.xml

    'untestedFile' - name of XML file to contain all methods that were not tested
    For example: -untestedFile untestedMethods.xml

    'onelineFile' - name of XML file containing all one-line methods
    For example: -oneLineFile oneLineMethods.xml

    'constructionFile' - name of XML file containing all constructors
    For example: -constructorFile constructorMethods.xml

    'excludedIndividualFile' - name of XML file containing all individually excluded methods
    For example: -excludedIndividualFile excludedIndividualMethods.xml

Default values are provided for all optional command line arguments and are equivalent to those shown in the examples. Note that values for similar arguments found in csdl.jblanket.modifier.Modifier or csdl.jblanket.app.ExcludeIndividualMethodApp must be set to the same value. For example, if the 'excludeOneLineMethods' argument was set to 'true' and the 'onelinefile' argument was set to 'myOneLineMethods.xml' in the Modifier class, then arguments for 'excludeOneLineMethods' and 'onelinefile' in csdl.jblanket.report.JBlanketReport and csdl.jblanket.app.ExcludeIndividualMethodApp also need to be set to 'true' and 'myOneLineMethods.xml', respectively.

Note that the methods in excludedIndividualFile take priority over all the other methods. I.e., if a one-line method was individually excluded by the application, then it is considered to be an individually excluded methods instead of a one-line method.
author:
   Joy M. Agustin
version:
   $Id: JBlanketReport.java,v 1.3 2005/02/21 20:28:40 timshadel Exp $id




Constructor Summary
public  JBlanketReport(boolean verbose, boolean excludeOneLineMethods, boolean excludeConstructors, boolean excludeIndividualMethods, String reportFormat, File toDir)
     Constructs a new JBlanketReport object.

Method Summary
public  StringcreateReport()
     Creates a report from the XML files.
throws:
  JBlanketException - if unable to create report.
protected  voidcreateTestedFile()
     Creates an aggregate file containing all methods invoked during testing.
protected  voidcreateUntestedFile()
     Creates a file containing the methods that were not invoked during testing.
protected  MapgetReportCategories()
     Returns all the categories of methods collected.
public static  voidmain(String args)
     Provides the command line interface.
public static  voidmain(List args)
     Processes the command line arguments as a List.

Created for JBlanketReportTask Ant taskdef.

protected  voidstoreMethods(MethodSet methodSet, File file)
     Stores all the method information from jblanketSet to fileName in the jblanket.dir system property.


Constructor Detail
JBlanketReport
public JBlanketReport(boolean verbose, boolean excludeOneLineMethods, boolean excludeConstructors, boolean excludeIndividualMethods, String reportFormat, File toDir) throws JBlanketException(Code)
Constructs a new JBlanketReport object. This object will read in information stored in XML files totalFile, oneLineFile, and constructorFile and store information in the testedFile and untestedFile files in XML format.
Parameters:
  verbose - describes if JBlanket should execute in verbose mode.
Parameters:
  excludeOneLineMethods - describes if one-line methods should be excluded.
Parameters:
  excludeConstructors - describes if constructors should be excluded.
Parameters:
  excludeIndividualMethods - describes if individual methods should be excluded.
Parameters:
  reportFormat - format of HTML report.
Parameters:
  toDir - output directory of HTML report.
throws:
  JBlanketException - if cannot read from totalFile,oneLineFile, or constructorFile.




Method Detail
createReport
public String createReport() throws JBlanketException(Code)
Creates a report from the XML files.
throws:
  JBlanketException - if unable to create report. a summary of the report.



createTestedFile
protected void createTestedFile() throws JBlanketException(Code)
Creates an aggregate file containing all methods invoked during testing.
throws:
  JBlanketException - if no files found from testing, cannot read date from any'COVER-*' files, or cannot store test file.



createUntestedFile
protected void createUntestedFile() throws JBlanketException(Code)
Creates a file containing the methods that were not invoked during testing.

NOTE: Results are rounded to nearest percent while coverage in reports are rounded to the nearest half percent.
throws:
  JBlanketException - if cannot read from totalFile, set in constructor.




getReportCategories
protected Map getReportCategories()(Code)
Returns all the categories of methods collected. These categories are used as categories for the methods in the aggregate XML file. all the collected method categories.



main
public static void main(String args) throws JBlanketException(Code)
Provides the command line interface.
Parameters:
  args - the command line arguments.
throws:
  JBlanketException - if cannot read the date from files.



main
public static void main(List args) throws JBlanketException(Code)
Processes the command line arguments as a List.

Created for JBlanketReportTask Ant taskdef. This method grabs all of the output files from storeMethodTypeSignature method in csdl.jblanket.modifier.MethodCollector and combines the results into a format similar to JUnit.

The command line arguments are as follows:

 '-verbose' - describes if should execute in verbose mode
 '-reportFormat' - format of the HTML report, either 'frames' or 'noframes'
 '-toDir' - directory for HTML output
 '-excludeOneLineMethods' - describes if should exclude one-line methods
 '-excludeConstructors' - describes if should exclude constructors
 '-excludeIndividualMethods' - describes if should exclude individual methods
 '-totalFile' - name of the output XML file for total methods
 '-testedFile' - name of the output XML file to contain all methods that were tested
 '-untestedFile' - name of the output XML file to contain all methods that were not tested
 '-oneLineFile' - name of the output XML file for one-line methods
 '-constructorFile' - name of the output XML file for constructors
 '-excludedIndividualFile' - name of the output XML file for individually excluded methods
 

Parameters:
  args - the List of command line arguments.
throws:
  JBlanketException - if cannot read the date from files.



storeMethods
protected void storeMethods(MethodSet methodSet, File file) throws IOException(Code)
Stores all the method information from jblanketSet to fileName in the jblanket.dir system property.
Parameters:
  methodSet - the collection of method information to output.
Parameters:
  file - the output file.
throws:
  IOException - if cannot write to fileName.



Fields inherited from csdl.jblanket.JBlanket
protected MethodCategories categories(Code)(Java Doc)
protected MethodSet constructorSet(Code)(Java Doc)
protected boolean excludeConstructors(Code)(Java Doc)
protected boolean excludeIndividualMethods(Code)(Java Doc)
protected boolean excludeOneLineMethods(Code)(Java Doc)
protected static String jblanketDir(Code)(Java Doc)
protected MethodSet oneLineSet(Code)(Java Doc)
protected MethodSet totalSet(Code)(Java Doc)
protected MethodSet untestableSet(Code)(Java Doc)
protected boolean verbose(Code)(Java Doc)

Methods inherited from csdl.jblanket.JBlanket
abstract protected void storeMethods(MethodSet methodSet, File file) throws IOException(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.