مقابلات العمل2:46
مقابلات العمل · مختبِر برمجيات (تستر) · متقدّم
مهندس أتمتة الاختبار: اختبار صفحة دفع وإصلاح الاختبارات غير المستقرةQA Automation Engineer: Testing a Checkout and Fixing Flaky Tests
- Noha
- Tarek
0:00 / 2:46
النص
- NohaHi Tarek. Imagine we are adding a new checkout page to an online store. How would you plan the testing?
- TarekFirst I'd ask questions to understand the risk: which payment methods, what happens if payment fails, and what data we store. Then I'd list the most important user journeys, like paying by card successfully, paying with an invalid card, and applying a discount code.
- NohaWhat would you automate?
- TarekI'd follow the test pyramid. Most checks should be fast tests at the lower levels: unit tests for price calculation and API tests for the payment endpoint. On top, a small number of end-to-end tests in the browser for the main journeys.
- NohaWhy not test everything in the browser?
- TarekBrowser tests are slower and more fragile. If a hundred tests each need thirty seconds, the pipeline becomes too slow and people stop trusting it. API tests are faster and easier to debug.
- NohaIs there anything you would keep manual?
- TarekYes. Exploratory testing of the new design, usability and visual details, and rare cases that change often. Automating something that changes every week costs more than it saves.
- NohaNow a problem we have. One end-to-end test fails about one run in ten, and passes when we run it again. What do you do?
- TarekI wouldn't just rerun it and move on. A flaky test hides real problems and makes the team ignore failures. I'd first look at the logs and screenshots from the failed runs to find a pattern.
- NohaAnd what are the usual causes?
- TarekOften it's timing: the test clicks a button before the page has finished loading, or it uses a fixed wait. I'd replace fixed waits with waiting for a specific condition, like the button being visible and clickable. Other causes are shared test data, tests that depend on each other, and an unstable test environment.
- NohaIf you can't fix it quickly?
- TarekI'd quarantine it: move it out of the main pipeline so it doesn't block releases, create a ticket with an owner and a deadline, and track the number of quarantined tests. A quarantine without a deadline becomes a graveyard.
- NohaLast question. You find a serious bug the day before a release, and the developer says it's not a bug. What do you do?
- TarekI'd show it, not argue. I'd share the exact steps, the expected and actual result, and the impact on users. If we still disagree, I'd ask the product owner to decide, because it's a business risk, and I'd record the decision.
- NohaThanks, Tarek. Do you have any questions?
- TarekYes. How much of the team's time goes to maintaining the existing automated tests?