Skip to content

Releases

v0.22.0

Choose a tag to compare

@github-actions github-actions released this 30 Nov 17:29
Immutable release. Only release title and notes can be modified.
d1bacf4

Changed

  • gleam run -m metamon/mutation -- run first runs each test function alone with the lines under src/ counted, split over the copies of the project, and records which tests reach which line. A mutant then runs the tests that reach its line in a fresh erl, fastest first, and stops at the first failure; the failing test runs once more alone, and the mutant is killed when it fails again. Otherwise the mutant runs gleam test as before, so a survivor or a timeout is still decided by the whole suite, and a survivor still has to pass it three times. On packkit with 4 workers, the 63 mutants of checksum.gleam took 1119 seconds instead of 2028, with the same 56 killed and 7 lived; making the map took 83 of those seconds.
  • On a terminal, run prints one mark per mutant (. killed, L lived, T timed out, x did not compile) and lists the survivors at the end. Elsewhere it still prints one line per mutant.

Install

gleam add metamon

See HexDocs for the API
reference.

v0.21.0

Choose a tag to compare

@github-actions github-actions released this 28 Nov 05:28
Immutable release. Only release title and notes can be modified.
0ca786e

Added

  • coverage --e2e COMMAND adds the lines that an end-to-end suite reaches. The package is compiled once with its lines counted, and the command runs with METAMON_COVERAGE_ESCRIPT set to an escript that runs the program from those modules; each run writes its counts before it exits.

Install

gleam add metamon

See HexDocs for the API
reference.

v0.20.1

Choose a tag to compare

@github-actions github-actions released this 28 Nov 04:06
Immutable release. Only release title and notes can be modified.
eb76f15

Fixed

  • gleam run -m metamon/mutation -- coverage builds the project with gleam build --target erlang before it measures. In a project that depends on metamon, gleam run -m metamon/mutation compiles only the dependencies, so in a fresh checkout 0.20.0 found none of the project's modules and stopped with no_module_measured.
  • The coverage run gives each test 500 seconds instead of 50. Code measured by cover runs several times slower, and a packkit test that passes gleam test timed out.

Install

gleam add metamon

See HexDocs for the API
reference.

v0.20.0

Choose a tag to compare

@github-actions github-actions released this 28 Nov 03:29
Immutable release. Only release title and notes can be modified.
0d8e81d

Added

  • gleam run -m metamon/mutation -- coverage runs the tests on the Erlang target with every module under src/ measured by Erlang's cover and writes the lines they reach to build/coverage/lcov.info, with the line numbers of the Gleam source. It needs Gleam 1.19 or later. octocov and other tools that read LCOV can report it.

Install

gleam add metamon

See HexDocs for the API
reference.

v0.19.1

Choose a tag to compare

@github-actions github-actions released this 27 Nov 22:15
Immutable release. Only release title and notes can be modified.
c5b987d

Fixed

  • gleam run -m metamon/mutation -- run compiles each copy with gleam build before gleam test, so the 256 MiB limit of 0.19.0 applies only to the test run. With the limit on the compiler as well, oaspec's run stopped before any mutant: the Erlang compiler needed more than 256 MiB for one of its modules.

Install

gleam add metamon

See HexDocs for the API
reference.

v0.19.0

Choose a tag to compare

@github-actions github-actions released this 27 Nov 14:07
Immutable release. Only release title and notes can be modified.
4f8c8ac

Added

  • gleam run -m metamon/mutation -- run --shard K/N runs part K of N of the mutants, and merge joins the results files of every part into build/mutation/results.json for gate and baseline. A long run can then be split over a CI matrix. The page on mutation testing shows a workflow.

Fixed

  • A process in a test run is killed when it grows past 256 MiB instead of 1 GiB. A mutant that made a function recurse without end grew its test run to 12 GB before the 1 GiB limit killed it, and two such runs at once stopped finanza's full run on a 16 GB runner. With 256 MiB the same run peaks at 3.5 GB. The test suites of 14 packages that use metamon pass with the new limit.

Install

gleam add metamon

See HexDocs for the API
reference.

v0.18.0

Choose a tag to compare

@github-actions github-actions released this 27 Nov 12:16
Immutable release. Only release title and notes can be modified.
07e2215

Fixed

  • gleam run -m metamon/mutation -- run no longer runs a CI runner out of memory. Mutants that made a test allocate without end filled the 16 GB of a GitHub-hosted runner within 30 seconds, and the job was stopped (exit code 143 after a mutant was reported as TIMED_OUT, or "The hosted runner lost communication with the server"). A process in a test run that grows past 1 GiB is now killed, and the mutant counts as killed. Only the first and the last 64 KiB of a test run's output are kept.

Install

gleam add metamon

See HexDocs for the API
reference.

v0.17.0

Choose a tag to compare

@github-actions github-actions released this 27 Nov 08:16
Immutable release. Only release title and notes can be modified.
bb1dfa1

Fixed

  • gleam run -m metamon/mutation -- run stops with an error when it cannot write a mutated module into a copy of the project or restore it. It used to go on, and the later mutants of that copy ran against the wrong source.

Install

gleam add metamon

See HexDocs for the API
reference.

v0.16.0

Choose a tag to compare

@github-actions github-actions released this 27 Nov 07:34
Immutable release. Only release title and notes can be modified.
06a26fc

Added

  • gleam run -m metamon/mutation runs mutation testing on the Erlang target. It changes one operator, ! or boolean literal at a time, runs gleam test in parallel copies of the project, records the survivors of a full run as a baseline and fails a run that has a survivor the baseline does not list. It was written for qrkit and moved here so the other packages can use it. metamon now depends on glance.

Install

gleam add metamon

See HexDocs for the API
reference.

v0.15.0

Choose a tag to compare

@github-actions github-actions released this 23 Nov 08:24
698d4c5

Changed

  • A failing edge value shrinks like a random input. The built-in edge values of every generator carry their shrink trees, so int(range(from: 0, to: 100)) with assert n < 50 reports 50 instead of the edge 100. Values added with with_examples are still reported as they are.
  • float(from:, to:) draws 53-bit fractions instead of one of a million steps, and shrinks toward 0.0 (or the lower bound) and whole numbers instead of toward the bounds, so assert x <. 500.0 reports 500.0 instead of 1000.0.
  • character(of: Unicode) shrinks toward U+0000 across the whole set; a value above the surrogates used to shrink only to U+E000. bool() shrinks True to False, and option_of shrinks Some(x) to None before shrinking x.
  • Sizes grow from 0 on the first random input, after the edge values. With the 16 default edge values the first random input used to get size 16.
  • Regression entries are replayed only when the generator reproduces the recorded input, so plain forall properties can share a regression file, and entries recorded by an older generator are skipped instead of replaying a different input.
  • Config.seed: Some(-n) and Some(n + 2^32) no longer give the same inputs as Some(n).
  • A fixed seed gives other inputs than in 0.14.0 for float, for int ranges wider than 65,536 values, and for sized generators that have edge values. Regression entries recorded with 0.14.0 that no longer reproduce are skipped.

Fixed

  • int ranges wider than 2^32 values cover the whole range. range(from: 0, to: 1_000_000_000_000) stayed below 4,294,967,296, and the safe-integer range produced no positive value. Ranges wider than 2^53 values stay exact on JavaScript within the safe integers. Ranges wider than 65,536 values are no longer biased toward their lower part.
  • float(from: -1.7e308, to: 1.7e308) no longer crashes on Erlang with badarith (or overflows to Infinity on JavaScript).
  • approximately no longer raises badarith on Erlang when the difference of the two floats is beyond the largest float, and holds for equal infinities.
  • permutation_of runs in linear time.
  • Regression files escape backslashes as TOML requires, so a recorded input that contains a backslash, such as a string, reads back unchanged.

Install

gleam add metamon

See HexDocs for the API
reference.