public interface ICCImporter
Represents an importer of Code Coverage results Known implementations of this interface
  1. CompiledCCImporter - accepts a path that can be
    • a single zip file that contains a complete result directory
    • a result directory that contains the result files, specifically the .clcoveragedata and .componentMap files
    • a directory that contains 1 or more zipped results
    • a directory that contains 1 or more result directories
    • a directory that contains a mix of zipped results or result directories
  2. Java Importer - accepts a path that can be
    • a result directory that contains the result files, specifically the .coveragedata and .metadata files
    • a file that has the .coveragedata or .metadata extension
  3. CC result Importer - accepts a path that can be
    • a single zip file with the file extension .ccresult
    • a result directory that contains 1 or more zip files with the file extension .ccresult
Since:
3.1
  • Field Details

    • EMPTYIMPORTS

      static final ICCImportInput[] EMPTYIMPORTS
      Since:
      4.0
  • Method Details

    • getName

      String getName()
      Returns the name of the importer
      Returns:
      importer name
    • getFileFilter

      FileFilter getFileFilter()
      Return a file filter that can be used to obtain a list of valid items in a directory The filter should return results by treating the directory as a container for 1 or more results. These can be result directories or zipped results the caller will use this filter when processing a directory where a single result was not found This returned list from this filter will be passed to the getImportInput(String) to determine if there are valid results
      Returns:
      filter that will return only artifacts that are of interest to this importer
      Since:
      4.0
    • getImportInput

      ICCImportInput[] getImportInput(String importPath)
      Given the path the importer should determine if this path (can be a file) contains information that the importer can process. If the path does not contain valid data then return null or return an instance with ICCImportInput.isValidForImport() set to false if error messages should be returned. If the path contains valid data then return an instance of ICCImportInput This call is meant to be lightweight and quick, just enough to determine if the path contains artifacts that can be imported. No actual processing should be done. The ICCImportInput allows for the storage of artifacts found during the discovery so that they don't have to be rediscovered The implementation is not meant to do a deep or recursive scan, for a - directory : treat the directory as containing a single result - file : in most cases this should be the main data file containing CC results - zip : a single result that has been zipped up, it can include other artifacts but still represents a single result Where results are grouped this method will be called on each directory of file by the caller. It is not intended for this method to process multiple results
      Parameters:
      importPath - path that this importer should scan for possible artifacts that can be imported
      Returns:
      array of ICCImportInput that contains the required files to import or an empty array EMPTYIMPORTS if nothing valid is found
      Since:
      4.0
    • importResults

      int importResults(ICCImportResult result, ICCImportInput importInput, boolean logging) throws CCModifierException, CCImportException
      If the call to getImportInput(String) returns an instance of ICCImportInput and ICCImportInput.isValidForImport() returns true then this method is called to do the actual import.
      Parameters:
      result - the importer should add content to this result during the processing of the import content
      importInput - an instance of ICCImportInput that was returned by this importer during the discovery phase.
      logging - if true then importer should log detailed information
      Returns:
      number of testcases processed. testcases typically contain hit information. Valid values include zero when a baseline result has been processed with no hit information
      Throws:
      CCImportException - if there was a problem during import
      CCModifierException - if there was a problem during modification
      Since:
      4.0
    • dispose

      void dispose()
      Called to do cleanup (e.g. close files) after call to getImportInput(String) or importResults(ICCImportResult, ICCImportInput, boolean)