Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package com.selgp.moladek.core.loggers;

Used to log in any format you want to.

The formatter is responsible for writing results.

Also the formatter is responsible for handling encodings right for whatever output storage is used.

Author(s):
guillem.hernandez
 
 interface ResultsFormatter {

  
Formats a comment.

Parameters:
logItem containing the comment to be logged.
 
   void logCommentEvent(LogItem logItem);
 
   void logSeparator();

  
Formats a command.

Parameters:
logItem containing all informations for logging a command
 
   void logCommandEvent(LogItem logItem);

  
Formats a special command, which output might be handled differently.

Parameters:
logItem containing all informations for logging a command
 
   void logSpecialCommandEvent(LogItem logItem);

  
Formats a command which has an boolean result.

Important: At this state no information whether a false or true result was or is expected by the test using this formatter. So a false result may be "green" for the test. Therefore all log-events here are logged as green. E.g. Selenium commands like isElementPresent

Parameters:
logItem containing all information for logging a command
 
   void logBooleanCommandEvent(LogItem logItem);

  
Formats a Log Event for a complete Test Method.

The Log Item may contain several child items holding the information of the single commands.

Parameters:
logItem containing all information for logging a test method and its commands
 
   void logMethodEvent(LogItem logItem);

  
Whatever the formatter wants to do before any command will be formatted.

Parameters:
metrics metrics gathered during test-run
 
   void logHeaderEvent(TestMetrics metrics);

  
Like formatHeader() but here after all commands have been formatted.
 
   void logFooterEvent();

  
Base URI to be linked to in the result.

Resources may be linked with an HTTP or similar prefix to be easier accessible in whatever reporting frontend is used later

Returns:
the current base-uri for attached resources
 
Set a special URI for resources.

Parameters:
resourceBaseUri the new uri for resources
 
   void setResourceBaseUri(String resourceBaseUri);

  
Path to the (filesystem-)location where resources should be saved.

Will be used by generateFilenameForResources()

Returns:
current location path
 
Path to the (filesystem-)location where resources should be saved.

Will be used by generateFilenameForResources()

Parameters:
resourcesPath location (only path) to where resources will be saved
  void setResourcesPath(String resourcesPath);
New to GrepCode? Check out our FAQ X