This guide explains how to run both the Scala unit tests (via sbt) and the Python integration tests for the sparkMeasure project.
To execute the built-in unit tests for the core sparkMeasure Scala codebase:
sbt testThis will compile the project and run all tests defined under src/test/scala/.
From the root of the repository:
python3 -m venv ~/venv/sparkmeasure
source ~/venv/sparkmeasure/bin/activatepip install -r python/requirements.txtPython tests require the JAR built from the Scala code:
sbt packageThis generates the JAR in target/scala-2.12/ or target/scala-2.13/.
pytest python/sparkmeasure -vvv -s-
Ensure the JAR is up-to-date and present in the expected
target/scala-*/directory. -
Python tests require a working Spark installation (
SPARK_HOMEmay need to be set). -
Scala and Python tests are independent; run both for full validation.
-
Test sources:
- Scala:
src/test/scala/ - Python:
python/sparkmeasure/test_*.py
- Scala: