Atlas helps Julia developers in 2026 add real unit tests to modules lacking them by leveraging the `Pkg.test (Test.jl)` runner and respecting existing `Project.toml` conventions, ensuring new tests integrate direct into your Julia package workflow. It reads your module, copies existing test patterns, writes new specifications, and then executes them with the `bash` tool.
How Atlas identifies untested Julia code for unit testing
Atlas identifies untested Julia code by using its `lsp` tool to enumerate exported symbols from a target module, ensuring no public function is missed. This process, crucial for comprehensive test coverage in 2026, leverages tree-sitter for precise AST declarations, not blind line windows.
To begin writing unit tests, Atlas first needs to understand the structure and public interface of your Julia module. It accomplishes this by employing its `lsp` tool, which performs a `documentSymbol` operation. This operation allows Atlas to read the module under test and enumerate all its exported methods and dispatch signatures. By indexing code through AST declarations using tree-sitter, Atlas gains a deep, structural understanding of your Julia code, rather than relying on less precise line-based analysis. This ensures that every public function and its specific type-stable dispatch signatures are considered for testing, providing a robust foundation for generating comprehensive `@testset` blocks within your `test/runtests.jl` or other test files.
How Atlas adopts existing Julia test conventions
Atlas adopts existing Julia test conventions by using the `grep` tool to locate an existing test file, such as `test/runtests.jl`, within your package. This ensures new `@testset` blocks and import styles match the repository's established patterns, a critical step for integrating new tests in 2026.
A key aspect of integrating new tests into an existing Julia codebase is adhering to its established conventions. Atlas achieves this by using its `grep` tool to search for an existing test file, typically `test/runtests.jl`, within your Julia package. By analyzing this file, Atlas learns the repository's specific testing framework, import style, and naming conventions. This allows Atlas to generate new test specifications that direct blend with your existing code, using familiar `@testset` blocks and module imports, rather than introducing foreign patterns. This approach ensures that the new tests are immediately recognizable and maintainable by other Julia developers familiar with the project's style.
Writing and executing Julia unit tests with Atlas
Atlas writes new Julia unit test specifications using its `write` tool, then executes them with the `bash` tool, running `Pkg.test()` to validate the code. This iterative process ensures tests are functional, with output exceeding 2000 lines or 50 KB truncated but saved for full review.
Once Atlas has identified the functions to test and understood the repository's conventions, it proceeds to write the new unit test specifications. This is done using the `write` tool, which drafts the new test file, for example, `test/my_module_tests.jl`, incorporating `@testset` blocks and `@test` macros. After drafting, Atlas uses its `bash` tool to execute the Julia test runner, `Pkg.test()`. This command runs the entire test suite, including the newly generated tests. Atlas then reads the failures back into its plan. If the output exceeds 2000 lines or 50 KB, it is truncated in the terminal but the full log is saved to a file for your review. This allows for an iterative workflow where Atlas can use its `edit` tool to fix test failures, and for large modules, the `todowrite` tool helps manage progress until the entire suite is green.
Ensuring safety and review for Julia test generation with Atlas
Atlas prioritizes safety and review for Julia test generation by presenting a unified diff for every file edit, requiring explicit approval before writing to disk. Every Atlas tool call is permission-gated, ensuring you maintain full control over changes to your `Project.toml` and source files in 2026.
Safety and user control are paramount when Atlas generates or modifies code. Before any changes are written to disk, Atlas computes a unified diff for every file edit and surfaces it for your approval. This allows you to review precisely what Atlas intends to change in your Julia source files or `Project.toml`. Furthermore, every Atlas tool call is permission-gated against `allow`, `ask`, and `deny` rules, giving you granular control over its actions. Atlas drafts a plan in a read-only plan agent and asks for your permission before switching to a build agent to execute changes. It also snapshots file changes as git patches, so edits can be easily diffed and rolled back, providing multiple layers of safety and review for your Julia projects.
Maintaining Julia code quality with Atlas
Atlas helps maintain Julia code quality by applying `JuliaFormatter.jl` to touched source files after test generation, ensuring consistent style. It can also identify and fix type instabilities, leveraging its understanding of dispatch signatures and `Project.toml` dependencies, a key benefit for developers in 2026.
Beyond just writing tests, Atlas contributes to overall Julia code quality. After generating or modifying test files, Atlas can apply `JuliaFormatter.jl` to the touched source files. This ensures that all new or updated code adheres to your project's established formatting standards, maintaining consistency across the codebase. Atlas also leverages its deep understanding of Julia's multiple dispatch, type stability, and `Project.toml` environments to identify potential issues. It can be asked to fix type instabilities it finds, improving the performance and robustness of your Julia package. This comprehensive approach ensures that new tests are not only functional but also contribute to a higher standard of code quality.
Step by step
- 01Run Atlas in your Julia package directory, ensuring `Project.toml` and `Manifest.toml` are present for context.
- 02Use Atlas's `read` tool to ingest your module, then `lsp` to enumerate its exported symbols and dispatch signatures for comprehensive testing.
- 03Employ Atlas's `grep` tool to find an existing test file, such as `test/runtests.jl`, to learn the repository's Julia testing conventions.
- 04Instruct Atlas's `write` tool to draft a new Julia test file (e.g., `test/new_module_tests.jl`) with `@testset` blocks, matching the established style.
- 05Approve the proposed changes via the permission prompt, reviewing the unified diff before Atlas writes the new Julia test file to disk.
- 06Execute the new tests using Atlas's `bash` tool to run `Pkg.test()`, reading the failures back into the plan for analysis.
- 07Iterate with Atlas's `edit` tool to fix test failures, using `todowrite` for larger Julia modules, until `Pkg.test()` passes successfully.
- 08Allow Atlas to apply `JuliaFormatter.jl` to the touched source files to ensure consistent Julia code style.
- 09Review the final changes, including any `git` diffs, and use Atlas to stage and create commits on your behalf.
Frequently asked questions
- How does Atlas ensure new Julia tests match my existing codebase style?
- Atlas uses its `grep` tool to analyze existing Julia test files, such as `test/runtests.jl`, to understand and replicate your repository's specific framework, import style, and naming conventions for new `@testset` blocks.
- Can Atlas run `Pkg.test()` for me?
- Yes, Atlas uses its `bash` tool to execute `Pkg.test()` within your Julia package environment. It then reads the test failures back into its plan, allowing for an iterative fix-and-retest workflow.
- What Julia tools does Atlas integrate with for testing?
- Atlas integrates directly with the core Julia testing toolchain, including `Pkg.test (Test.jl)` for running tests, `Pkg (Project.toml)` for package management, and `JuliaFormatter.jl` for code formatting.
- How does Atlas handle large Julia modules when writing tests?
- For large Julia modules, Atlas can use its `todowrite` tool to manage progress, breaking down the test writing task into manageable steps and ensuring comprehensive coverage without overwhelming the user.
- Is my Julia code safe when Atlas is writing tests?
- Yes, Atlas prioritizes safety. Every tool call is permission-gated, and all proposed file edits are presented as a unified diff for your approval before anything is written to disk. Atlas also snapshots changes as git patches for rollback.
- How does Atlas know which Julia functions to test?
- Atlas uses its `lsp` tool with `documentSymbol` operations to enumerate all exported symbols and their dispatch signatures from your Julia module, ensuring that every public function is considered for testing.
- Does Atlas help with Julia code formatting after writing tests?
- Yes, after generating or modifying test files, Atlas can apply `JuliaFormatter.jl` to the touched source files, ensuring that all new or updated code adheres to your project's established formatting standards.
Try Atlas in your terminal
The terminal-native AI coding agent. Free core, single binary.
Install AtlasRelated guides
Write Unit Tests for Untested Code with Atlas in 2026
How to write unit tests for untested code with Atlas in 2026: the lsp tool enumerates exported symbols, grep copies repo conventions, and bash actually runs the suite.
Atlas for Julia: A Terminal-Native AI Coding Agent for Project.toml Packages in 2026
Atlas is a terminal-native AI coding agent for Julia in 2026. It reads dispatch signatures and Project.toml [deps], fixes type instabilities, runs Pkg.test(), and applies JuliaFormatter.
Audit a Julia Repository with Parallel Subagents in Atlas, 2026
Sweep Julia codebases for problems without context window limits. Atlas uses parallel subagents to audit Project.toml environments, multiple dispatch, and type stability.
Upgrade a Julia Dependency and Fix Breakage with Atlas in 2026
In 2026, Atlas helps Julia developers upgrade dependencies and resolve compile and test failures. It uses Pkg, JuliaFormatter.jl, and provides diffs for safe changes.
Extract a Shared Helper from Duplicated Julia Code with Atlas in 2026
Refactor duplicated Julia code into a shared helper using Atlas. Leverage semantic search, Pkg.test, and JuliaFormatter.jl for robust, reviewable changes.
Self-review your working diff before committing in Julia with Atlas in 2026
Catch your own mistakes in Julia code before committing. Atlas helps Julia developers in 2026 self-review uncommitted diffs, run Pkg.test, and apply JuliaFormatter.jl.
Add a Regression Test for a Bug Fix in Julia with Atlas in 2026
Julia developers in 2026 use Atlas to add robust regression tests. Ensure bug fixes are locked in with tests that fail before and pass after, leveraging Pkg.test (Test.jl) and Project.toml.
Research a third-party API before integrating it in Julia with Atlas in 2026
In 2026, Julia developers use Atlas to research third-party APIs, ensuring type stability and correct dispatch signatures. Atlas leverages websearch and webfetch to get current documentation, then helps integrate with