Frequent UI Changes — Will You Automate?
The Situation
In one project, the UI design was changing frequently, so you had to decide whether automation would even be effective.
The Approach
- Delay UI automation.
- Focus on Manual Testing.
- Focus on API Testing.
- Automate only stable modules later.
Result
Automation maintenance was reduced and overall testing efficiency improved.
Spoken Interview Answer
"If the UI keeps changing, I don't rush into UI automation. I first focus on testing stable functionality and wait for the UI to settle. Once it becomes stable, I automate critical flows so automation remains useful and low maintenance."
Advertisement
Follow-Up Questions
Does This Mean You Won't Automate at All?
No.
Delay UI automation and automate:
- Stable functionality.
- APIs.
- Backend logic.
How Do You Decide Which Parts Are Stable Enough?
Automate areas:
- That are not undergoing frequent UI changes.
- Where business behavior has stabilized.
What Type of Automation Do You Prefer?
Prefer:
- API Automation
- Component-Level Automation
These are less affected by UI changes and provide faster feedback.
What If Management Insists on UI Automation?
Explain the maintenance risk and recommend a Hybrid Approach.
Key Principle
Don't automate an unstable UI. Stabilize first, then automate critical business flows.
Automation vs Manual: What to Automate
The Situation
There are hundreds of test cases but limited time available for automation.
You must choose where automation provides the maximum return.
The Approach
Automate:
- Repetitive test cases.
- Stable functionality.
- Regression scenarios.
Keep Manual:
- Exploratory Testing.
- Dynamic functionality.
- Frequently changing features.
Result
Automation coverage increased with minimal maintenance while Manual Testing continued to validate rapidly changing functionality.
Real Example
Automated:
- Login
- Payment
- API Validations
using Selenium + TestNG.
Kept Manual:
- Exploratory UI Testing
Spoken Interview Answer
"When deciding to automate a test case, I first check if it's repetitive, stable, or part of regression—those I automate. Anything exploratory, dynamic, or likely to change frequently I keep manual, so automation stays valuable and low-maintenance."
Decision Criteria
Automate
- Repetitive
- Stable
- Regression
↓
Manual
- Exploratory
- Dynamic
- Frequently changing
Flaky Tests: Diagnosing and Fixing Intermittent Failures
The Situation
Automation tests were failing randomly in the CI pipeline.
The objective was to stabilize the automation suite.
The Approach
- Analyze reports.
- Identify flaky tests.
- Fix synchronization issues.
- Remove test data dependency.
- Validate environment stability.
Result
False failures were reduced significantly, making the CI pipeline more reliable.
Real Example
Flaky Selenium tests caused by improper waits were fixed using:
- Explicit Waits
- Stable Locators
This significantly reduced intermittent failures.
Spoken Interview Answer
"If my tests fail sometimes and pass sometimes, I treat them as flaky. I check waits, synchronization, test data dependency, and environment issues, and fix the root cause so the suite becomes stable and reliable."
Follow-Up Questions
What Are Flaky Tests?
Automation tests that fail randomly without any code change.
Common causes include:
- Synchronization issues.
- Test data dependency.
- Environment instability.
What Is the Most Common Cause?
Synchronization issues.
Examples:
- Improper waits.
- Dynamic web elements.
How Do You Identify Flaky Tests Quickly?
- Re-run failed tests multiple times.
- Analyze CI reports.
- Review logs.
- Review screenshots.
Do You Ignore Flaky Tests in CI?
No.
Fix the root cause.
Use:
- Explicit Waits
- Proper wait conditions
Avoid using:
Thread.sleep()
How Does Test Data Cause Intermittent Failures?
Shared or hard-coded test data can be modified by parallel executions, causing random failures.
How Do You Handle Flakiness in Parallel Execution?
- Ensure test data independence.
- Avoid shared state.
- Make each test self-contained.
What Role Does the Environment Play?
Intermittent failures can result from:
- Unstable environments.
- Slow network.
- Frequent deployments.
How Do You Communicate Flaky Test Issues?
Classify every flaky test as:
- Test-related
- Data-related
- Environment-related
Share the findings with the team.
FAQs
Should You Automate a Frequently Changing UI?
No.
Delay UI automation until the interface stabilizes.
Automate APIs or stable functionality first.
What Automation Is Best When the UI Is Unstable?
- API Automation
- Component-Level Automation
They are less affected by UI changes and provide faster feedback.
How Do You Decide Between Automation and Manual Testing?
Automate:
- Repetitive scenarios.
- Stable functionality.
- Regression testing.
Keep Manual:
- Exploratory testing.
- Dynamic functionality.
- Frequently changing features.
What Are Flaky Tests?
Automation tests that fail randomly without any application code change.
Typical causes include:
- Synchronization
- Test Data
- Environment
What's the Most Common Cause of Flaky Tests?
Synchronization issues.
Fix them using:
- Explicit Waits
- Stable Locators
Avoid Thread.sleep() whenever possible.
How Do You Keep Tests Stable During Parallel Execution?
- Use independent test data.
- Avoid shared state.
- Design self-contained tests.