MutationTest class
This is the primary interface for the mutation testing.
To do a test run, create an instance of this class, then call the method runMutationTest().
Constructors
-
MutationTest(List<
String> inputs, String outputPath, bool verbose, bool dry, ReportFormat format, {List<String> ? ruleFiles, bool builtinRules = true, bool quiet = false, PlatformFactory? platform, String? coverage, bool excludeStrings = false}) -
Runs the mutation tests using the inputs from
inputs
. Undetected modifications are written to a file inoutputPath
using the specifiedformat
.
Properties
- bar ↔ AppProgressBar
-
The progress bar printed to the command line.
getter/setter pair
- builtinRules ↔ bool
-
If the builtin rules should be loaded.
getter/setter pair
- coverageData ↔ ProjectLineCoverage
-
getter/setter pair
- dry ↔ bool
-
Performs a dry run - no actual mutations are applied and no test commands are run.
getter/setter pair
- excludeStrings ↔ bool
-
If strings should be excluded.
getter/setter pair
- format ↔ ReportFormat
-
The format in which reports are generated.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
-
inputs
↔ List<
String> -
The list of input files.
getter/setter pair
- outputPath ↔ String
-
The path where the reports are generated if the report format is not none.
getter/setter pair
- platformFactory ↔ PlatformFactory
-
Factory creating other objects
getter/setter pair
- quiet ↔ bool
-
If any messages should be printed to the command line.
getter/setter pair
- reporter ↔ ReportData
-
The results of the test run
getter/setter pair
-
ruleFiles
↔ List<
String> ? -
The list of rule files to load.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- system ↔ SystemInteractions
-
Abstraction for the system.
getter/setter pair
- total → int
-
Gets the number of total mutations found.
You must call count() or runMutationTest() first.
no setter
- verbose ↔ bool
-
If the test runner should print many messages to the command line.
getter/setter pair
Methods
-
abortMutationTest(
) → void - Aborts the tests and restores the original state of the source code.
-
checkTests(
Configuration cfg, TestRunner executor) → Future< void> -
Checks if the tests in
cfg
can be run by the test runnerexecutor
on the unmodified sources. -
count(
) → Future< int> - Counts all mutations done by all input files
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
runMutationTest(
) → Future< bool> - Performs the mutation tests asynchronously. The test run uses the options given during construction.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited