Skip to content

Julia Test ItemsA modern testing framework for Julia

Write standalone test items, run them anywhere — VS Code, REPL, command line, or CI.

VS Code with test items, inline results, and code coverage

Rich VS Code Integration

Discover test items automatically as you type. Run them individually with a click and see results inline — failed assertions show expected vs. actual values right in the editor. Line-level code coverage highlights which code paths your tests exercise.

VS Code showing test explorer, inline test failure diffs, and line-level code coverage annotations

A Real Command Line Runner

The juliati command finds every test item under a folder and runs them in parallel test processes — no editor and no runtests.jl required. Filter by name or tag, measure coverage, and write machine-readable results for CI. (Prerelease)

$ juliati
  Discovered 24 test item run(s) in 3 file(s)
  Launching test processes....
  Progress: 24/24 (23 passed, 1 failed)

24 tests ran, 23 passed, 1 failed.

Interactive REPL Mode

DevREPL.jl adds a dev> mode to the Julia REPL. Pick test items from a fuzzy list, rerun just the failures, and browse them interactively — all without leaving the terminal. (Prerelease)

julia> )

dev> test results
Run #2: 184 test(s) (60.6 s) — 183 passed, 1 failed

  [FAIL] get_name (1388.9ms)
    Test Failed at test/test_interface.jl:68
      Expression: valof(get_name(parse("struct T end"))) == "F"
       Evaluated: "T" == "F"

dev> test failed

Batteries-Included CI

A single reusable workflow gives you linting, format checking, testing across a full Julia version and platform matrix, coverage upload, a rich job summary, documentation deployment, and TagBot — all configured in one YAML file. Prefer to build your own pipeline? Each step is also a standalone action.

GitHub Actions workflow showing lint, test matrix, report results, and automation stages

Test Items for AI Agents

JuliaMCP.jl is an MCP server that hands coding agents a live Julia environment. An agent can run a subset of test items, read the structured failures, lint a file, and evaluate code in a persistent session — instead of shelling out to julia and scraping stdout. (Prerelease)

json
{
  "mcpServers": {
    "julia": {
      "command": "juliamcp"
    }
  }
}

Simple to Write

Define independent test items anywhere in your package. Each one is self-contained and runnable on its own.

julia
@testitem "CSV parsing" tags=[:parser] begin
    data = parsecsv("name,age\nAlice,30\nBob,25")

    @test length(data) == 2
    @test data[1].name == "Alice"
    @test data[2].age == 25
end

The Test Item Ecosystem

  • TestItems.jl — The core @testitem, @testmodule, and @testsnippet macros.
  • Julia VS Code Extension — Rich editor integration with inline results, debugging, and coverage.
  • TestItemApp.jl — The juliati command line runner. (Prerelease)guide
  • DevREPL.jl — The dev> REPL mode, with a test item picker and failure browser. (Prerelease)guide
  • JuliaMCP.jl — MCP server giving AI coding agents a live Julia environment. (Prerelease)guide
  • testitem-workflow — Reusable GitHub Workflow for CI with version matrix support — guide
  • GitHub Actions — The individual actions the workflow is built from, usable on their own.
  • TestItemRunner.jl — Runs test items under Pkg.test, for compatibility with the traditional workflow. — guide

Under the hood, discovery is powered by JuliaWorkspaces.jl and TestItemDetection.jl, and execution by TestItemControllers.jl — the same engines every surface above shares. TestItemRuns.jl packages them into one Julia API for building your own tools; see Integrating.

Released under the MIT License.