Spokalyالإنجليزية تبدأ من السمع
مقابلات العمل · مختبِر برمجيات (تستر) · متقدّم

مهندس أتمتة الاختبار: اختبار صفحة دفع وإصلاح الاختبارات غير المستقرةQA Automation Engineer: Testing a Checkout and Fixing Flaky Tests

  • Noha
  • Tarek
0:00 / 2:46
الشريط الملوّن مقسوم حسب المتكلّم، فترى من يتحدّث ومتى.

النص

  1. Noha
    Hi Tarek. Imagine we are adding a new checkout page to an online store. How would you plan the testing?
  2. Tarek
    First 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.
  3. Noha
    What would you automate?
  4. Tarek
    I'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.
  5. Noha
    Why not test everything in the browser?
  6. Tarek
    Browser 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.
  7. Noha
    Is there anything you would keep manual?
  8. Tarek
    Yes. 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.
  9. Noha
    Now 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?
  10. Tarek
    I 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.
  11. Noha
    And what are the usual causes?
  12. Tarek
    Often 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.
  13. Noha
    If you can't fix it quickly?
  14. Tarek
    I'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.
  15. Noha
    Last question. You find a serious bug the day before a release, and the developer says it's not a bug. What do you do?
  16. Tarek
    I'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.
  17. Noha
    Thanks, Tarek. Do you have any questions?
  18. Tarek
    Yes. How much of the team's time goes to maintaining the existing automated tests?