MuCheck-0.1.2.2: Automated Mutation Testing

Safe HaskellNone
LanguageHaskell2010

MuCheck.Interpreter

Synopsis

Documentation

checkQuickCheckOnMutants :: [String] -> String -> [String] -> String -> IO [Result] Source

run quickcheck test suite on mutants >>> numMutants <- genMutants "qsort" "Examples/QuickCheckTest.hs" >>> checkQuickCheckOnMutants (take numMutants $ genFileNames -- "ExamplesQuickCheckTest.hs") Examples.QuickCheckTest ["quickCheckResult idEmpProp", "quickCheckResult revProp", "quickCheckResult modelProp"] ".quickcheck.log"

checkHUnitOnMutants :: [String] -> String -> [String] -> String -> IO [Counts] Source

run hunit test suite on mutants >>> numMutants <- genMutants "qsort" "Examples/HUnitTest.hs" >>> checkHUnitOnMutants (take numMutants $ genFileNames "ExamplesHUnitTest.hs") Examples.HUnitTest ["runTestTT tests"] ".hunit.log"

checkHspecOnMutants :: [String] -> String -> [String] -> String -> IO [Summary] Source

run hspec test suite on mutants >>> numMutants <- genMutants "qsort" "Examples/HspecTest.hs" >>> checkHspecOnMutants (take numMutants $ genFileNames "ExamplesHspecTest.hs") Examples.HspecTest ["spec (with "qsort1")"] ".hspec.log"

mutantCheckSummary :: (Summarizable a, Show a) => [String] -> String -> [String] -> FilePath -> IO [a] Source

Given the list of tests suites to check, run one test suite at a time on all mutants.

runCodeOnMutants :: Typeable * t => [[Char]] -> [Char] -> [Char] -> IO [Either InterpreterError (String, t)] Source

Run one test suite on all mutants >>> t = runInterpreter (evalMethod "Examples/QuickCheckTest.hs" Examples.QuickCheckTest "quickCheckResult idEmp")

evalMethod :: (MonadInterpreter m, Typeable t) => String -> String -> String -> m (String, t) Source

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

data TSSum Source

Datatype to hold results of the entire run

multipleCheckSummary :: (Show b1, Show b, Ord b1) => ((b1, b) -> Bool) -> [[Either a (b1, b)]] -> TSSum Source

Summarize the entire run