classafFancordion::FancordionRunner

sys::Obj
  afFancordion::FancordionRunner

Runs Fancordion fixtures.

commands

Source

Obj:Command commands := [Obj:Command][:]

The commands made available to Fancordion tests.

The key may either be a Str (that matches the URI scheme) or an immutable func of |Str cmdUrl->Bool|.

cur

Source

static FancordionRunner? cur()

Returns the current FancordionRunner in use, or null if no tests are running.

errorPage

Source

virtual Str errorPage(FixtureMeta fixMeta, Err err)

Rendered when a Fixture fails for an unknown reason - usually due to an error in the skin.

By default this just renders the stack trace.

finalReport

Source

virtual Str finalReport(Type:FixtureResult resultsCache)

Creates a pretty report to be printed after the last fixture has been run.

fixtureSetup

Source

virtual Void fixtureSetup(Obj fixtureInstance)

Called before every fixture.

By default does nothing.

fixtureTearDown

Source

virtual Void fixtureTearDown(Obj fixtureInstance, FixtureResult result)

Called after every fixture.

By default prints the location of the result file.

gimmeSomeSkin

Source

|->FancordionSkin gimmeSomeSkin := |->FancordionSkin| { ... }

A hook that creates an FancordionSkin instance.

Simply returns skinType.make() by default.

make

Source

new make()

Creates a FancordionRunner.

outputDir

Source

File outputDir := Env.cur().tempDir() + `fancordion/`

Where the generated HTML result files are saved.

runFixture

Source

FixtureResult runFixture(Obj fixtureInstance)

Runs the given Fancordion fixture.

sectionFuncs

Source

|Str,Int->Bool[] sectionFuncs := |Str,Int->Bool|[,]

Section functions determine which headings correspond to sections and should be wrapped in a special border. The default function checks if the heading starts with the word Example:

runner.sectionFuncs.add(
    |Str heading, Int level->Bool| {
        heading.lower.startsWith("example") 
    }
)
skinType

Source

Type skinType := afFancordion::ClassicSkin#

The skin applied to generated HTML result files.

Defaults to ClassicSkin.

suiteSetup

Source

virtual Void suiteSetup()

Called before the first fixture is run.

By default this empties the output dir.

suiteTearDown

Source

virtual Void suiteTearDown(Type:FixtureResult resultsCache)

Called after the last fixture has run.

Writes an index.html file that redirects to the first Fixture run.

Logs the final report.