Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Kotlin mutation testing

Open
#6 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 3 days

@aminHZDEV is already working on this.

Since Oct 26, 2026.

  • #5 by @aminHZDEV — open

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Stale
Tech stack
kotlin, python
Domain
testing, tooling

Research direction

Start with runner.py, coverage.py, sites.py, and functions.py, then compare their Java handling with the Kotlin grammar and the Gradle JaCoCo report described in the issue. Check the existing tests for build plans, coverage parsing, mutation sites, and visibility. Done means Kotlin uses the Java build plan, JaCoCo coverage is read, the listed Kotlin operators and visibility rules are handled, and the baseline test command succeeds.

Written by the indexing model from the issue text.

Description

With crapper's Kotlin reader (unclebob/crapper#4, PR #5) next to mutator, mutator already finds Kotlin functions. Three things stop it from testing them. Measured with the Gradle branch (#3, PR #4) and crapper's Kotlin branch, on a small Kotlin 2.0.21 / Gradle project.

1. No operator mutants

The same class in Java and in Kotlin, --scan:

Sites Kinds
Java 22 0 -> 1, 1 -> 0, >, <, >=, <=, ==, !=, &&, delete !, delete -
Kotlin 9 0 -> 1, 1 -> 0 only

sites.py finds operators through _BINARY_PARENTS and _UNARY_PARENTS. Kotlin's grammar uses comparison_expression, equality_expression, conjunction_expression, disjunction_expression, additive_expression, multiplicative_expression and prefix_expression, so none match.

2. Coverage is not read

Total  0 killed  0 survived  9 uncovered

The Gradle JaCoCo report lists Calc.kt with covered lines, but covered_lines reads JaCoCo only for language == "java". Kotlin falls through to LCOV and finds nothing.

3. No test command

Baseline failed for src/main/kotlin/demo/Calc.kt: false

_PLANS in runner.py has no "kotlin", and the fallback is ["false"].

Proposed

  1. runner.py: "kotlin" uses the Java plan (Gradle, or Maven when the nearest build file is pom.xml).
  2. coverage.py: JaCoCo for "kotlin" as for "java".
  3. sites.py: the Kotlin expression types, then Kotlin's own operators: is/!is, in/!in, ../..<, until, ?:. ?. and !! are not valid mutants on a nullable value.
  4. functions.py is_private: private; internal stays public.
Dominant language
Python
Stars
55
Forks
7
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from unclebob/mutator

All issues in unclebob/mutator

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.