2-Day Java for Automation Testing - Crash Course
Day 1: Java Core Foundations (13 Hours)
1. Java Setup & IDE (30 mins)
- Install JDK, IntelliJ/Eclipse
- Setup and run first Java program
2. Variables, Data Types, Type Casting (1 hr)
- int, double, char, boolean, String
- Implicit and explicit casting
3. Operators (45 mins)
- Arithmetic, Relational, Logical, Assignment
4. Conditional Statements (1 hr)
- if, else if, else, nested if
- switch-case
5. Loops (1.5 hrs)
- for, while, do-while
- break and continue
6. Arrays (1.5 hrs)
- Single-dimensional and multi-dimensional arrays
- Looping over arrays
7. Strings (1.5 hrs)
- String methods: equals(), contains(), split(), replace(), substring()
- StringBuffer & StringBuilder
8. Methods / Functions (1.5 hrs)
2-Day Java for Automation Testing - Crash Course
- Defining methods, return types, parameters
- Static vs non-static
9. Java Basics Project Practice (2 hrs)
- Build a small program using conditions, loops, methods
- Example: Login flow simulation with input validation
Day 2: OOP + File + Collections + Exception Handling (13 Hours)
1. Object-Oriented Programming (4 hrs)
- Classes & Objects
- Constructors: default & parameterized
- Inheritance: extends, super keyword
- Polymorphism: method overloading & overriding
- Encapsulation: private variables, getters/setters
- Abstraction: interface & abstract class overview
2. Exception Handling (1 hr)
- try-catch-finally
- Multiple catch blocks
- throw and throws
3. Java Collections (2.5 hrs)
- List, ArrayList
- Set, HashSet
- Map, HashMap
- Looping collections with for-each and iterators
4. File Handling (1.5 hrs)
- FileReader, BufferedReader
2-Day Java for Automation Testing - Crash Course
- FileWriter, BufferedWriter
- Read/write test data from files
5. Practice: Java Mini Framework Simulation (3 hrs)
- Create BaseTest, LoginPage, TestSuite classes
- Use List to store and iterate test steps
- Try-catch around Selenium-like methods
Outcome
After this 2-day crash course (26 hours), you will be able to:
- Understand and write Java code for Selenium & TestNG
- Use OOP concepts to build automation frameworks
- Handle test data using arrays, collections, and file I/O
- Implement exception handling in scripts
- Be ready to integrate Java code into automation tools like Maven, Jenkins, Selenium