NAME

Test::Harness::KS

SYNOPSIS

Runs given test files and generates clover, html and junit test reports to the given directory.

Automatically sorts given test files by directory and deduplicates them.

See

test-harness-ks --help

for commandline usage

USAGE

my $harness = Test::Harness->new($params);
$harness->run();

new

Creates a new Test runner

Configure log verbosity by initializing Log::Log4perl beforehand, otherwise the internal logging defaults to WARN

@params HashRef: {
         resultsDir => String, directory, must be writable. Where the test deliverables are brought
         tar        => Boolean
         cover      => Boolean
         junit      => Boolean
         testFiles  => ARRAYRef, list of files to test
         dryRun     => Boolean
         lib        => ARRAYRef or undef, list of extra include directories for the test files
       }

run

$harness->run();

Executes the configured test harness.

clearCoverDb

Empty previous coverage test results

createCoverReport

Create Cover coverage reports

tar

Create a tar.gz-package out of test deliverables

Package contains

testResults/cover/clover.xml
testResults/cover/coverage.html
testResults/cover/*
testResults/junit/*.xml

databaseDiff

Diffs two mysqldumps and finds changes to INSERT INTO queries. Collects names of the tables that have new INSERTs.

getTestResultFileAndDirectoryPaths @static

Injects paths to the given HASHRef.

Centers the relevant path calculation logic so the paths can be accessed from external tests as well.

parseOtherTests @static

Parses the given blob of file names and paths invoked from god-knows what ways of shell-magic. Tries to normalize them into something the Test::Harness::* can understand.

@param1 ARRAYRef of Strings, which might or might not contain separated textual lists of filepaths.
@returns ARRAYRef of Strings, Normalized test file paths

findfiles @static

Helper to the shell command 'find'

@param1 String, Dir to look from
@param2 String, selector used in the -name -parameter
@param3 Integer, -maxdepth, the depth of directories 'find' keeps looking into
@returns ARRAYRef of Strings, filepaths found