Scala CLI Integration Tests
Testing & Qualityscala-cli-integration-testsScala CLI Integration Tests is an Agent Skill for testing & quality published in the VirtusLab/scala-cli repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Add or run Scala CLI integration tests. Use when adding integration tests, debugging RunTests/CompileTests/etc., or working in modules/integration.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/VirtusLab/scala-cli/blob/HEAD/agentskills/integration-tests/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/scala-cli-integration-tests, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Integration tests (Scala CLI)
Location: modules/integration/. Tests invoke the CLI as an external process.
Run: ./mill -i integration.test.jvm (all). Filter: ./mill -i integration.test.jvm 'scala.cli.integration.RunTestsDefault.*' or by test name. Native: ./mill -i integration.test.native.
Structure: *TestDefinitions.scala (abstract, holds test logic) → *TestsDefault, *Tests213, etc. (concrete, Scala version trait). Traits: TestDefault, Test212, Test213, Test3Lts, Test3NextRc.
Adding a test:
- Open the right
*TestDefinitions(e.g.RunTestDefinitionsforrun). - Add
test("description") { … }usingTestInputs(os.rel / "Main.scala" -> "…").fromRoot { root => … }andos.proc(TestUtil.cli, "run", …).call(cwd = root). - Assert on stdout/stderr.
Helpers: TestInputs(...).fromRoot, TestUtil.cli. Test groups (CI): SCALA_CLI_IT_GROUP=1..5; see modules/integration/ for group mapping.