MuCheck- Automated Mutation Testing

Safe HaskellNone



The Interpreter module is responible for invoking the Hint interpreter to evaluate mutants.



evaluateMutants Source


:: (Summarizable a, Show a) 
=> (Mutant -> TestStr -> InterpreterOutput a -> Summary)

The summary function

-> [Mutant]

The mutants to be evaluated

-> [TestStr]

The tests to be used by mutation analysis

-> IO (MAnalysisSummary, [MutantSummary])

Returns a tuple of full run summary and individual mutant summary

Given the list of tests suites to check, run the test suite on mutants.

evalMethod Source


:: (MonadInterpreter m, Typeable t) 
=> String

The mutant _file_ to load

-> TestStr

The test to be run

-> m t

Returns the monadic computation to be run by I.runInterpreter

Given the filename, modulename, test to evaluate, evaluate, and return result as a pair.

t = I.runInterpreter (evalMethod
       "quickCheckResult idEmp")

evalMutant Source


:: (Typeable t, Summarizable t) 
=> [TestStr]

The tests to be used

-> Mutant

Mutant being tested

-> IO [InterpreterOutput t]

Returns the result of test runs

Run all tests on a mutant

evalTest Source


:: (Typeable a, Summarizable a) 
=> String

The mutant _file_ that we have to evaluate (_not_ the content)

-> String

The file where we will write the stdout and stderr during the run.

-> TestStr

The test to be run

-> IO (InterpreterOutput a)

Returns the output of given test run

Run one single test on a mutant

summarizeResults Source


:: Summarizable a 
=> (Mutant -> TestStr -> InterpreterOutput a -> Summary)

The summary function

-> [TestStr]

Tests we used to run analysis

-> (Mutant, [InterpreterOutput a])

The mutant and its corresponding output of test runs.

-> MutantSummary

Returns a summary of the run for the mutant

The summarizeResults function evaluates the results of a test run using the supplied isSuccess and testSummaryFn functions from the adapters

data MutantSummary Source

Data type to hold results of a single test execution


MSumError Mutant String [Summary]

Capture the error if one occured

MSumAlive Mutant [Summary]

The mutant was alive

MSumKilled Mutant [Summary]

The mutant was kileld

MSumOther Mutant [Summary]

Undetermined - we will treat it as killed as it is not a success.