원클릭으로
exunit-test-framework
Execute and generate ExUnit tests for Elixir projects with setup callbacks, describe blocks, and async testing support
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Execute and generate ExUnit tests for Elixir projects with setup callbacks, describe blocks, and async testing support
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Multi-signal framework detection with confidence scoring for 6 major frameworks
Node.js/TypeScript backend framework with dependency injection and modular architecture
Automatically detect test frameworks (Jest, pytest, RSpec, xUnit) in projects by analyzing configuration files and dependencies
Execute and generate pytest tests for Python projects with fixtures, parametrization, and mocking support
Execute and generate RSpec tests for Ruby projects with let bindings, before hooks, and mocking support
Execute and generate xUnit tests for C#/.NET projects with FluentAssertions and Moq support
| name | ExUnit Test Framework |
| description | Execute and generate ExUnit tests for Elixir projects with setup callbacks, describe blocks, and async testing support |
| version | 1.0.0 |
Provide ExUnit test execution and generation for Elixir projects, supporting:
Create a test file from a bug report or feature description:
elixir generate-test.exs \
--source lib/calculator.ex \
--output test/calculator_test.exs \
--module Calculator \
--description "Division by zero error"
Run ExUnit tests and return structured results:
elixir run-test.exs \
--file test/calculator_test.exs \
--format json
--source <path> - Source file to test (required)--output <path> - Output test file path (required)--module <name> - Module name to test (required)--description <text> - Bug description or test purpose--async - Enable async testing (default: false)--file <path> - Test file to execute (required)--format <json|doc> - Output format (default: json)--trace - Run with detailed traceReturns JSON with generated test file information:
{
"success": true,
"testFile": "test/calculator_test.exs",
"testCount": 1,
"template": "unit-test",
"async": false
}
Returns JSON with test results:
{
"success": false,
"passed": 2,
"failed": 1,
"total": 3,
"duration": 0.234,
"failures": [
{
"test": "test divide by zero raises ArithmeticError",
"error": "Expected ArithmeticError to be raised",
"file": "test/calculator_test.exs",
"line": 15
}
]
}
defmodule CalculatorTest do
use ExUnit.Case
test "adds two numbers" do
assert Calculator.add(1, 2) == 3
end
end
defmodule CalculatorTest do
use ExUnit.Case
describe "add/2" do
test "adds positive numbers" do
assert Calculator.add(1, 2) == 3
end
test "adds negative numbers" do
assert Calculator.add(-1, -2) == -3
end
end
describe "divide/2" do
test "divides numbers" do
assert Calculator.divide(6, 2) == 3
end
test "raises on division by zero" do
assert_raise ArithmeticError, fn ->
Calculator.divide(1, 0)
end
end
end
end
defmodule UserTest do
use ExUnit.Case
setup do
user = %User{name: "John", email: "john@example.com"}
{:ok, user: user}
end
test "user has name", %{user: user} do
assert user.name == "John"
end
test "user has email", %{user: user} do
assert user.email == "john@example.com"
end
end
defmodule FastTest do
use ExUnit.Case, async: true
test "runs in parallel with other async tests" do
assert 1 + 1 == 2
end
end
assert expr - Ensures expression is truthyrefute expr - Ensures expression is falsyassert_raise Exception, fn -> ... end - Expects exceptionassert_received message - Asserts message was receivedassert x == y - Equality assertion (preferred over pattern matching)The deep-debugger agent uses this skill for Elixir projects:
Example workflow:
1. deep-debugger receives bug report for Elixir project
2. Invokes test-detector to identify ExUnit
3. Invokes exunit-test/generate-test.exs to create failing test
4. Invokes exunit-test/run-test.exs to validate test fails
5. Delegates fix to elixir-phoenix-expert agent
6. Invokes exunit-test/run-test.exs to verify fix
Requires Elixir and Mix to be installed:
elixir --version # Should be 1.12 or higher
mix --version # Elixir's build tool
ExUnit is built into Elixir, no additional installation needed.
_test.exslib/calculator.ex → test/calculator_test.exstest/test_helper.exs (required){
"success": false,
"error": "Source file not found",
"file": "lib/missing.ex"
}
{
"success": false,
"error": "Mix test failed",
"output": "** (CompileError) ..."
}