กลับไป เครื่องมือ
ทดสอบและดีบัก

GdUnit4

โดย Godot GdUnit Labs

ทดสอบสคริปต์และฉาก Godot ด้วย input จำลอง พร้อมรายงาน HTML/JUnit รองรับ GDScript และ C# ผ่าน GdUnit4Net

repo

เริ่มใช้งาน: ติดตั้งจาก AssetLib ของ Godot เปิดใช้งาน plugin แล้ว restart editor สร้าง test จากฟังก์ชันในสคริปต์ เปลี่ยน placeholder เป็น assertions และรันผ่าน GdUnit Inspector ใช้ Scene Runner ตรวจฉากด้วย input จำลอง และใช้ CLI ออกรายงาน HTML/JUnit XML

ข้อจำกัด: GdUnit4 v6.x ต้องใช้ Godot 4.5 ขึ้นไป ส่วน C# ต้องตั้งค่า GdUnit4Net และ debug test ผ่าน IDE ภายนอก ไม่รองรับการ debug C# test ใน Godot editor รอบนี้ตรวจเอกสาร ไม่ได้รันทดสอบ

อ้างอิง: https://godot-gdunit-labs.github.io/gdUnit4/latest/first_steps/install/ · https://godot-gdunit-labs.github.io/gdUnit4/latest/first_steps/getting-started/ · https://godot-gdunit-labs.github.io/gdUnit4/latest/advanced_testing/sceneRunner/ · https://godot-gdunit-labs.github.io/gdUnit4/latest/advanced_testing/cmd/ · https://godot-gdunit-labs.github.io/gdUnit4/latest/csharp_project_setup/csharp-setup/

ดูแหล่งที่มา