Automation Testing Q/A
What is Automation Testing?
- Automation testing is the process of using software tools to execute test cases automatically, reducing manual effort and improving efficiency.
What are the benefits of Automation Testing?
Faster test execution
Reduces human errors
Supports regression testing
Saves time and cost
Increases test coverage
When should you automate a test case?
When the test is repetitive
When the test requires large datasets
When the test is time-consuming if done manually
When the test has stable functionality
Which tools are used for Automation Testing?
Selenium
Cypress
Appium
JUnit
TestNG
Cucumber
Playwright
What is Selenium?
- Selenium is an open-source automation tool for web applications that supports multiple programming languages like Java, Python, and C#.
What are the components of Selenium?
Selenium WebDriver – Automates browser actions
Selenium IDE – A record and playback tool
Selenium Grid – Executes tests on multiple machines
What are different locators in Selenium?
ID
Name
Class Name
CSS Selector
XPath
How do you handle dropdowns in Selenium?
Use the Select class to interact with dropdown elements
Select options by visible text, value, or index
How do you handle alerts in Selenium?
Switch to the alert window
Accept or dismiss the alert
What is a Test Automation Framework?
- A structured approach to automation testing using reusable code and best practices
Types of Test Automation Frameworks?
Keyword-Driven
Data-Driven
Hybrid Framework
Page Object Model (POM)
What is Page Object Model (POM)?
- A design pattern that separates test logic from UI elements by creating separate classes for each page
What is the difference between JUnit and TestNG?
JUnit is used for unit testing and is simpler than TestNG
TestNG provides better reporting, parallel execution, and data-driven testing
What is Data-Driven Testing?
- Running test cases with multiple sets of input data, often stored in Excel or CSV
How do you handle dynamic elements in Selenium?
- Use XPath functions like contains, starts-with, and following-sibling
How do you perform Parallel Testing in Selenium?
- Modify the TestNG XML file to enable parallel execution
What is API Testing?
- API testing checks if an API works correctly by sending requests and validating responses
Which tools are used for API Testing?
Postman
REST Assured
SoapUI
What is Mobile Automation Testing?
- Mobile Automation Testing uses tools like Appium to automate testing on mobile apps
What is Appium?
- An open-source tool for automating mobile applications on Android and iOS
What is Continuous Integration (CI)?
- A practice where developers frequently merge code into a shared repository, and automated tests run to detect issues early
What is Jenkins?
- An open-source CI/CD tool that automates testing and deployment
How do you integrate Selenium with Jenkins?
Install Selenium in Jenkins
Configure a Job
Run tests using a Maven or Gradle build
What is Regression Testing?
- Testing to ensure new changes do not affect existing functionality
What is Smoke Testing?
- A quick check to verify basic functionality before detailed testing
What is Sanity Testing?
- A focused test to verify specific bug fixes or changes
What is Functional Testing?
- Testing if the application meets functional requirements
What is Performance Testing?
- Testing system speed, responsiveness, and stability under load
What is Stress Testing?
- Checking how a system behaves under extreme conditions
What is Load Testing?
- Evaluating system performance under expected user loads
What is Soak Testing?
- Running the system for a long duration to check stability
What is Security Testing?
- Testing the application's ability to protect data and resist attacks
What is User Acceptance Testing (UAT)?
- Final testing by end users before deployment
What is TestNG used for?
- Running automated tests with better control and reporting
What is the role of a Test Script?
- A set of instructions that automate test execution
What is a Test Case in Automation Testing?
- A set of preconditions, inputs, and expected results used to validate an application
What are Assertions in Selenium?
- Assertions help verify expected results, commonly using SoftAssert or HardAssert
What is the difference between Verification and Validation?
- Verification checks if the product is built correctly, while Validation checks if the right product is built
What is XPath in Selenium?
- A query language to navigate and locate elements in XML documents and web pages
What is the difference between Absolute and Relative XPath?
- Absolute XPath starts from the root node, whereas Relative XPath starts from any node in between
What is Headless Browser Testing?
- Running tests in a browser without a graphical user interface to improve execution speed
What is Implicit Wait in Selenium?
- A global wait that makes WebDriver wait for a defined time before throwing an exception
What is Explicit Wait in Selenium?
- A specific wait applied to an element until a condition is met
What is Fluent Wait in Selenium?
- A wait that checks for a condition at regular intervals before timing out
What are Test Suites in Selenium?
- A collection of test cases that are grouped and executed together
What is the difference between Build and Release in software testing?
- A Build is a version of the software for testing, while a Release is a version deployed to users
What is the use of Cucumber in Automation Testing?
- Cucumber allows writing test cases in plain English using Behavior-Driven Development (BDD)
What are the advantages of using Maven in Selenium?
Simplifies project build management
Manages dependencies
Automates test execution
What is the purpose of the TestNG XML file?
- It configures test execution, parallel execution, and test groups
What is Cross-Browser Testing?
- Testing an application across different browsers like Chrome, Firefox, and Edge to ensure compatibility



