Test generation

From agulli/atlas-agents · View interactive version

Test generation is an AI agent skill from the GitHub repository agulli/atlas-agents. Generate comprehensive test suites for existing code. Use when asked to write tests, add test coverage, create unit tests, or build integration tests.

How to use this skill

Skill file

Process

  1. Read the source code. Load every function and class under test. Do not write tests from a summary or description — you must see the implementation.
  1. Identify the test framework. Check for:

If none are found, default to pytest for Python, Vitest for TypeScript/JavaScript.

  1. Categorize test types needed:
  1. Write tests following the AAA pattern:

```python

def test_descriptive_name():

# Arrange — set up inputs and expected state

user = create_test_user(name="Alice")

# Act — call the function under test

result = get_user_greeting(user)

# Assert — verify the output

assert result == "Hello, Alice!"

```

  1. Name tests descriptively. The test name should describe the scenario and expected outcome:
  1. Run the tests. Execute the full test suite and confirm all tests pass. If any fail, fix the test (not the source code) unless you discover an actual bug.

Rationalizations

| Excuse | Rebuttal |

|--------|----------|

| "I'll just write happy path tests" | Edge cases are where bugs live. Write at least one edge case per function. |

| "The function is too simple to test" | Simple functions get refactored. Tests protect against regressions during refactoring. |

| "I'll add tests later" | You won't. Write them now. |

| "Mocking everything is fine" | Over-mocking hides integration bugs. Mock external services, not your own code. |

Verification

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.