Skip to content
arypurnomoz edited this page Apr 18, 2014 · 1 revision

To use your custom reporter just add this line to your testConfig.jl

reporter = "path/to/custom/reporter"

Creating Custom Reporter File

A reporter file is, a file that has these function signature:

  • report(desc::Description)
    • Will be called every time a describe finished running
  • passReport(test::Test, elapsed::Int)
    • Will be executed every time a it run without any error
  • failedReport(err::Error)
    • Will be executed every time an error is thrown in the it function
  • failedReport(err::DescriptionError)
    • Will be executed every time an error is thronw when running describe function
  • summaryReport(passes::Array{Test,1},errors::Array{Union(Error,DescriptionError),1}, timeElapsed::Int)
    • Will be called after all test has been executed

Type Definition

type Description
  name::String
  fn::Function
  depth::Int
  children
end

type Test
  name::String
  desc::Description
  fn::Function
  iit::Bool
end

type Error
  test::Test
  err
  trace
end

type DescriptionError
  desc::Description
  err
  trace
end
Clone this wiki locally