majiayu000/claude-skill-registry-data/testing-oliver-kriska-claude-elixir-phoeni-4
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Tainted
Author "majiayu000" has blocked skill(s)
Write or repair Elixir tests with ExUnit, sandbox isolation, async reliability,
Install
npx vskill@latest install majiayu000/claude-skill-registry-data/testing-oliver-kriska-claude-elixir-phoeni-4SKILL.md
The same SKILL.md was published earlier as majiayu000/claude-skill-registry/testing-oliver-kriska-claude-elixir-phoeni-4.
Elixir Testing Reference
Ash projects: UseDataCasewithAsh.Testhelpers; test actions via domain code interfaces, not directRepocalls. Seeash-frameworkskill.
Quick reference for Elixir testing patterns.
Iron Laws — Never Violate These
- ASYNC BY DEFAULT — Use
async: trueunless tests modify global state - SANDBOX ISOLATION — All database tests use Ecto.Adapters.SQL.Sandbox
- MOCK ONLY AT BOUNDARIES — Never mock database, internal modules, or stdlib
- BEHAVIOURS AS CONTRACTS — All mocks must implement a defined
@callbackbehaviour - BUILD BY DEFAULT — Use
build/2in factories;insert/2only when DB needed - NO PROCESS.SLEEP — Use
assert_receivewith timeout for async operations - VERIFY_ON_EXIT! — Always call in Mox tests setup
- FACTORIES MATCH SCHEMA REQUIRED FIELDS — Factory definitions must include all fields that have
validate_requiredin the schema changeset. Missing fields cause cascading test failures
Quick Decisions
Which Test Case?
| Testing | Use | |
|---|---|---|
| Controller/API | use MyAppWeb.ConnCase | |
| Context/Schema | use MyApp.DataCase | |
| LiveView | use MyAppWeb.ConnCase + import Phoenix.LiveViewTest | |
| Pure logic | use ExUnit.Case, async: true |
When to use async: true?
- ✅ Pure functions, no shared state
- ✅ Database tests with Sandbox (PostgreSQL)
- ❌ Tests modifying
Application.put_env - ❌ Tests using Mox global mode
Mock or not?
- ✅ Mock: External APIs, email services, file storage
- ❌ Don't mock: Database, internal modules, stdlib
build() or insert()?
- Use
build()by default for speed - Use
insert()only when you need DB ID, constraints, or persisted associations
Quick Patterns
Common Anti-patterns
| Wrong | Right | |
|---|---|---|
Process.sleep(100) | assert_receive {:done, _}, 5000 | |
insert(:user) in factory | build(:user) in factory | |
async: true with set_mox_global() | async: false | |
| Mock internal modules | Test through public API |
References
For detailed patterns, see:
references/exunit-patterns.md- Setup, assertions, tagsreferences/mox-patterns.md- Behaviours, expect/stub, asyncreferences/liveview-testing.md- Forms, async, uploadsreferences/factory-patterns.md- ExMachina, sequences, traits
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingother/testing-oliver-kriska-claude-elixir-phoeni-4/SKILL.md
Popularity
- Repository stars
- 23
- Repository forks
- 10
- 7-day trend score
- 21
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/majiayu000/claude-skill-registry-data/testing-oliver-kriska-claude-elixir-phoeni-4)