AI-Assisted Testing (AI ဖြင့် Test ရေးခြင်း)
Generating Unit Tests
Section titled “Generating Unit Tests”Function တစ်ခု ရေးပြီးရင် AI ကို Test ရေးခိုင်းလိုက်ပါ။
- Prompt: “Write Jest unit tests for this
calculateTaxfunction. Include edge cases like negative numbers and zero.”
Generating E2E Tests (End-to-End)
Section titled “Generating E2E Tests (End-to-End)”Playwright သို့မဟုတ် Cypress နဲ့ ရေးမယ့် Test Scenario တွေကို AI ကို ရေးခိုင်းပါ။
- Prompt: “Write a Playwright test script that goes to the login page, enters valid credentials, and checks if the dashboard is visible.”
Fixing Broken Tests
Section titled “Fixing Broken Tests”Test တွေ ကျနေရင် (Fail)၊ Error Message ကို AI ပြပြီး ဘာမှားနေလဲ မေးလို့ ရပါတယ်။
- Prompt: “This test is failing with ‘Element not found’. Here is the HTML and the test code. How do I fix it?”