You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 3
Next »
Pekko (and its modules) use the sbt build tool to not only build the tool but to also run tests. Its also strongly recommended to read the general sbt testing docs to familiarise yourself on how sbt testing works however this document also provides tips/cheat sheet on how to generally test Pekko and its various modules.
Use testQuick
sbt has a task called testQuick
which works the same as test
however running it multiple times will only run the tests that happened to fail last.
Firstly make sure to start sbt
in shell mode by just running sbt
<@incubator-pekko>-<⎇ main>-<*>-> sbt
[info] welcome to sbt 1.9.1 (Homebrew Java 11.0.19)
[info] loading global plugins from /Users/mdedetrich/.sbt/1.0/plugins
[info] loading settings for project incubator-pekko-build-build-build from metals.sbt ...
[info] loading project definition from /Users/mdedetrich/github/incubator-pekko/project/project/project
[info] loading settings for project incubator-pekko-build-build from metals.sbt ...
[info] loading project definition from /Users/mdedetrich/github/incubator-pekko/project/project
[success] Generated .bloop/incubator-pekko-build-build.json
[success] Total time: 0 s, completed 6 Jul 2023, 11:10:25
[info] loading settings for project incubator-pekko-build from metals.sbt,plugins.sbt ...
[info] loading project definition from /Users/mdedetrich/github/incubator-pekko/project
[success] Generated .bloop/incubator-pekko-build.json
[info] compiling 38 Scala sources to /Users/mdedetrich/github/incubator-pekko/project/target/scala-2.12/sbt-1.0/classes ...
[warn] one feature warning; re-run with -feature for details
[warn] one warning found
[success] Total time: 8 s, completed 6 Jul 2023, 11:10:35
[info] loading settings for project pekko from build.sbt ...
[info] resolving key references (65133 settings) ...
[info]
[info] ________ ______ ______
[info] ___ __ \_______ /____ /_______
[info] __ /_/ / _ \_ //_/_ //_/ __ \
[info] _ ____// __/ ,< _ ,< / /_/ /
[info] /_/ \___//_/|_| /_/|_| \____/ 1.0.0-RC3+12-88bf6329-SNAPSHOT
[info]
[info] Useful sbt tasks:
[info] > compile - Compile the current project
[info] > test - Run all the tests
[info] > testOnly *.AnySpec - Only run a selected test
[info] > publishLocal - Publish current snapshot version to local ~/.ivy2 repo
[info] > verifyCodeStyle - Verify code style
[info] > applyCodeStyle - Apply code style
[info] > sortImports - Sort the imports
[info] > mimaReportBinaryIssues - Check binary issues
[info] > validatePullRequest - Validate pull request
[info] > docs/paradox - Build documentation
[info] > docs/paradoxBrowse - Browse the generated documentation
[info] > tips: - prefix commands with `+` to run against cross Scala versions.
[info] > Contributing guide: - https://github.com/apache/incubator-pekko/blob/main/CONTRIBUTING.md
[info] sbt server started at local:///Users/mdedetrich/.sbt/1.0/server/62a7cea246d563e33631/sock
[info] started sbt server
pekko >
Then once in the shell just run testQuick
. You should see that the tests are now running,