You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add --mode and --operators flags to mutator and testing tool (#116)
* feat: add `--mode` and `--operators` flags to mutation testing tools (#115)
* fix: realign operators in the different --mode and add new ones (#117)
* fix: clippy errors
* fix: assert macro treated as an operator
* fix: failing ci
Copy file name to clipboardExpand all lines: move-mutation-test/README.md
+36Lines changed: 36 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -161,5 +161,41 @@ If the user wants to mutate only the `sum` function in the `Sum` module, the use
161
161
RUST_LOG=info ./target/release/move-mutation-test run --package-dir move-mutator/tests/move-assets/simple --output report.txt --move-2 --mutate-functions sum --mutate-modules Sum
162
162
./target/release/move-mutation-test display-report coverage --path-to-report report.txt --modules Sum
To optimize mutation testing by selecting operators based on their ability to [detect test coverage gaps](../move-mutator/doc/design.md#operator-effectiveness-analysis), use the `--mode` option. Operators that produce more surviving mutants are more effective at revealing gaps in test coverage, as surviving mutants indicate untested code paths.
166
+
167
+
```bash
168
+
# Light mode - operators optimized for detecting test gaps with fewest mutants
169
+
RUST_LOG=info ./target/release/move-mutation-test run --package-dir move-mutator/tests/move-assets/simple --output report.txt --mode light
170
+
171
+
# Medium mode - light + additional operators for broader test gap detection
172
+
RUST_LOG=info ./target/release/move-mutation-test run --package-dir move-mutator/tests/move-assets/simple --output report.txt --mode medium
173
+
174
+
# Medium-only mode - only the operator added in medium (not including light)
175
+
RUST_LOG=info ./target/release/move-mutation-test run --package-dir move-mutator/tests/move-assets/simple --output report.txt --mode medium-only
176
+
177
+
# Heavy mode - default, all operators for maximum test gap detection
178
+
RUST_LOG=info ./target/release/move-mutation-test run --package-dir move-mutator/tests/move-assets/simple --output report.txt --mode heavy
179
+
180
+
# Heavy-only mode - only the operators added in heavy (not including light/medium)
181
+
RUST_LOG=info ./target/release/move-mutation-test run --package-dir move-mutator/tests/move-assets/simple --output report.txt --mode heavy-only
Copy file name to clipboardExpand all lines: move-mutator/README.md
+39Lines changed: 39 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -107,3 +107,42 @@ directory. They can be used to check the mutator tool as well.
107
107
To check possible options, use the `--help` option.
108
108
109
109
[nextest]: https://github.com/nextest-rs/nextest
110
+
111
+
### Operator modes
112
+
113
+
The mutator tool supports different operator modes to control which mutation operators are applied. Modes are designed to balance speed and the ability to detect test gaps. Operators that produce more surviving mutants are more effective at revealing gaps in test coverage, as surviving mutants indicate untested code paths.
114
+
115
+
Use the `--mode` option to select a predefined operator set:
116
+
```bash
117
+
# Light mode: operators optimized for detecting test gaps with fewest mutants
The operator modes are based on [effectiveness analysis](doc/design.md#operator-effectiveness-analysis) where effectiveness measures the ability to detect test coverage gaps:
0 commit comments