# testing > Best practices for writing and maintaining tests - Author: Veerapong - Repository: newkub/skills - Version: 20260202015439 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-06 - Source: https://github.com/newkub/skills - Web: https://mule.run/skillshub/@@newkub/skills~testing:20260202015439 --- --- name: testing description: Best practices for writing and maintaining tests goal: Write tests following best practices outcome: High quality and maintainable tests --- # Testing ## When to Execute Use this skill when you need to write tests, refactor existing tests, or set up testing infrastructure for your projects following best practices. ## Quick Start 1. ติดตั้ง test framework (เช่น Vitest, Playwright) 2. ตั้งค่า configuration สำหรับ project 3. เขียน tests ตาม AAA pattern (Arrange, Act, Assert) 4. รัน tests และตรวจสอบ coverage 5. รวม tests ใน CI/CD pipeline ## ตารางสรุปแต่ละ file ตาม folder | ประเภทไฟล์ | คำอธิบาย | กฎที่ต้องปฏิบัติ | ตำแหน่ง | |-------------|----------|-----------------|---------| | **SKILL.md** | เอกสารหลักของ skill | มี When to Execute, Quick Start, ตารางสรุป | testing/ | | **rules/*.md** | กฎการทดสอบ | ทำตาม write-skills guidelines | testing/rules/ | | **knowledge/*.md** | เอกสารความรู้ | ทำตาม write-skills guidelines | testing/knowledge/ | ## Rules - [Test Setup](./rules/1-setup.md) - [Test Configuration](./rules/2-configuration.md) - [Test Usage](./rules/3-usage.md) ## Knowledge - [Core Concepts](./knowledge/core-concept.md) - [Testing Strategies](./knowledge/testing-strategies.md) - [Best Practices](./knowledge/best-practices.md)