Class CloverLogTask

java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.openclover.ant.tasks.AbstractCloverTask
org.openclover.ant.tasks.CloverLogTask
All Implemented Interfaces:
Cloneable

public class CloverLogTask extends AbstractCloverTask
Clover Ant task to print the coverage to the Ant log or Ant property.
   <clover-log
       initstring="/path/to/clover.db"
       level="summary|class|method|statement"
       filter="constructor,assert"
       span="30d"
       codeType="APPLICATION|TEST|ALL"
       outputProperty="my.clover.log.output"
       showUnitTests="true|false"
   >
       <fileset></fileset>
       <package name="com.foo"/>
       <sourcepath><sourcepath/>
       <testSources><testSources/>
   </clover-log>
 
See also ant--clover-log.html
Since:
Clover 1.1
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Enumerated Attribute to control the logging level
    static class 
    Inner class to gather the packages to be logged.
  • Field Summary

    Fields inherited from class org.openclover.ant.tasks.AbstractCloverTask

    config, debug

    Fields inherited from class org.apache.tools.ant.Task

    target, taskName, taskType, wrapper

    Fields inherited from class org.apache.tools.ant.ProjectComponent

    description, location, project
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addFileset(org.apache.tools.ant.types.FileSet fs)
     
    void
     
    void
    addSourcepath(org.apache.tools.ant.types.Path path)
    Adds a path to sourcepath.
    void
    addTestSources(org.apache.tools.ant.types.FileSet fileset)
     
    void
    Print the coverage information to the Ant log
    void
    setCodeType(String codeTypeAsString)
     
    void
    setFilter(String filterSpec)
    set the filter which controls which items are included in the log report.
    void
    Set the report detail level.
    void
    setOutputProperty(String outputProperty)
     
    void
    setShowUnitTests(boolean show)
    Sets whether to show unit test summary (total number of tests, number of tests run, number of passed / failed / error)
    void
    setSpan(org.openclover.core.cfg.Interval span)
     

    Methods inherited from class org.openclover.ant.tasks.AbstractCloverTask

    execute, getInitString, init, resolveInitString, setDebug, setInitString, setTmpDir, validate

    Methods inherited from class org.apache.tools.ant.Task

    bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType

    Methods inherited from class org.apache.tools.ant.ProjectComponent

    clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CloverLogTask

      public CloverLogTask()
  • Method Details

    • addFileset

      public void addFileset(org.apache.tools.ant.types.FileSet fs)
    • addPackage

      public void addPackage(CloverLogTask.Package packageInfo)
    • addSourcepath

      public void addSourcepath(org.apache.tools.ant.types.Path path)
      Adds a path to sourcepath.
    • addTestSources

      public void addTestSources(org.apache.tools.ant.types.FileSet fileset)
    • setCodeType

      public void setCodeType(String codeTypeAsString)
    • setFilter

      public void setFilter(String filterSpec)
      set the filter which controls which items are included in the log report.
      Parameters:
      filterSpec - a comma separated set of values denoting the items to include in the report.
    • setLevel

      public void setLevel(CloverLogTask.Level level)
      Set the report detail level.
      Parameters:
      level - the report level
    • setOutputProperty

      public void setOutputProperty(String outputProperty)
    • setShowUnitTests

      public void setShowUnitTests(boolean show)
      Sets whether to show unit test summary (total number of tests, number of tests run, number of passed / failed / error)
    • setSpan

      public void setSpan(org.openclover.core.cfg.Interval span)
    • cloverExecute

      public void cloverExecute()
      Print the coverage information to the Ant log
      Specified by:
      cloverExecute in class AbstractCloverTask