Stacks

Run the Erlang Test Suite and Triage Failures with Atlas in 2026

Updated 7 min read

In 2026, Erlang developers leverage Atlas to transform a wall of red rebar3 eunit test output into a prioritized list of distinct root causes, streamlining the debugging process by focusing on underlying issues rather than individual test failures.

How to Run Erlang rebar3 eunit Tests with Atlas

In 2026, Erlang developers initiate their test suites using Atlas's bash tool, specifically invoking rebar3 eunit with a generous timeout. This ensures that even complex Erlang/OTP applications, which might involve extensive setup or hot code loading, complete their full test run without premature termination by the agent.

Atlas integrates directly with the Erlang toolchain, allowing developers to execute rebar3 eunit commands through its bash tool. When a test suite generates a substantial volume of output, Atlas intelligently truncates the terminal display at 2000 lines or 50 KB to maintain readability. Crucially, the complete, untruncated log is always written to a retained file, and Atlas provides the exact path to this file. This mechanism is vital for Erlang/OTP systems, where detailed stack traces and process state information from eunit failures can exceed typical terminal buffer limits. By preserving the full output, Atlas ensures that no critical diagnostic information from rebar3 eunit is lost, enabling comprehensive post-run analysis. Atlas also respects permission prompts before running rebar3 eunit, ensuring developer oversight and control over the execution environment.

Triage Erlang rebar3 eunit Failures by Root Cause with Atlas

Atlas helps Erlang developers in 2026 move beyond individual eunit test names to identify distinct root causes for failures. After running rebar3 eunit, if the output was truncated, developers use Atlas's read tool to access the complete log file, which is essential for a thorough grep based analysis.

Instead of sifting through a wall of red output line by line, Erlang developers use Atlas's grep tool to group rebar3 eunit failures by their underlying root causes. This approach is particularly effective for Erlang/OTP applications, where a single issue, such as a gen_server crash or a supervisor restart loop, might manifest as failures across multiple eunit tests. Atlas's grep tool operates on the complete test log file, not just the truncated terminal output. This ensures that all error messages, stack traces, and process dumps from the rebar3 eunit run are available for pattern matching. For instance, a developer might grep for specific error messages like badmatch or function_clause or module names to identify common failure points across the entire suite, providing a more efficient path to resolution than addressing each failing test in isolation.

Prioritize Erlang rebar3 eunit Fixes with Atlas's todowrite

Once distinct root causes for rebar3 eunit failures are identified, Erlang developers in 2026 use Atlas's todowrite tool to create a prioritized list of fixes. Each unique cause becomes a pending entry, ensuring that every identified problem in the Erlang/OTP application is tracked and addressed systematically, preventing issues from being overlooked.

Atlas's todowrite tool is instrumental in transforming a raw list of rebar3 eunit failure patterns into an actionable plan for Erlang developers. For each distinct root cause identified through grep analysis of the full test log, a new todowrite entry is created with a pending status. This structured approach ensures that the focus remains on fixing the underlying problems in the Erlang/OTP codebase, rather than merely patching individual failing tests. For example, if a badarg error in a gen_server module src/my_module.erl is causing multiple eunit tests to fail, a single todowrite entry like "Fix badarg in my_module:handle_call/3" is created. This method provides a clear, prioritized roadmap for debugging, allowing developers to tackle the most impactful issues first and track their resolution effectively within the Atlas environment.

Iterative Erlang Debugging and Safe Code Changes with Atlas

Atlas empowers Erlang developers in 2026 to fix rebar3 eunit failures iteratively and safely. Using the edit tool, developers address one distinct root cause at a time, re-running only the affected tests via bash between changes. Atlas ensures safety by presenting a unified diff for every file edit and requiring explicit approval before writing changes to src/*.erl or test/*.erl files.

After prioritizing fixes with todowrite, Erlang developers use Atlas's edit tool to implement changes for one distinct root cause at a time. This focused approach is crucial for maintaining stability in complex Erlang/OTP systems. For instance, if a fix involves modifying a gen_server callback in src/my_server.erl, Atlas allows the developer to make the change and then immediately re-run only the relevant eunit tests using rebar3 eunit --module my_server_tests via the bash tool. This rapid feedback loop accelerates debugging. Atlas's commitment to safety is paramount: every proposed file edit, whether to src/*.erl or rebar.config, generates a unified diff that is surfaced for developer approval. This permission gated process, combined with Atlas's ability to snapshot file changes as git patches, provides robust rollback capabilities and ensures that all modifications align with the developer's intent and project style, including running erlfmt on touched modules.

Atlas's Deep Integration with the Erlang Toolchain in 2026

Atlas offers deep integration with the Erlang toolchain, understanding rebar3 projects, erlfmt formatting, and core Erlang/OTP constructs in 2026. When run in an application containing rebar.config and src/*.app.src, Atlas automatically maps supervisor callbacks, gen_server modules, and relx release configurations, providing context aware assistance for Erlang developers.

Atlas is designed to be a native companion for Erlang developers, recognizing and interacting with the specific tools and structures of the Erlang/OTP ecosystem. It builds its code index using AST declarations via tree-sitter, allowing it to understand the semantic structure of Erlang modules, including gen_server behaviors and supervisor trees. This deep understanding means Atlas can, for example, suggest adding a handle_call clause to an existing gen_server or propose a new Common Test suite under the test/ directory, always presenting a diff for approval. Atlas also respects the project's formatting standards by running erlfmt on any touched modules, ensuring that proposed changes adhere to the erlfmt style. This comprehensive integration, from managing dependencies with rebar3 to formatting code with erlfmt and executing tests with rebar3 eunit or rebar3 ct, makes Atlas an indispensable tool for Erlang development.

Step by step

  1. 01Initiate the full Erlang test suite by running `atlas bash "rebar3 eunit --timeout 300000"` with a generous timeout to prevent premature termination.
  2. 02If Atlas indicates "output truncated", use `atlas read <path/to/full_log_file>` to review the complete `rebar3 eunit` output.
  3. 03Employ `atlas grep "badmatch|function_clause|exit_reason" <path/to/full_log_file>` to identify and group distinct root causes of failures across the entire Erlang test log.
  4. 04For each distinct root cause identified, create a new actionable item using `atlas todowrite "Fix <description_of_cause> in <module.erl>" --status pending`.
  5. 05Select a `pending` item from your `todowrite` list and use `atlas edit src/my_module.erl` to implement the necessary code changes.
  6. 06After editing, re-run only the affected Erlang tests with `atlas bash "rebar3 eunit --module my_module_tests"` to quickly verify the fix.
  7. 07Review the unified diff presented by Atlas for your changes to `src/my_module.erl` and approve it, ensuring `erlfmt` has been applied for style consistency.
  8. 08Repeat steps 5-7 until all distinct root causes for `rebar3 eunit` failures are resolved.

Frequently asked questions

How does Atlas handle large rebar3 eunit output in Erlang?
Atlas truncates terminal output at 2000 lines or 50 KB but always saves the complete `rebar3 eunit` log to a retained file, providing its path for full review with `atlas read`.
Can Atlas help me find the root cause of gen_server crashes in Erlang tests?
Yes, Atlas's `grep` tool can search the full `rebar3 eunit` log for patterns like `gen_server` crash reports or specific error messages, helping you pinpoint the root cause.
Does Atlas understand Erlang/OTP project structure like rebar.config?
Absolutely. Atlas indexes code by AST declarations and recognizes `rebar.config`, `src/*.app.src`, supervisor callbacks, `gen_server` modules, and `relx` configurations.
How does Atlas ensure my Erlang code changes are safe?
Atlas drafts plans in a read-only agent, requires permission for tool calls, computes a unified diff for every edit, and asks for approval before writing to Erlang files.
Will Atlas automatically format my Erlang code with erlfmt?
Yes, Atlas can be configured to run `erlfmt` on any Erlang modules it touches, ensuring that your code changes adhere to the project's established style.
How do I track multiple rebar3 eunit failures in Atlas?
After identifying distinct root causes with `grep`, use `atlas todowrite` to create a prioritized list of `pending` tasks, ensuring all issues are tracked and addressed.
Can Atlas run specific eunit tests after I make a fix?
Yes, you can use `atlas bash "rebar3 eunit --module my_specific_test_module"` to re-run only the relevant Erlang tests, providing quick feedback on your changes.

Try Atlas in your terminal

The terminal-native AI coding agent. Free core, single binary.

Install Atlas

Related guides

Run the Test Suite and Triage the Failures with Atlas in 2026

How to triage a failing test suite with Atlas in 2026: bash truncates at 2000 lines or 50 KB and saves the full log, then grep groups failures by root cause.

Atlas for Erlang in 2026

Atlas is a terminal-native AI coding agent for Erlang/OTP in 2026. Run it in an app with a rebar.config, map supervisors and gen_server modules, review every diff.

Plan a Multi-File Change Before Editing in Erlang with Atlas in 2026

In 2026, Erlang developers use Atlas to plan and review complex multi-file changes, ensuring design approval before modifying a single line of code or running rebar3. Securely design Erlang system updates.

Write Unit Tests for Untested Code in Erlang with Atlas in 2026

In 2026, Erlang developers use Atlas to write unit tests for untested modules, leveraging `rebar3 eunit` and `erlfmt` to match existing project conventions and ensure code quality.

Review a Pull Request in Erlang with Atlas in 2026

Streamline Erlang pull request reviews in 2026 with Atlas, the terminal-native AI coding agent. Catch subtle bugs by leveraging Erlang's rebar3, eunit, and erlfmt toolchain for comprehensive context.

Onboard to an unfamiliar codebase in Erlang with Atlas in 2026

Erlang developers in 2026 can use Atlas to quickly build a mental model of unfamiliar rebar3 projects. Understand supervision trees, gen_server modules, and application structure without reading every file, leveraging

Upgrade a Dependency and Fix Breakage in Erlang with Atlas in 2026

In 2026, Erlang developers use Atlas to upgrade dependencies like `rebar3` packages, automatically fixing compile and test failures. Atlas leverages `rebar3 eunit` and `erlfmt` for a streamlined workflow.

Locate Erlang Behavior Implementations with Atlas in 2026

In 2026, Erlang developers use Atlas to quickly find where a behavior is implemented, leveraging semantic search, grep, and LSP tools across rebar3 projects.

Browse this resource hub