AgentSkillsCN

Testing

园艺基础

SKILL.md
--- frontmatter
lesson_style: summary
title: Testing with ExUnit
tags:
  - elixir
  - testing
  - quality
links:
  - target: "[[mix-and-projects]]"
    rel: prereq
  - target: "[[error-handling]]"
    rel: related
  - target: "[[modules-and-docs]]"
    rel: related
source_lessons:
  - https://elixirschool.com/en/lessons/testing/basics
  - https://elixirschool.com/en/lessons/testing/mox
  - https://elixirschool.com/en/lessons/testing/stream_data
content_origin: Summarized from Elixir School lessons in paraphrased form. Not verbatim text.

Summary of the source lessons: use ExUnit for core assertions, then introduce behavior-focused mocking and property-based testing where input space is large. The lessons stress test clarity, deterministic setup, and verifying contracts rather than implementation trivia.

Operationalize these checks through [[mix-and-projects]], include negative-path coverage from [[error-handling]], and keep test intent aligned with public API structure in [[modules-and-docs]].