Reporters

public final class Reporters

Created with IntelliJ IDEA. User: nikolavp Date: 10/02/14 Time: 15:10 To change this template use File | Settings | File Templates.

Methods

console

public static Reporter console()

Creates a simple reporter that will print/report approvals to the console. This reporter will use convenient command line tools under the hood to only report the changes in finds. This is perfect for batch modes or when you run your build in a CI server

Returns:a reporter that uses console unix tools under the hood

fileLauncher

public static Reporter fileLauncher()

A reporter that launches the file under test. This is useful if you for example are generating an spreadsheet and want to verify it.

Returns:a reporter that launches the file

firstWorking

public static Reporter firstWorking(Reporter... others)

Get a reporter that will use the first working reporter as per com.nikolavp.approval.Reporter.canApprove for the reporting.

Parameters:
  • others – an array/list of reporters that will be used
Returns:

the newly created composite reporter

gedit

public static Reporter gedit()

Creates a reporter that uses gedit under the hood for approving.

Returns:a reporter that uses gedit under the hood

gvim

public static Reporter gvim()

Creates a convenient gvim reporter. This one will use gvimdiff for difference detection and gvim for approving new files. The proper way to exit vim and not approve the new changes is with ”:cq” - just have that in mind!

Returns:a reporter that uses vim under the hood

imageMagick

public static Reporter imageMagick()

A reporter that compares images. Currently this uses imagemagick for comparison. If you only want to view the new image on first approval and when there is a difference, then you better use the fileLauncher() reporter which will do this for you.

Returns:the reporter that uses ImagemMagick for comparison