# Test Reducers And Use Cases

> Start testing where it's fastest and most valuable.

- URL: https://dantech.academy/en/courses/kotlin-accelerator/engineer-builder/05-testing-security-release/lesson-01-test-reducers-and-use-cases
- Course: [Mobile Action Pro](https://dantech.academy/en/courses/kotlin-accelerator.md)
- Module: Testing, Security, and Release
- Duration: 5 min
- Difficulty: intermediate
- Access: Enrolled students
- Tiếng Việt: https://dantech.academy/courses/kotlin-accelerator/engineer-builder/05-testing-security-release/lesson-01-test-reducers-and-use-cases.md

## Objectives

- Make a reducer branch or a use-case rule testable
- Assert a reducer's full result contract: state, effects and async operation
- Choose commonTest or androidHostTest for a test, and write fakes instead of MockK in shared code

## In this lesson

1. Lesson Goal
2. Part 1: The Behavior Card Of A Reducer
3. Part 2: Test A Use Case With Hand-Written Fakes
4. Part 3: The Test Matrix By Layer
5. Code Reading Path
6. Signs To Avoid
7. References
8. Key Takeaways

## Study with an AI agent

The full lesson is for students of this course. Students open the lesson on the web and press **Markdown** to copy all of it, then paste it into Claude, ChatGPT, Cursor or whichever agent you use. Faster: mint a token at `/profile/ai-agents` and your agent reads lessons over MCP.

- [Join the course](https://dantech.academy/en/kotlin-accelerator/checkout)

---

- Previous lesson: [Composition Root: Where Providers Are Defined](https://dantech.academy/en/courses/kotlin-accelerator/engineer-builder/04-clean-architecture-integration/lesson-05-wire-dependencies-at-composition-root.md)
- Next lesson: [Test Flows And ViewModels](https://dantech.academy/en/courses/kotlin-accelerator/engineer-builder/05-testing-security-release/lesson-02-test-flows-and-viewmodels.md)
