diff --git a/.gitignore b/.gitignore
index a0f016bc5823..e30cafa40f7f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,4 @@
 **/__pycache__
 .pytest_cache/
+.coverage
+htmlcov/
diff --git a/justfile b/justfile
index 41a9d3d236f4..1be3e01e7c7d 100644
--- a/justfile
+++ b/justfile
@@ -8,3 +8,11 @@ default:
 # (e.g. `just tests -k <expr>` or `just tests tests/unit`).
 tests *args:
     pytest {{args}}
+
+# Run the suite with a terminal branch-coverage report for wic.
+coverage *args:
+    pytest {{args}} --cov=wic --cov-branch --cov-report=term-missing
+
+# Run the suite with an HTML coverage report (written to htmlcov/).
+coverage-html *args:
+    pytest {{args}} --cov=wic --cov-branch --cov-report=term-missing --cov-report=html
diff --git a/pyproject.toml b/pyproject.toml
index e60c4fcc1595..2ad694b13358 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -24,6 +24,8 @@ Repository = "https://git.yoctoproject.org/wic"
 [project.optional-dependencies]
 tests = [
     "pytest >= 9.1.1",
+    "coverage >= 7.15.0",
+    "pytest-cov >= 7.1.0",
     "rust-just >= 1.55.1",
 ]
 
