Overview
Parsaa generates unit tests for your Swift code. Summon it with the@tester mention in the composer, with a file focused in Xcode. It identifies testable behaviors, edge cases, and error conditions, then writes tests to your test target.
@tester is a built-in sub-agent. Configure it in Settings → Automation → Test Generator: choose the framework (Swift Testing or XCTest), the naming convention, whether to generate mocks, and a coverage target — those settings are passed to the agent on each run.What It Generates
Test Cases
XCTestCase subclasses with well-structured test methods covering the behavior of your code.Setup & Teardown
setUp() and tearDown() methods that initialize and clean up test dependencies.Edge Case Tests
Tests for boundary conditions, empty inputs, nil values, and other edge cases your code should handle.
Mocks & Stubs
Mock objects and stubs for dependencies, so your tests are isolated and repeatable.
How to Use
Enable the generator
Turn on Test Generator in Settings → Automation → Test Generator and pick your framework and options.
Mention @tester
In the Parsaa composer, type
@tester. Parsaa generates tests for the focused file and writes them to disk.Example
Input — a function to test:Best Practices
Test behavior, not implementation
Test behavior, not implementation
Good tests verify what your code does, not how it does it. If Parsaa generates a test that relies on internal implementation details, refactor it to test the public interface instead.
Verify assertions
Verify assertions
Double-check that expected values in assertions are correct. AI can miscalculate expected outputs, especially for complex logic.
Add your own edge cases
Add your own edge cases
Parsaa covers common edge cases, but you know your domain best. Add tests for scenarios specific to your business logic.
Keep tests isolated
Keep tests isolated
Each test should be independent. If Parsaa generates tests that share mutable state, refactor them to use fresh setup in each test method.