Selenium Grid & Docker Interview Questions for Automation Testing
30 Selenium Grid & Docker questions with answers for automation testing roles — 9 easy, 14 medium, 7 hard.
About Selenium Grid & Docker
Covers running Selenium tests at scale with Selenium Grid 4 and Docker: Grid components, RemoteWebDriver, Docker images and Compose files, node scaling, shared memory, video recording, Kubernetes autoscaling and common CI failures. These questions show whether you can build and debug the test infrastructure that makes parallel, repeatable runs possible in a pipeline.
What is the difference between a Docker image and a container?
Show answer
What is Docker Compose and why is it useful for Selenium Grid?
Show answer
How do you watch a test running inside a Docker Selenium container?
Show answer
Write Java code to create a RemoteWebDriver for a Selenium Grid using ChromeOptions.
Show answer
How do you check that the Grid is ready before starting the tests in CI?
Show answer
How do you increase the number of Chrome nodes with Docker Compose?
Show answer
How do you start a standalone Chrome container and run your tests against it?
Show answer
You configured 50 parallel threads but only 8 tests run at a time on the Grid. Why?
Show answer
What are the standalone, hub and node, and distributed modes of Selenium Grid 4?
Show answer
Why do Selenium browser containers need a larger shm_size?
Show answer
What does SE_NODE_MAX_SESSIONS control in the Docker Selenium images?
Show answer
How do you get reports, screenshots and downloaded files out of a Docker container?
Show answer
Describe a time you convinced your team to run tests in Docker.
Show answer
Write a docker-compose.yml that runs a Selenium hub with Chrome and Firefox nodes.
Show answer
Write a Dockerfile that runs a Maven and TestNG test suite.
Show answer
How do you record videos of tests running on a Docker Selenium Grid?
Show answer
Tests on the Grid fail with SessionNotCreatedException saying the new session request timed out. What do you check?
Show answer
Chrome inside a Docker node keeps crashing with session deleted because of page crash. How do you fix it?
Show answer
File upload tests pass locally but fail when they run on a remote Grid. Why?
Show answer
After aborted Jenkins builds, Grid slots stay busy and new tests wait. How do you handle it?
Show answer
Tests running inside Docker cannot reach the application running on the host's localhost. Why, and how do you fix it?
Show answer
Tell me about a time you set up test infrastructure that other teams started using.
Show answer
What are the main components of Selenium Grid 4?
Show answer
What is the New Session Queue in Selenium Grid 4 and what happens when all slots are busy?
Show answer
How does Selenium Grid decide which node gets a new session?
Show answer
What is Dynamic Grid in Selenium 4?
Show answer
How does running Selenium Grid on Kubernetes with autoscaling differ from Docker Compose?
Show answer
Your UI tests run noticeably slower on the Grid than on your laptop. How do you find the cause?
Show answer
You need 2,000 UI tests to run on every pull request in under 20 minutes. How would you design the infrastructure?
Show answer
Frequently asked questions
How important is Selenium Grid & Docker in Automation Testing interviews?
Covers running Selenium tests at scale with Selenium Grid 4 and Docker: Grid components, RemoteWebDriver, Docker images and Compose files, node scaling, shared memory, video recording, Kubernetes autoscaling and common CI failures. These questions show whether you can build and debug the test infrastructure that makes parallel, repeatable runs possible in a pipeline.
How should I use the Selenium Grid & Docker sheet?
Go top to bottom — easy to hard. Answer before opening each answer, tick what you solved and save misses to Last-Minute Revision.