### 3.1 Cơ bản về API * **Học:** client/server, HTTP method, status code, header, body JSON, query/path param, auth bằng token. * **Thực hành:** đăng nhập [OrangeHRM](https://opensource-demo.orangehrmlive.com/), bắt 5 request API thật bằng DevTools Network (lọc Fetch/XHR), giải thích từng phần; gọi thử login của [DummyJSON](https://dummyjson.com/) bằng `curl`. * **Tài liệu:** [Guideline 4.3](/doc/43-http-va-rest-co-ban-lk09NNmFbV), [QAMap - HTTP Status Code 200](https://www.youtube.com/watch?v=7Bv8UJXf174). ### 3.2 JavaScript tối thiểu * **Học:** đọc và sửa được đoạn JS ngắn: variable, string, object, array, lấy field trong JSON, `if`, `forEach`, arrow function. Phần `async/await` (mục 8-9 của Guideline 3.10) để tới tuần 4. * **Thực hành:** làm bài tập trong DevTools Console với dữ liệu JSON của DummyJSON. * **Tài liệu:** [Guideline 3.10](/doc/310-javascript-toi-thieu-cho-qa-kWF3AzXkxJ). ### 3.3 Bruno và Hoppscotch * **Học:** cài đặt Bruno; collection, environment, variable; Hoppscotch cho dự án cũ (request, collection, environment). * **Thực hành:** tạo collection Bruno `dummyjson-api` ngay trong thư mục repo thực hành, có environment `dev` và các request của Guideline 3.6 (luồng login -> token -> `/auth/me` trên DummyJSON); gửi 1 request tương đương trên Hoppscotch. * **Tài liệu:** [Guideline 3.6](/doc/36-bruno-usYyWtOJgE), [Guideline 3.7](/doc/37-hoppscotch-zogLyuRLTB), [Bruno docs](https://docs.usebruno.com), [Hoppscotch docs](https://docs.hoppscotch.io). ### 3.4 Test API thật: Swagger Petstore * **Học:** đọc tài liệu Swagger; test CRUD. * **Thực hành:** test CRUD `/pet` trên [Swagger Petstore](https://petstore.swagger.io/), đặt trong folder `pet/` của collection `dummyjson-api`, có case 404 (`GET` một id không tồn tại); case 400 (body JSON sai cú pháp) làm bằng `curl` theo Guideline 4.3; ghi lại những chỗ hành vi thật khác với tài liệu Swagger. * **Tài liệu:** [Guideline 4.3](/doc/43-http-va-rest-co-ban-lk09NNmFbV), [Guideline 3.6](/doc/36-bruno-usYyWtOJgE). ### 3.5 Viết test script và chạy bằng CLI * **Học:** assertion và test script trong Bruno và Hoppscotch; chạy collection bằng Bruno CLI. * **Thực hành:** mỗi request có assertion (status, field, kiểu dữ liệu); chạy cả collection bằng Bruno CLI (lệnh `bru run` đầy đủ ở Guideline 3.6). * **Tài liệu:** [Guideline 3.6](/doc/36-bruno-usYyWtOJgE), [Bruno CLI](https://docs.usebruno.com/bru-cli/overview).