Java Selenium API Automation

โ˜• Core Java Programming

๐Ÿงช TestNG/JUnit Framework

๐Ÿ—ƒ๏ธ SQL JDBC Programming

๐Ÿ“ฆ Maven Basics

๐Ÿงญ Selenium Automation with Java

๐ŸŒ Web Services and REST API

๐Ÿ” API Automation using REST Assured

๐Ÿš€ Projects

๐ŸŽฏ Mock Interviews

๐Ÿ› ๏ธ IDE Setup


This Java Automation course is crafted for experienced QA professionals, test automation engineers, and SDETs who want to go deeper into the design, structure, and scalability of test automation systems.

Youโ€™ll gain deep expertise in Core Java, Selenium WebDriver, REST Assured, and JUnit, with a strong focus on building robust, reusable, and maintainable automation frameworks for UI and API testing.

You will also learn how to plan for modular automation, manage test data, structure your codebase, and apply best practices to ensure high-quality and efficient testing.

โ˜• Core Java Programming

๐Ÿ“š Category Topics Covered
๐Ÿ› ๏ธ Java Installation & Setup - Java Installation
- Environment Variables
- Path and CLASSPATH
๐Ÿ’ก Java Basics - Introduction to Java
- Setting up Java Development Environment
- Writing your first Java program
- Data Types and Variables:
ย ย ย ย - Primitive and Reference Types
ย ย ย ย - Variables and Constants
๐Ÿ” Control Flow - If-Else, Switch
- For, While, Do-While loops
๐Ÿงฑ Object-Oriented Programming (OOP) - Classes, Objects, Constructors
- Inheritance
- Method Overloading & Overriding
- Polymorphism
- Encapsulation
- Abstraction (Abstract Classes & Interfaces)
๐Ÿšจ Exception Handling - Types: Checked vs Unchecked
- Try-Catch, Finally
- Throw & Throws
๐Ÿงบ Collections Framework - List: ArrayList, LinkedList
- Set: HashSet, TreeSet
- Map: HashMap, TreeMap
๐Ÿ“‚ Java I/O - File Handling
- Streams: Byte & Character
๐Ÿงต Multithreading - Creating Threads
- Runnable Interface
- Synchronization & Communication
๐Ÿงฐ Utility Classes - String, StringBuilder, StringBuffer
- Wrapper Classes
- Autoboxing/Unboxing

๐Ÿงช TestNG/JUnit Framework

Topic Subtopics
Unit Testing What is Unit Testing?
Setting up JUnit Using Maven, Using Gradle
Annotations @Test, @BeforeEach, @AfterEach, Other useful annotations
Assertions assertEquals, assertTrue, assertFalse, assertThrows, assertNotNull, assertNull
Parameterized Tests Running tests with multiple sets of data, @ParameterizedTest, @ValueSource, @CsvSource
Test Suites Grouping multiple test classes, Running them together using @Suite
Exception Testing Validating exceptions using assertThrows
Nested Tests Organizing related tests within inner classes using @Nested
Mocking Dependencies Introduction to mocking frameworks (e.g., Mockito), Creating and injecting mocks, Verifying interactions
Hands-on Practice Writing simple test cases, Practicing with a sample Java class and methods

๐Ÿ—ƒ๏ธ SQL JDBC Programming

Topic Subtopics
Introduction to SQL - Overview of SQL and its importance in automation testing
- Types of SQL databases (e.g., MySQL, PostgreSQL, Oracle)
SQL Basics - Understanding databases, tables, and records
- Data types in SQL
Basic SQL Commands - SELECT statement for data retrieval
- WHERE clause for filtering data
- Sorting results with ORDER BY
SQL Functions - Common functions like COUNT, SUM, AVG, MIN, MAX
- String functions (e.g., CONCAT, UPPER, LOWER)
- Date functions (e.g., NOW, DATE_ADD)
Data Manipulation - Inserting data using INSERT INTO
- Updating data using UPDATE
- Deleting data using DELETE
Joins in SQL - Understanding different types of joins: INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL JOIN
- Retrieving data from multiple tables using joins
Aggregating Data - Grouping data using GROUP BY
- Filtering groups with HAVING clause
Indexes and Keys - Understanding primary keys and foreign keys
- Using indexes for performance optimization
Basic Database Testing - Verifying data integrity with SQL queries
- Validating test scenarios using SQL
- Common database testing use cases in automation

๐Ÿ“ฆ Maven Basics

  • What is Maven? Benefits
  • Installing Maven
  • Project Structure and POM
  • Adding Dependencies
  • Maven Build Lifecycle
  • Common Plugins
  • Example Maven Project

๐Ÿงญ Selenium Automation with Java

Topic Subtopics
Introduction to Selenium - Selenium components
- Comparison with other tools
- Setting up WebDriver, IDE, drivers
Selenium WebDriver Basics - WebDriver architecture
- Locating elements: ID, name, XPath, CSS
- Interacting with elements
Handling Web Elements - Buttons, text boxes, checkboxes
- Alerts, pop-ups, frames
- Dynamic elements
Synchronization - Implicit vs Explicit Waits
- AJAX handling
Advanced Concepts - Multiple windows/tabs
- Screenshots
- JavaScript execution
Data-Driven Testing - External data sources
- DataProvider in TestNG
Framework Development - Types: keyword-driven, data-driven, hybrid
- Page Object Model (POM)
- Managing dependencies with Maven/Gradle
Cross-Browser Testing - Running tests on multiple browsers
- Parallel execution with TestNG/JUnit
Reporting and Logging - TestNG, Extent Reports
- Log4j for logging
Selenium Grid - Distributed testing with Selenium Grid
- Remote test execution
CI Integration - Jenkins, GitHub Actions
- Automated test execution on commits

๐ŸŒ Web Services and REST API

  • What are Web Services?
  • REST vs SOAP
  • Components of REST API
  • HTTP Methods: GET, POST, PUT, DELETE, PATCH
  • HTTP Status Codes: 1xxโ€“5xx
  • Tools: Postman, curl
  • Parsing JSON/XML
  • Error Handling
  • Examples using Flask & Express.js

๐Ÿ” API Automation using REST Assured

  • What is REST-Assured?

    • A Java-based library used to test RESTful APIs.
    • Provides a domain-specific language (DSL) for writing readable and maintainable API tests.
    • Integrates seamlessly with Java-based testing frameworks like JUnit and TestNG.
  • Setting up with Maven

    • Add REST-Assured dependency in your pom.xml.
      <dependency>
          <groupId>io.rest-assured</groupId>
          <artifactId>rest-assured</artifactId>
          <version>5.3.0</version>
          <scope>test</scope>
      </dependency>
      
    • Optionally include JSON/XML path and Hamcrest matchers for assertions.
  • HTTP Method Testing

    • GET: Retrieve data from an API.
    • POST: Send data to the server.
    • PUT: Update existing data.
    • DELETE: Remove data from the server.
    • PATCH: Partially update resources.
  • Validating Responses

    • Status Code
      • Validate HTTP response code (e.g., 200 OK, 404 Not Found).
    • Headers
      • Assert presence and values of headers like Content-Type, Authorization, etc.
    • Body
      • Validate fields in JSON or XML response using path expressions.
  • Authentication

    • Basic Authentication
      • Pass credentials using .auth().basic(username, password).
    • Token-Based Authentication
      • Use .auth().oauth2(token) for Bearer tokens (commonly used in REST APIs).
    • Custom Headers
      • Add custom Authorization headers when needed.
  • Request Parameters & Payloads

    • Query Parameters
      • Use .param("key", "value") or .queryParam().
    • Path Parameters
      • Define placeholders in the endpoint URL.
    • Request Body
      • Send JSON, XML, or form data as payload using .body().
  • Assertions with Hamcrest

    • Use expressive matchers for validating response:
      • equalTo(), hasItems(), containsString(), etc.
    • Enables readable assertions like:
      then().body("name", equalTo("John"));
      
  • Logging and Configurations

    • Enable request and response logging:
      • .log().all() or .log().body()
    • Configure timeouts, proxies, and base URI using RestAssured.config.
  • File Uploads/Downloads

    • Upload files using .multiPart() method.
    • Download files and validate content type, size, etc.
  • TestNG / JUnit Integration

    • Use REST-Assured inside test methods.
    • Combine with test annotations for setup, teardown, and grouping.
    • Create reusable test suites and CI pipelines.
  • Best Practices and Hands-on

    • Use RequestSpecification and ResponseSpecification for reusability.
    • Externalize base URIs, endpoints, and payloads in config files or constants.
    • Follow clear naming conventions and logging to maintain readable tests.
    • Hands-on practice: Create CRUD tests against public APIs like https://reqres.in or your own mock server.

๐Ÿš€ Projects

  1. Project 1 - Java Selenium Automation
  2. Project 2 - Java Selenium Automation
  3. Project 3 - API Automation using REST Assured
  4. Project 4 - API Automation using REST Assured

๐ŸŽฏ Mock Interviews


๐Ÿ› ๏ธ IDE Setup

  • Visual Studio Code
  • IntelliJ
  • Useful Plugins