// AUTOMATION CAREER GUIDE · 2026–2027
Java Selenium Automation
Complete Fresher Roadmap
Everything a fresher needs — from zero to hired. Covers Java foundations, Selenium
mastery, TestNG, frameworks, portfolio projects, and day-1 expectations with a complete
study timeline.
Java 17–21 Selenium 4.x TestNG · JUnit 5 Maven · Gradle REST Assured Cucumber · BDD GitHub · CI/CD
PHASE 1 — JAVA FOUNDATION
1
Java Fundamentals — Non-negotiable Weeks 1–4
› OOP Concepts — Classes, Objects, Inheritance, Polymorphism (overloading vs overriding), Abstraction,
Encapsulation. Every single interview will ask OOP questions.
› Java Collections Framework — ArrayList, LinkedList, HashMap, HashSet, TreeMap, Iterator, Comparable
vs Comparator. Essential for test data handling.
› Exception Handling — try/catch/finally, multi-catch, custom exceptions, checked vs unchecked. finally
always executes regardless of exceptions.
› File I/O — FileReader, BufferedReader, Files/Paths (Java NIO). Reading test data from CSV and text files.
› String Manipulation — split(), substring(), contains(), startsWith(), regex patterns, StringBuilder vs String
(performance matters in loops).
› Interfaces & Abstract Classes — Abstract class for base test classes with shared WebDriver. Interface for
contracts like Clickable, Configurable.
› Java 8+ Features — Lambda expressions, Stream API (filter/map/collect), Optional, Method references,
Functional interfaces (Predicate, Function).
› Java 11–21 Features — var keyword, text blocks, records, sealed classes, pattern matching instanceof,
virtual threads (Project Loom).
› Multithreading Basics — Thread class, Runnable, synchronized, volatile. Critical for understanding
ThreadLocal in parallel test execution.
Resources: Java Brains (YouTube) · Udemy - Java for Testers · W3Schools Java · HackerRank Java
PHASE 2 — SELENIUM CORE
2
Selenium WebDriver — Full Depth Weeks 5–10
› WebDriver Setup — WebDriverManager 5.x auto-manages browser drivers. ChromeOptions,
FirefoxOptions, EdgeOptions for browser configuration. Headless mode setup.
› Locator Strategies — ID, Name, Class, Tag, Link Text, Partial Link Text. Start with these simple ones,
then master XPath and CSS.
› XPath Mastery (critical) — Absolute vs relative XPath. text(), contains(), starts-with(), normalize-space().
Axes: parent, child, ancestor, descendant, following-sibling, preceding-sibling. Dynamic tables using
text-based navigation.
› CSS Selectors — Attribute [type="submit"], descendant (space), child (>), :nth-child(n), :first-child,
:last-child, :not(), [class*="btn"].
› WebElement Interactions — click(), sendKeys(), clear(), submit(), getText(), getAttribute(), getCssValue(),
isDisplayed(), isEnabled(), isSelected().
› Waits — The Most Important Topic — ImplicitWait (global, avoid), ExplicitWait with WebDriverWait +
ExpectedConditions (best practice), FluentWait with custom polling. NEVER use [Link]().
› Alert / iFrame / Window Handling — [Link]().alert() for JS popups. switchTo().frame() with
index/name/element. getWindowHandles() for multi-tab scenarios.
› Actions Class — moveToElement() hover, doubleClick(), contextClick(), dragAndDrop(), clickAndHold(),
keyboard shortcuts with keyDown([Link]).
› JavaScript Executor — executeScript() for scrolling to elements, clicking hidden elements, reading/setting
DOM properties, triggering Angular/React events.
› Select / Dropdowns — Select class: selectByValue(), selectByVisibleText(), selectByIndex(), getOptions(),
isMultiple(). Non-standard dropdowns use click + li locators.
› Screenshots — TakesScreenshot interface, getScreenshotAs([Link]). Capture on failure inside
TestNG listener's onTestFailure() method.
› Selenium Grid 4 — Hub/Node architecture, RemoteWebDriver with URL + capabilities. Run tests
distributed across multiple machines/browsers simultaneously.
› BiDi API — Selenium 4 Feature — Chrome DevTools Protocol integration: network interception, console
log capture, geolocation mocking, performance metrics.
PHASE 3 — TESTNG + FRAMEWORK ARCHITECTURE
3
TestNG + Page Object Model + Maven Weeks 10–16
› TestNG Annotations (execution order) — @BeforeSuite → @BeforeTest → @BeforeClass →
@BeforeMethod → @Test → @AfterMethod → @AfterClass → @AfterTest → @AfterSuite. Know this
order cold — it is asked in 90% of interviews.
› TestNG XML Configuration — Suite, test, classes nodes. Groups for smoke/regression/sanity. Listeners
configuration. parallel="methods/classes/tests" with thread-count.
› @DataProvider — Parameterized tests with Object[][] arrays. Iterator-based providers for large datasets.
Combining with @Test(dataProvider="") annotation.
› @Parameters — Passing values from [Link] (browser, environment) to test methods. Enables running
same tests on different environments without code change.
› Soft vs Hard Assertions — [Link]() stops test immediately on failure (hard). SoftAssert
collects all failures, assertAll() at end reports them all. Use SoftAssert when you want to validate multiple
things in one test.
› TestNG Listeners — ITestListener: onTestFailure (take screenshot), onTestSuccess, onTestSkipped.
ISuiteListener: onStart, onFinish. IRetryAnalyzer: auto-retry flaky tests.
› Page Object Model (POM) — One Java class per page. @FindBy annotated WebElement fields.
[Link](driver, this) in constructor (lazy init). Action methods like login(user, pass)
hiding all locator details from tests.
› Base Page Class — Abstract class holding WebDriver instance, WebDriverWait, JavascriptExecutor.
Common wrapper methods: clickElement(), enterText(), waitForVisible(). All page classes extend this.
› Base Test Class — @BeforeMethod: [Link](browser), navigates to base URL.
@AfterMethod: takes screenshot if failed, [Link](). All test classes extend this.
› Maven Project Structure — Standard src/test/java and src/test/resources layout. [Link] with
selenium-java, testng, webdrivermanager, extent-reports dependencies. Maven Surefire Plugin for
running tests via mvn test.
PHASE 4 — REPORTS, LOGGING & DATA HANDLING
4
Reporting, Logging & Test Data Weeks 14–18
› Allure Reports 2 — @Step annotates test steps, @Attachment embeds screenshots. History trending
across runs, categories for known bugs vs new failures. Allure CLI generates HTML from JSON results.
Jenkins/GitHub Actions plugins.
› Extent Reports 5 — ExtentSparkReporter for HTML output. Logging test steps, info messages,
screenshots base64-embedded. System info (browser, OS, environment) in report header.
› Log4j2 / SLF4J — [Link]([Link]). DEBUG/INFO/WARN/ERROR levels. [Link]
config for console + file appenders. MDC (Mapped Diagnostic Context) for adding thread name to parallel
test logs.
› Apache POI for Excel — XSSFWorkbook, XSSFSheet, XSSFRow, XSSFCell. Reading multiple rows of
login credentials, search terms, form data. Combining with @DataProvider for data-driven testing.
› Jackson for JSON — [Link]() to deserialize test data JSON files. @JsonProperty for
field mapping. Creating POJO test data classes with getters/setters.
› Configuration Properties — [Link] file with [Link], browser, timeout. Properties class to load
at runtime. Environment switching via Maven -Denv=staging command-line parameter.
PHASE 5 — API TESTING WITH REST ASSURED
5
REST Assured — API Automation Weeks 16–20
› REST Assured Basics — given().when().then() BDD-style syntax. baseURI, basePath, port configuration.
RequestSpecification for reusable setup across tests.
› HTTP Methods — GET (retrieve), POST (create), PUT (full update), PATCH (partial update), DELETE
(remove). Know status codes: 200, 201, 204, 400, 401, 403, 404, 500.
› Request Building — .body() with String/POJO/HashMap. .header("Authorization","Bearer "+token).
.contentType([Link]). .queryParam(). .pathParam().
› Response Assertions — .statusCode(200). .body("[Link]", equalTo("John")). .body("data",
hasSize(5)). .header("Content-Type", containsString("json")).
› JsonPath Extraction — [Link]().getString("[Link]"). getList("data") for arrays. Chaining
for nested JSON: "[Link]".
› Schema Validation — JSON Schema validator: matchesJsonSchemaInClasspath("schemas/[Link]").
Validates response structure matches defined schema — critical for contract testing.
› Authentication Flows — Extract token from login response. Build RequestSpecification with Authorization
header. Reuse across all authenticated API tests in @BeforeClass.
PHASE 6 — BDD WITH CUCUMBER
6
Cucumber BDD Framework Weeks 18–22
› Gherkin Syntax — Feature, Scenario, Given/When/Then/And/But. Background for common steps.
Scenario Outline with Examples table for parameterization.
› Step Definitions — @Given/@When/@Then annotated methods matching Gherkin patterns. Java 8
lambda syntax: Given("pattern", () -> {}). Capturing groups for parameters: "I enter {string} in the field".
› Hooks — @Before (create WebDriver, set up data) and @After (quit driver, screenshot on failure).
Tag-based hooks: @Before("@mobile"). Order control: @Before(order=1).
› PicoContainer DI — Inject shared context (WebDriver, authToken) into step definition classes without
static fields. Add picocontainer dependency, create context class, inject via constructor.
› Cucumber Reports — HTML, JSON, JUnit XML output types. Allure-Cucumber adapter for full Allure
reports from Cucumber scenarios.
› Tag-based Execution — @smoke, @regression, @mobile tags on scenarios. Run only tagged tests:
[Link]="@smoke". Combine: "@smoke and not @wip".
PHASE 7 — GIT & CI/CD BASICS
7
Git, GitHub Actions & Jenkins Basics Weeks 20–24
› Git Core Commands — git init, clone, add, commit, push, pull, branch, checkout, merge, rebase.
Resolving merge conflicts. .gitignore for target/, *.iml, secrets.
› GitHub Workflow — Fork → clone → feature branch → commit → push → pull request → merge. Writing
meaningful commit messages. Code review process.
› GitHub Actions — .github/workflows/[Link]. Trigger on push/PR. Steps: checkout, setup-java, mvn test,
publish Allure report. Add status badge to README. Free for public repos.
› Jenkins Basics — Freestyle job vs Pipeline. Declarative pipeline: stages (Checkout, Build, Test, Report).
Post-build actions: publish test results, archive artifacts.
PHASE 8 — PORTFOLIO PROJECTS
8
4 GitHub Projects to Build Months 4–6
› Project 1: E-Commerce Automation
Target: Amazon, Flipkart, or OrangeHRM (open-source HR app). Automate: search, filters, add to cart, checkout
flow, order history. Architecture: POM + TestNG + Maven + Extent Report. Goal: 50+ test cases across 10+
pages.
› Project 2: Data-Driven Login Suite
Login and registration automation with valid/invalid data from Excel (Apache POI). Cross-browser testing: Chrome,
Firefox, Edge via config property. Screenshot on every failure. Maven Surefire integration. CI badge in
README.
› Project 3: REST API Testing Framework
REST Assured automation on a public API ([Link], JSONPlaceholder, or Petstore). CRUD operations, schema
validation, auth token extraction and reuse, negative testing (401, 404, 400). Organized by resource type.
› Project 4: BDD Cucumber End-to-End
Full Cucumber-TestNG project with feature files, step definitions, hooks, PicoContainer DI for WebDriver sharing,
Allure reports. GitHub Actions workflow running on every push. Green CI badge.
GitHub Best Practices: Clear README with tech stack, how-to-run instructions, report screenshots. CI
badge (green). Meaningful commit messages. .gitignore covering target/, *.iml, .env, secrets.
STUDY TIMELINE — 6 MONTHS TO JOB-READY
Month Focus Target Outcome
Month 1 Java Fundamentals OOP, Collections, Exceptions, File I/O, Java 8 Streams
Month 2 Selenium WebDriver All locators, waits, actions, alerts, frames, JS executor
Month 3 TestNG + POM TestNG XML, listeners, @DataProvider, full POM framework
Month 4 Reports + REST Assured Allure reports, Apache POI, REST Assured CRUD + auth
Month 5 Cucumber + CI/CD BDD project, GitHub Actions pipeline, Jenkins basics
Month 6 Portfolio + Interview Prep 4 GitHub projects complete, mock interviews, apply daily
DAY-1 EXPECTATIONS CHECKLIST
Skill Area Freshers Must Know Bonus Points
Java OOP, Collections, Exception Handling ✓ Required —
Java 8 Lambdas & Stream API ✓ Required —
Selenium locators (XPath, CSS), All waits, Actions ✓ Required —
TestNG annotations, POM, Maven Surefire ✓ Required —
Basic Git (clone, commit, push, pull request) ✓ Required —
REST Assured basics (GET/POST, assertions) — ✓ Strong plus
Cucumber / BDD Gherkin syntax — ✓ Strong plus
Allure or Extent Reports — ✓ Good to have
Jenkins / GitHub Actions pipeline — ✓ Good to have
Docker basics ✗ Not expected —
Skill Area Freshers Must Know Bonus Points
Kubernetes / Cloud platforms ✗ Not expected —
MUST-KNOW INTERVIEW QUESTIONS FOR FRESHERS
Fresher Difference between Abstract Class and Interface?
Abstract class: constructor, instance variables, concrete methods, single inheritance. Interface (Java 8+): default/static
methods, no state, multiple implementation. In automation: BasePage is abstract (shared driver), Clickable is interface
(contract).
Fresher What is method overloading vs overriding?
Overloading: same name, different params, compile-time. Overriding: subclass redefines parent method, runtime via
dynamic dispatch. Example: click(By) overloaded with click(WebElement). [Link]() overridden in
LoginPage.
Mid What is ThreadLocal and why use it?
ThreadLocal gives each thread its own variable copy. Essential for parallel tests: multiple threads must each have their
own WebDriver. Use [Link]() in @BeforeMethod, [Link]() everywhere, [Link]() in @AfterMethod to
prevent memory leaks.
Fresher Types of waits in Selenium — which is best?
ImplicitWait: global, avoid. ExplicitWait (WebDriverWait + ExpectedConditions): best practice, per-element targeted
condition. FluentWait: configurable polling interval. [Link](): NEVER use — hardcoded delay, brittle, slow.
Fresher What is Page Object Model?
POM: each page has a Java class with @FindBy locator fields and action methods. Tests call high-level methods like
[Link](user, pass) without knowing locators. Benefits: one place to update locators, readable tests, maximum
reusability.
Mid How do you handle StaleElementReferenceException?
Means DOM rebuilt after element was found. Fix: 1) Re-find element in try-catch with retry; 2) Use
[Link](); 3) PageFactory re-finds on each access; 4) Add explicit wait after trigger that causes
DOM refresh.
Fresher TestNG annotation execution order?
@BeforeSuite → @BeforeTest → @BeforeClass → @BeforeMethod → @Test → @AfterMethod → @AfterClass →
@AfterTest → @AfterSuite. Know this order cold — asked in 90% of automation interviews.
Mid Soft Assert vs Hard Assert?
Hard Assert ([Link]): test stops immediately on first failure. SoftAssert: collects all failures, assertAll() at
end reports everything. Use SoftAssert when validating multiple independent things in one test.
ESSENTIAL TOOLS — FRESHER STACK
Tool Description Priority
Selenium 4.x Core browser automation. Selenium Manager, WebDriver 4, Grid 4, BiDi
MustAPI
know
Java 17 Language of choice for enterprise automation. OOP, streams, lambdas
Must know
TestNG 7 Test runner: parallel execution, @DataProvider, listeners, XML config
Must know
Maven / Gradle Build tool, dependency management, Surefire plugin for test execution
Must know
POM + PageFactory Design pattern: page classes with @FindBy locators and action methods
Must know
REST Assured API test automation: given/when/then, JsonPath, schema validation High demand
Cucumber 7 BDD with Gherkin: feature files, step definitions, hooks, tags High demand
Allure Reports 2 Rich HTML reports: @Step, screenshots, history trends, CI integration
Industry std
Log4j2 / SLF4J Structured logging in test framework. Console + file appenders Good to have
Apache POI Read/write Excel for data-driven testing with @DataProvider Good to have
Jackson / Gson JSON test data parsing, POJO deserialization, test data objects Good to have
Git + GitHub Version control, public portfolio repos, PR workflow, CI badges Must know
GitHub Actions Free CI/CD: run tests on every push, publish reports, show badge Good to have
WebDriverManager Auto-downloads correct browser driver version. Zero manual setup Must know
CERTIFICATIONS WORTH GETTING
› ISTQB Foundation Level
Globally recognized testing certification. Tests theory, test design techniques, defect lifecycle. Some companies list
it as required. Good first certification for freshers.
› ISTQB Agile Tester Extension
Pairs with Foundation. Covers TDD, ATDD, exploratory testing in Agile sprints. Relevant since most companies run
Scrum/Agile.
› Oracle Java SE 17 Developer (1Z0-829)
Proves Java language depth. Respected in enterprise Java shops and large IT services. Exam covers OOP,
generics, streams, modules, concurrency.
› BrowserStack / LambdaTest Certificates
Practical, platform-specific. Free to take. Easy LinkedIn profile additions. Shows familiarity with industry-standard
cloud testing platforms.
JOB SEARCH STRATEGY
› LinkedIn Optimization — Headline: "QA Automation Engineer | Java | Selenium | REST Assured |
Cucumber". Apply within 24 hours of posting for best visibility. Add all tool skills with endorsements.
› GitHub Portfolio — 3–4 public repos. Each must have: clear README, tech stack, how-to-run, CI badge
(green), screenshot of test report. Target real public apps (OrangeHRM, [Link]).
› Naukri / Instahyre (India) — Set daily alerts for "Selenium Java", "SDET Java", "Test Automation Java".
Update resume every 2 weeks to stay at top of search rankings.
› ATS Keywords — Resume MUST contain: Selenium WebDriver, TestNG, REST Assured, Maven,
Cucumber, BDD, Jenkins, Git, Java, Page Object Model, Agile, JIRA, CI/CD, Allure.
› Referrals — 60%+ of engineering hires come via referrals. Engage in: Selenium Slack workspace, Ministry
of Testing, LinkedIn QA groups. Reach out to connections at target companies.
› Salary Ranges (India) — Fresher: ■3–6 LPA (IT services). Product companies: ■5–10 LPA. NEVER
accept first offer — research on Glassdoor and AmbitionBox first.
Java Selenium Automation — Complete Fresher Career Guide 2027 · Covers Java, Selenium, TestNG, REST Assured, Cucumber,
CI/CD, Portfolio & Interview Prep