OpenParable
Skip to content
← Back to skills

Scala CLI Integration Tests

Testing & Quality
scala-cli-integration-tests

Scala 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.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
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:

  1. Open the right *TestDefinitions (e.g. RunTestDefinitions for run).
  2. Add test("description") { … } using TestInputs(os.rel / "Main.scala" -> "…").fromRoot { root => … } and os.proc(TestUtil.cli, "run", …).call(cwd = root).
  3. Assert on stdout/stderr.

Helpers: TestInputs(...).fromRoot, TestUtil.cli. Test groups (CI): SCALA_CLI_IT_GROUP=1..5; see modules/integration/ for group mapping.