Skip to main content

Command Palette

Search for a command to run...

Automation Testing Q/A

Updated
5 min read
P

#pratiks-desk | I'm Pratik Joshi a B.Tech graduate in Computer Science and Engineering.

  1. What is Automation Testing?

    • Automation testing is the process of using software tools to execute test cases automatically, reducing manual effort and improving efficiency.
  2. What are the benefits of Automation Testing?

    • Faster test execution

    • Reduces human errors

    • Supports regression testing

    • Saves time and cost

    • Increases test coverage

  3. 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

  4. Which tools are used for Automation Testing?

    • Selenium

    • Cypress

    • Appium

    • JUnit

    • TestNG

    • Cucumber

    • Playwright

  5. What is Selenium?

    • Selenium is an open-source automation tool for web applications that supports multiple programming languages like Java, Python, and C#.
  6. 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

  7. What are different locators in Selenium?

    • ID

    • Name

    • Class Name

    • CSS Selector

    • XPath

  8. How do you handle dropdowns in Selenium?

    • Use the Select class to interact with dropdown elements

    • Select options by visible text, value, or index

  9. How do you handle alerts in Selenium?

    • Switch to the alert window

    • Accept or dismiss the alert

  10. What is a Test Automation Framework?

    • A structured approach to automation testing using reusable code and best practices
  11. Types of Test Automation Frameworks?

    • Keyword-Driven

    • Data-Driven

    • Hybrid Framework

    • Page Object Model (POM)

  12. What is Page Object Model (POM)?

    • A design pattern that separates test logic from UI elements by creating separate classes for each page
  13. 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

  14. What is Data-Driven Testing?

    • Running test cases with multiple sets of input data, often stored in Excel or CSV
  15. How do you handle dynamic elements in Selenium?

    • Use XPath functions like contains, starts-with, and following-sibling
  16. How do you perform Parallel Testing in Selenium?

    • Modify the TestNG XML file to enable parallel execution
  17. What is API Testing?

    • API testing checks if an API works correctly by sending requests and validating responses
  18. Which tools are used for API Testing?

    • Postman

    • REST Assured

    • SoapUI

  19. What is Mobile Automation Testing?

    • Mobile Automation Testing uses tools like Appium to automate testing on mobile apps
  20. What is Appium?

    • An open-source tool for automating mobile applications on Android and iOS
  21. What is Continuous Integration (CI)?

    • A practice where developers frequently merge code into a shared repository, and automated tests run to detect issues early
  22. What is Jenkins?

    • An open-source CI/CD tool that automates testing and deployment
  23. How do you integrate Selenium with Jenkins?

    • Install Selenium in Jenkins

    • Configure a Job

    • Run tests using a Maven or Gradle build

  24. What is Regression Testing?

    • Testing to ensure new changes do not affect existing functionality
  25. What is Smoke Testing?

    • A quick check to verify basic functionality before detailed testing
  26. What is Sanity Testing?

    • A focused test to verify specific bug fixes or changes
  27. What is Functional Testing?

    • Testing if the application meets functional requirements
  28. What is Performance Testing?

    • Testing system speed, responsiveness, and stability under load
  29. What is Stress Testing?

    • Checking how a system behaves under extreme conditions
  30. What is Load Testing?

    • Evaluating system performance under expected user loads
  31. What is Soak Testing?

    • Running the system for a long duration to check stability
  32. What is Security Testing?

    • Testing the application's ability to protect data and resist attacks
  33. What is User Acceptance Testing (UAT)?

    • Final testing by end users before deployment
  34. What is TestNG used for?

    • Running automated tests with better control and reporting
  35. What is the role of a Test Script?

    • A set of instructions that automate test execution
  36. What is a Test Case in Automation Testing?

    • A set of preconditions, inputs, and expected results used to validate an application
  37. What are Assertions in Selenium?

    • Assertions help verify expected results, commonly using SoftAssert or HardAssert
  38. 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
  39. What is XPath in Selenium?

    • A query language to navigate and locate elements in XML documents and web pages
  40. 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
  41. What is Headless Browser Testing?

    • Running tests in a browser without a graphical user interface to improve execution speed
  42. What is Implicit Wait in Selenium?

    • A global wait that makes WebDriver wait for a defined time before throwing an exception
  43. What is Explicit Wait in Selenium?

    • A specific wait applied to an element until a condition is met
  44. What is Fluent Wait in Selenium?

    • A wait that checks for a condition at regular intervals before timing out
  45. What are Test Suites in Selenium?

    • A collection of test cases that are grouped and executed together
  46. 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
  47. What is the use of Cucumber in Automation Testing?

    • Cucumber allows writing test cases in plain English using Behavior-Driven Development (BDD)
  48. What are the advantages of using Maven in Selenium?

    • Simplifies project build management

    • Manages dependencies

    • Automates test execution

  49. What is the purpose of the TestNG XML file?

    • It configures test execution, parallel execution, and test groups
  50. What is Cross-Browser Testing?

    • Testing an application across different browsers like Chrome, Firefox, and Edge to ensure compatibility