Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Skill phân tích và khắc phục các automation test không ổn định (flaky tests), xác định root cause và đề xuất fix.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-10 | ✗→✓ | ▲ Improved | -28% | 0% |
| case-13 | ✗→✓ | ▲ Improved | -25% | 0% |
| case-14 | ✗→✓ | ▲ Improved | -26% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 11% | 0% |
| case-03 | ✓→✓ | = Same ✓ | 0% | 0% |
Purpose: Identify and resolve unstable automation tests.
Use this skill when:
Detect flaky tests caused by:
Problem:
//div[3]/button
.css-1n2xyz-btnFix: Replace with stable locator following priority in .agent/rules/locator_strategy.md:
id, data-testid, name, css selector (stable), xpath (relative)Problem:
javaThread.sleep(3000); // Hard sleep — BAD page.waitForTimeout(2000); // Fixed delay — BAD
Fix: Use smart waits as defined in .agent/rules/selenium_rules.md and .agent/rules/playwright_rules.md:
java// Selenium WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(10)); wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("result"))); // Playwright await expect(page.getByRole('button', { name: 'Submit' })).toBeVisible();
Problem: Tests share mutable data → parallel runs conflict.
Fix: Use unique, traceable random data:
<testName>_<timestamp>@test.comAfter fixing a flaky test, verify:
The agent MUST follow these rules when analyzing flaky tests:
.agent/rules/locator_strategy.md — Locator stability rules.agent/rules/automation_rules.md — General automation best practices.agent/rules/selenium_rules.md — Selenium wait strategy.agent/rules/playwright_rules.md — Playwright auto-waitingOther measured skills in the registry, with their headline benchmark lift.