πŸ”‘ Essential Keywords Used in Test Automation — A Comprehensive Overview




πŸ“„ Page Object Model (POM)
A design pattern in Selenium that separates test logic from UI elements by creating reusable page classes.


🏭 PageFactory
A Selenium class is used for initializing web elements in the Page Object Model using @FindBy annotations.


πŸ“‚ Object Repository
A centralized storage of UI elements and their locators, often maintained in a properties file, JSON, or an external tool.


πŸ’Ύ Data-Driven Testing (DDT)
A testing approach where test data is stored externally (Excel, CSV, Database) and fed into test scripts dynamically.


πŸ”‘ Keyword-Driven Testing
A framework where test execution is controlled using predefined keywords that represent actions on UI elements.


πŸ”„ Hybrid Framework
It combines features from various testing frameworks like Data-Driven, Keyword-Driven, and Behavior-Driven. It offers flexibility, reusability, and scalability for handling complex test scenarios. This approach allows automation teams to adapt to different project needs while maintaining maintainability.


🌐 WebDriver
WebDriver is a core component of Selenium that provides an interface for interacting with web browsers. It enables automation of browser actions such as clicking buttons, entering text, and navigating between pages, by communicating directly with the browser rather than relying on the browser’s JavaScript.


🐍 Selenium
Selenium is an open-source tool used for automating web browsers. It supports multiple programming languages, including Java, Python, and C#, and allows the automation of tasks across different browsers (Chrome, Firefox, Safari, etc.). Selenium provides key functionalities like WebDriver, Grid, and IDE, making it widely used for functional testing in web applications.


πŸ§ͺ TestNG
A popular testing framework for Java that provides features like parallel execution, annotations, assertions, and reporting.


✅ Assertions
Used to validate expected and actual results in test cases, especially in frameworks like TestNG (e.g., assertEquals, assertTrue).


⚖️ Soft Assertion vs Hard Assertion
Hard Assertion: Stops execution immediately on failure.

Soft Assertion: Continues execution even after a failed assertion and reports all failures at the end.


πŸ“š BDD (Behavior-Driven Development)
A test approach that uses Gherkin syntax (Given-When-Then) in tools like Cucumber to write human-readable test cases.


πŸ₯’ Cucumber
A BDD framework that integrates with Selenium to execute test cases written in Gherkin format.


πŸ–§ Selenium Grid
A tool for running Selenium tests in parallel across multiple browsers and machines to improve execution speed.


πŸ” Locators
Locators are used to find elements on a web page. (i.e., “ID, Name, Class Name, Tag Name, Link Text, Partial Link Text, CSS Selector, XPath”).


πŸ–± Web Elements
Web elements are UI components on a web page, such as buttons, text fields, checkboxes, and links. Selenium interacts with these elements using various methods like: click(), sendKeys(), etc.


⚠️ Exceptions
Exceptions in Selenium occur when an operation fails during test execution. Common exceptions include:
NoSuchElementException, TimeoutException, StaleElementReferenceException, ElementNotInteractableException, NoAlertPresentException.


🌐 Cross-Browser Testing
Ensures that a web application works correctly across different browsers (Chrome, Firefox, Edge, Safari, etc.). It helps identify UI inconsistencies and functionality issues due to browser-specific behavior.


⚡ Parallel Testing
Runs multiple test cases simultaneously on different browsers, devices, or environments to reduce execution time and improve efficiency. Often performed using Selenium Grid or testing frameworks like TestNG.


πŸ“‹ DataProvider
In TestNG, the @DataProvider annotation allows a method to supply data to test methods. It enables running the same test with different input data sets, helping to perform data-driven testing efficiently.


πŸ“‘ Annotations
In automation frameworks like TestNG, annotations are special markers that provide instructions to the test runner about how to execute specific methods. Common TestNG annotations include: @Test, @BeforeSuite, @AfterSuite, @BeforeMethod, etc.


⏳ Waits
Waits in Selenium are used to make the automation script wait for certain conditions before performing actions. They are crucial for handling dynamic content on web pages. (i.e.,Implicit Wait, Explicit Wait, Fluent Wait)


πŸͺŸ Multiple Window Handling
Multiple window handling in Selenium allows interaction with different browser windows or tabs during test execution. Selenium WebDriver provides methods like getWindowHandles() to switch between different windows and switchTo().window(windowHandle) to focus on a specific window. This is useful when dealing with popups, new tabs, or multiple browser windows during a test scenario.


πŸ›  Maven
Maven is a build automation tool primarily used for Java projects. It manages project dependencies, builds, and documentation through a standard project structure. It helps automate tasks like compilation, packaging, and testing, making project management more efficient.


πŸ”Œ Maven Surefire Plugin
The Maven Surefire Plugin is used to run unit tests in a Maven project. It supports running tests with frameworks like JUnit, TestNG, and others, and generates test reports. It is typically used in the “test” phase of the Maven build lifecycle to execute tests automatically during the build process.


πŸ“ Absolute Path vs Relative Path
Absolute Path: A full path that specifies the exact location of a file or resource on the system, starting from the root directory (e.g., C:\Users\Documents\project\file.txt). It is fixed and independent of the current working directory.
Relative Path: A path that defines the location of a file or resource in relation to the current directory or working directory (e.g., ../images/logo.png). It is flexible and changes based on the context or location of the file being referenced.


πŸ’» Headless Browser Testing
Executing Selenium tests without opening a GUI browser using headless modes like Chrome Headless or PhantomJS.


🚦Continuous Integration/Continuous Delivery (CI/CD)
A practice that integrates code changes into a shared repository and automatically delivers code to production, often involving test automation.


πŸš€ Jenkins
A CI/CD tool used to automate the execution of test scripts in a continuous integration pipeline.


πŸ“Š Extent Reports & Allure Reports
Popular reporting libraries used for generating detailed execution reports in Selenium automation.


πŸ“œ Logs
Logs in test automation are used to record and track the execution of test scripts, helping to identify issues, errors, and debugging information. Logs capture information like test steps, exceptions, browser actions, and status messages, providing valuable insights for debugging and test result analysis.

Comments

Popular Posts