# 7.Functional & None-Functional testing

💬 เวลาเขียนเทสมันจะมีของที่เราทดหลัก 2 อย่างคือ **Functional testing** และ **None-Functional testing** ด้วย ในรอบนี้เราจะมาดูกันว่า None-functional testing มันประกอบไปด้วยอะไรบ้าง

{% hint style="info" %}
**None-Functional testing**\
คืองานที่เราต้องเทสแต่บางทีลูกค้าไม่ได้ขอมาตรงๆ เช่น Scalable, Security, Privacy, Readability
{% endhint %}

{% hint style="info" %}
**Functional testing**\
การเทสงานความถูกต้องของโค้ดที่เราเขียนว่ามันทำงานได้จริงๆหรือเปล่า เช่น Unit testing, Integration testing, N2N บลาๆเยอะม๊วก
{% endhint %}

{% embed url="<https://www.youtube.com/watch?v=QAESRjmHG-U&list=PLUjAn8nwWniiL3ToFK8PfmAo8U6IoGAkg&index=9>" %}

## 🎯 สรุปสั้นๆ

### 👨‍🚀 การเขียน Unit test

คือการทดสอบว่าโค้ดที่เราเขียนขึ้นมาสามารถทำงานได้ถูกต้องหรือเปล่า โดยจะเป็นการทดสอบในระดับที่เล็กที่สุดของโค้ดนั่นคือในระดับ method นั่นเอง ส่วนในการเขียน testing แบบอื่นๆจะเริ่มมองในมุมที่กว่าขึ้นเรื่อยๆละเช่นในระดับ module, feature, system บลาๆ


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.saladpuk.com/software-testing/tdd101/fun-n-nonefun-testing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
