Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Write or repair Elixir tests with ExUnit, sandbox isolation, async reliability, Mox, ExMachina, and LiveViewTest. Use for test files, test setup, or failing/flaky tests. NOT for investigating an application bug outside the test suite.
.claude/skills/oliver-kriska-testing/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-13 | ✗→✓ | ▲ Improved | 14% | 0% |
| case-03 | ✓→✓ | = Same ✓ | 5% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 119% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 13% | 0% |
| case-05 | ✓→✓ | = Same ✓ | -1% | 0% |
> Ash projects: Use DataCase with Ash.Test helpers; test actions via domain code interfaces, not direct Repo calls. See ash-framework skill.
Quick reference for Elixir testing patterns.
async: true unless tests modify global state@callback behaviourbuild/2 in factories; insert/2 only when DB neededassert_receive with timeout for async operationsvalidate_required in the schema changeset. Missing fields cause cascading test failures| 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 |
Application.put_envbuild() by default for speedinsert() only when you need DB ID, constraints, or persisted associationselixir# Setup chain setup [:create_user, :authenticate] # Pattern matching assertion assert {:ok, %User{name: name}} = create_user(attrs) # Async message assertion assert_receive {:user_created, _}, 5000 # Mox setup setup :verify_on_exit! expect(MockAPI, :call, fn _ -> {:ok, "data"} end) # LiveView async html = render_async(view) # MUST call for assign_async
| 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 |
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| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-03 | pass→pass | 11,257 | 8,042 | -29% | 1 | 1 | 0% | 2,142 | 2,253 | +5% | 0 | 0 | — |
case-01 | fail→fail | 20,540 | 17,365 | -15% | 1 | 1 | 0% | 3,482 | 3,755 | +8% | 0 | 0 | — |
case-02 | pass→pass | 3,648 | 3,935 | +8% | 1 | 1 | 0% | 680 | 1,486 | +119% | 0 | 0 | — |
case-04 | pass→pass | 15,727 | 13,917 | -12% | 1 | 1 | 0% | 3,128 | 3,522 | +13% | 0 | 0 | — |
case-05 | pass→pass | 13,725 | 9,597 | -30% | 1 | 1 | 0% | 2,381 | 2,363 | -1% | 0 | 0 | — |
case-06 | pass→pass | 6,728 | 3,192 | -53% | 1 | 1 | 0% | 1,188 | 1,352 | +14% | 0 | 0 | — |
case-07 | pass→pass | 9,734 | 7,032 | -28% | 1 | 1 | 0% | 1,674 | 2,047 | +22% | 0 | 0 | — |
case-08 | pass→pass | 12,775 | 6,546 | -49% | 1 | 1 | 0% | 2,127 | 1,862 | -12% | 0 | 0 | — |
case-09 | pass→pass | 5,146 | 3,536 | -31% | 1 | 1 | 0% | 865 | 1,329 | +54% | 0 | 0 | — |
case-10 | pass→pass | 7,905 | 2,644 | -67% | 1 | 1 | 0% | 1,295 | 1,194 | -8% | 0 | 0 | — |
case-11 | pass→pass | 8,266 | 5,336 | -35% | 1 | 1 | 0% | 1,580 | 1,933 | +22% | 0 | 0 | — |
case-12 | pass→pass | 3,663 | 2,749 | -25% | 1 | 1 | 0% | 666 | 1,274 | +91% | 0 | 0 | — |
case-13 | fail→pass | 14,083 | 10,626 | -25% | 1 | 1 | 0% | 2,396 | 2,721 | +14% | 0 | 0 | — |
case-14 | pass→pass | 8,545 | 5,168 | -40% | 1 | 1 | 0% | 1,601 | 1,614 | +1% | 0 | 0 | — |
case-15 | pass→pass | 19,001 | 3,722 | -80% | 1 | 1 | 0% | 3,419 | 1,440 | -58% | 0 | 0 | — |
case-16 | pass→pass | 13,873 | 11,908 | -14% | 1 | 1 | 0% | 2,439 | 3,041 | +25% | 0 | 0 | — |
case-17 | pass→pass | 10,010 | 5,714 | -43% | 1 | 1 | 0% | 1,838 | 1,822 | -1% | 0 | 0 | — |
case-18 | pass→pass | 10,927 | 8,046 | -26% | 1 | 1 | 0% | 1,971 | 2,256 | +14% | 0 | 0 | — |
case-19 | pass→pass | 7,027 | 4,535 | -35% | 1 | 1 | 0% | 1,217 | 1,611 | +32% | 0 | 0 | — |
case-20 | pass→pass | 9,476 | 6,014 | -37% | 1 | 1 | 0% | 1,544 | 1,764 | +14% | 0 | 0 | — |
case-21 | pass→pass | 11,659 | 5,642 | -52% | 1 | 1 | 0% | 1,920 | 1,837 | -4% | 0 | 0 | — |
case-22 | pass→pass | 11,557 | 8,252 | -29% | 1 | 1 | 0% | 1,919 | 2,126 | +11% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of 0 percentage points is the difference between those two pass rates over the 22 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.