Developers keep changing the UI and breaking your tests. How do you fix this at the team level, not just in your code?
What the interviewer wants to hear
- Agree on testability standards such as data-testid or accessible roles
- Run tests on pull requests so developers see failures before merge
- Make developers co-owners of tests
- Use resilient locators and component-level tests
- Show data on time lost to breakages
Model answer
The root problem is that tests are seen as QA's responsibility only. First I make breakages visible early: tests run on every pull request, so the developer who changes the UI sees the failure before merging, not me the next morning. Second, we agree on testability standards: use semantic HTML and accessible names, which helps both users and role-based locators, and add data-testid on key elements, documented in the definition of done. I switch my tests to these resilient locators. Third, I invite developers to co-own the suite: they update affected tests in the same pull request, and I review test changes in their pull requests and vice versa. I show data, like hours lost each sprint to broken tests, to get support from the team lead. Over time, testing becomes part of how the team builds features, not a separate step.
Can you answer it under time pressure?
Take a timed hard round and get scored on every answer.
More hard Automation Test Engineer questions
- Design a test automation strategy for a product with 15 microservices, a web app and a mobile app.
- Your regression suite has grown to 3 hours. How do you bring feedback time under 15 minutes?
- What does testing in production mean, and how would you do it safely?
- What is your view on AI-based and self-healing test automation tools in 2026?
- How do you measure whether your test automation is healthy and worth the investment?
- Your company has 2,000 Selenium tests and wants to move to Playwright. How would you plan the migration?
- The E2E suite fails on about 30% of runs and developers now ignore it. How do you turn this around?
- How do you design automated tests for an event-driven microservices system where services talk through a message broker?
- Your product adds an AI assistant built on a large language model. Its answers vary between runs. How would you automate testing for it?