Selenium Cloud Computing & Services 2 — Questions and Answers
Question 1: Which cloud service model gives Selenium test teams the most control over the underlying OS and runtime environment?
- SaaS
- PaaS
- IaaS (Correct answer)
- FaaS
Correct answer: IaaS
IaaS (Infrastructure as a Service) provides virtual machines where teams can install any OS, browser version, and Selenium runtime they choose.
Question 2: When running Selenium Grid on Kubernetes, what Kubernetes object is used to ensure a fixed number of node replicas are always running?
- Pod
- Deployment (Correct answer)
- ConfigMap
- Ingress
Correct answer: Deployment
A Deployment controller maintains the desired replica count for Selenium Grid node pods and restarts any that fail.
Question 3: Which AWS service allows you to store Selenium test reports and screenshots as objects and access them via a URL?
- AWS RDS
- AWS S3 (Correct answer)
- AWS Lambda
- AWS CloudFront
Correct answer: AWS S3
AWS S3 (Simple Storage Service) stores arbitrary objects like HTML reports and PNG screenshots and can expose them via pre-signed or public URLs.
Question 4: What is a primary advantage of using ephemeral cloud VMs for Selenium tests compared to permanent on-premise machines?
- Lower latency to the browser
- Clean browser state for every test run (Correct answer)
- Permanent session persistence
- Built-in Selenium version locking
Correct answer: Clean browser state for every test run
Ephemeral VMs are created fresh per run, eliminating leftover cookies, cache, and extensions that can cause test flakiness.
Question 5: In a cloud-based Selenium setup, what does 'auto-scaling' primarily help with?
- Automatically updating WebDriver binaries
- Dynamically adding browser nodes based on test queue demand (Correct answer)
- Scaling the test code across multiple repos
- Automatically fixing failing assertions
Correct answer: Dynamically adding browser nodes based on test queue demand
Auto-scaling adds or removes Grid nodes in response to the number of queued sessions, reducing cost during idle periods and wait times during peaks.
Question 6: Which cloud-native concept best describes packaging Selenium tests along with their browser, dependencies, and config into a portable unit?
- Virtual Private Cloud
- Container image (Correct answer)
- Object bucket
- Load balancer
Correct answer: Container image
A container image (e.g., Docker) bundles the browser, WebDriver, and test code so the environment is identical everywhere it runs.
Question 7: When storing Selenium WebDriver credentials (e.g., remote Grid username/access-key) in a cloud CI pipeline, what is the recommended practice?
- Hard-code them in the test class
- Store them as encrypted environment variables or a secrets manager (Correct answer)
- Commit them to a public config file
- Pass them as plain-text query parameters
Correct answer: Store them as encrypted environment variables or a secrets manager
Secrets managers or encrypted CI environment variables prevent credential exposure in logs, version control, and build artifacts.
Which cloud service model gives Selenium test teams the most control over the underlying OS and runtime environment?