Who Is This Course For?
For QA engineers and automation testers who already work with Java + Selenium / Playwright and want to add real AI capabilities to their toolkit. Over 15 days you will use Smile (or Tribuo), google-cloud-vertexai, Ollama, Apache POI, JavaMail, make.com, GitHub Actions, GitHub Copilot in IntelliJ IDEA, Playwright MCP, and Antigravity — building practical tools, end-to-end workflows, and a TestNG + Maven AI-healing framework that you can deploy in your actual work, not just toy demos.
Build Your Own AI Model
Before using anyone else's AI, you build your own — a small linear-regression model that predicts a real value (land price), save it to disk, expose it as a REST API, and give it a basic browser UI. By the end of this module the abstract phrase "AI model" stops being mysterious.
- The 3 ingredients of every AI app: Algorithm + Data + Model
- ML fundamentals with
Smile(or Tribuo): prepare data, train aLinearRegression/OLSmodel, make predictions - Tabular data handling with
Tablesaw— Java's answer to pandas - The "train once, use many" pattern — why training every run wastes hours
- Save the trained model with Java's built-in serialization (
ObjectOutputStream); load it back later in a single block - Expose the model as a REST API —
GET /predict?squareFeet=8returns the prediction - Build a simple HTML + JavaScript page that calls the API — no heavy framework needed
- Train → save → API → UI: the standard ML deployment pipeline, fully in Java
Gemini API & Prompt Engineering
Move from building a tiny model to commanding a state-of-the-art LLM. You get a free Gemini API key, learn the 7-element prompt structure that makes the difference between mediocre and great output, and build a chatbot that remembers context.
- Sign up to Google AI Studio (
aistudio.google.com), generate a Gemini API key - Add Google's Java SDK to your Maven
pom.xml:com.google.cloud:google-cloud-vertexai - The 7-element prompt framework: role · task · context · tone · format · constraints · question
- Single-turn requests:
GenerativeModel.generateContent(prompt)→ readresponse.getText() - Stateful chatbot:
ChatSession chat = model.startChat()+chat.sendMessage()— preserves conversation context - System instructions: keep the model on-topic across a long session
- Trade-offs of cloud LLMs: cost · security / data leakage · internet dependence · version drift
- Why this matters: every other module in the course leans on prompts you write yourself
Local LLM with Ollama
Cloud LLMs are great until cost, latency or data privacy stops you. Ollama lets you run a capable LLM entirely on your own laptop — no internet required, no tokens billed, no data leaving the machine. You'll use a 1.5 B model that's small enough to run anywhere.
- Install Ollama; verify it's running at
http://localhost:11434 - Pull a model:
ollama pull qwen2.5-coder:1.5b - List, run and chat:
ollama list·ollama run qwen2.5-coder:1.5b - The 3 message roles every chat API uses:
user·system·assistant - Call Ollama from Java using the built-in Java 11 HttpClient — no external dependency needed
- Parse JSON responses with
Jackson(orGson) — the standard pattern you'll reuse for any LLM - Install
Open WebUIfor a ChatGPT-style local interface - When to choose local over cloud: data sensitivity, predictable latency, zero per-call cost
RAG & Email Automation
An LLM only knows what it was trained on. RAG (Retrieval-Augmented Generation) plugs in live information so the model can answer today's questions, not last year's. You'll build two RAG pipelines — one with a free search engine, one with Google's — and then automate Gmail-sending from Java.
- What RAG actually means: Retrieval (fetch fresh data) · Augmented (merge with prompt) · Generation (LLM answers with context)
- Free pipeline: call DuckDuckGo from Java HttpClient, feed search results to local qwen2
- Paid pipeline: SerpAPI Java client (
com.serpapi:google-search-results-java) feeds Google results to Gemini - Sign up at
serpapi.com, copy API key, hit the same Google index Google itself uses - Send Gmail from Java using JavaMail (
jakarta.mail) — Java's classical email library - Enable 2-factor auth, generate an App Password at
myaccount.google.com/apppasswords - SMTP send pattern via JavaMail — no third-party email service required
- When to choose which: DDG/Ollama for cost · SerpAPI/Gemini for quality and structured results
AI Agents & make.com Workflows
Two ways to build the same agent. First the Java version: read a question from Excel, ask AI, reply by email. Then the visual version on make.com: same agent in 15 minutes with zero custom code. You'll know when to reach for which.
- Java AI Agent: read questions from Excel with Apache POI (
org.apache.poi:poi-ooxml), compose AI reply, send email - Apache POI for
.xlsx:Workbook·Sheet·Row·Cell— the standard Java Excel API - Google Forms → Google Sheets: collect responses without writing a backend
- Publish a Sheet as a public CSV URL — instant data feed for any pipeline
- make.com scenarios: visual node editor for workflow automation
- "Watch new rows" Google Sheets trigger — fires automatically on new submissions
- Make AI module: drop-in LLM step inside the scenario
- Gmail action: send formatted reply email back to the user
- Decision rule: Java when you need control and integration; make.com when you need speed and zero ops
GitHub Actions CI/CD with AI Reporting
Connect everything from the previous modules into one self-running pipeline: push code → GitHub Actions runs the Maven build → Allure report deploys to GitHub Pages → an AI summarises results → email lands in your inbox. You leave this module with a workflow you can drop into any client repo on Monday.
- Trigger on push: when code lands on master, GitHub Actions kicks off a Maven build
- Ubuntu runner setup: install JDK (via
actions/setup-java) · Maven · Allure CLI · Playwright + browsers - Run tests with
mvn test— TestNG producestestng-results.xmland Maven Surefire producesTEST-*.xml - Generate Allure HTML report from results
- Deploy report to GitHub Pages via
peaceiris/actions-gh-pages - Parse Surefire / TestNG XML inline for total / passed / failed / skipped counts
- POST JSON payload to a make.com webhook URL stored in
MAKE_WEBHOOK_URLsecret - make.com receives the payload, feeds it to "You are a Senior QA Automation Lead" prompt, sends email
- Upload
videos/artifact so failures are debuggable later
AI for Manual Testing
Manual testing is not going away — but it is changing. This module shows the manual-tester end of the pipeline: feed a requirements doc to an LLM and generate scenarios, steps, data and defect reports. You also learn the two parameters (temperature, top_p) that decide whether AI sounds robotic or unpredictable, and how to spot when it's hallucinating.
- Temperature (0 = robotic / 0.3 = controlled / 0.8 = creative / 1.0 = unpredictable)
- top_p: word-probability cutoff — pairs with temperature to shape output
- Why markdown beats
.doc/.pdf/.xlsxas AI input - Convert
.docxrequirements to.mdby callingpandocas a CLI from Java usingProcessBuilder - Prompts to generate: test scenarios · test steps · test data · review comments · defect reports
- Realistic vs scale-generated test data — when to write each by hand
- AI Bias — Representation Bias from skewed training data
- Hallucination — AI confidently producing data that doesn't exist
- QA habits to catch bad output before it ships
AI-Assisted Coding in IDE
Where AI changes test-automation writing the most. You'll use GitHub Copilot for vibe coding inside IntelliJ IDEA, swap it for a free local LLM via the Continue plugin and Ollama, then connect Microsoft's Playwright MCP so an AI agent can drive a real browser as it generates the Java Playwright script.
- Vibe coding: describe what you want in plain English, AI writes the Java code
- IntelliJ IDEA setup: install GitHub Copilot plugin
- The 6 daily uses: write · explain · refactor · debug · MTC → automation · code migration (Selenium ↔ Playwright)
- Convert Selenium Java to Playwright Java (or the reverse) with one prompt
- Use a local LLM inside the IDE — install Continue plugin, point it at
localhost:11434 - MCP — Model Context Protocol: standardised way AI tools talk to applications
- Install Microsoft's Playwright MCP: requires Node.js →
npm install @playwright/mcp@latest - Wire up
mcp.jsonin IntelliJ; enable MCP Server in settings - Use Copilot in Agent mode + Playwright MCP: AI opens a real browser, finds locators, writes verified Java Playwright code
AI-Generated Frameworks & Self-Healing
The final module is the headline result of the course. You install Antigravity (Google's agentic IDE), describe the framework you want in English, watch it generate a working Java + Playwright + TestNG + Maven + POM framework, then upgrade it with an AI-healing mechanism that auto-fixes broken locators — caching the fixes so you only pay the AI tax once per locator.
- Agentic AI: AI manager → AI tools → real-world actions (the conceptual map)
- Install Antigravity from
antigravity.google/, sign in with Gmail - Generate a Java + Playwright + TestNG + Maven framework via prompt:
pom.xml, BaseTest, page objects, sample test - Approve plan → Antigravity writes the files → run the sample test with
mvn test→ it just works - Standard layout:
src/main/java/pages/,src/test/java/tests/,generic/BaseTest.java - TestNG conventions:
@BeforeMethodsetup,@AfterMethodteardown,testng.xmlsuite file - Convert an Excel manual test case (OSPOS) to a Page Object Model script via prompt
- Configure
config.properties+ framework conventions so AI follows your structure - Add an AI-based self-healing locator mechanism using Gemini:
- Try original locator → on failure, call Gemini for a new working locator → use it
- Log both attempts; expose a single utility
findElementWithHealing(Page page, String locator) - Cache healed locators in
locator_db.json(read/write via Jackson or Gson) — try original → check DB → call AI only on cache miss - Result: the locator-breaking UI change that used to kill your suite is now a logged warning
What did you build with Smile / Tribuo?
A LinearRegression model that predicts land price from square-feet, trained once on a small dataset, saved via Java serialization, served via a REST endpoint as /predict?squareFeet=8, with a simple HTML page on top — the full ML deployment pipeline end-to-end in Java.
What is the 7-element prompt framework?
Role · Task · Context · Tone · Format · Constraints · Question. Hitting all seven turns a vague Gemini request into a reliable scenario-generator or defect-summariser. Most prompt failures in QA work happen because one of the seven is missing.
Why would you choose Ollama over Gemini?
Cost (zero per-call), security (data never leaves the box), latency (predictable), no internet dependence. For banking/healthcare/government QA where you cannot send test data to a US-hosted endpoint, Ollama is the only practical answer.
When would you use make.com over Java code?
Use make.com when connecting pre-built services (Sheets, Gmail, Slack, GitHub) with standard data flows — OAuth, retries and error workflows come free. Write Java when you need custom logic or tight integration with an existing TestNG / Playwright codebase.
How does your GitHub Actions pipeline report results?
Maven Surefire writes TestNG XML, Allure HTML deploys to GitHub Pages, totals POST to a make.com webhook. make.com prompts Gemini ("You are a Senior QA Automation Lead…") and emails a professional summary on every push.
What is MCP and what does Playwright MCP do?
Model Context Protocol is an open standard for connecting LLMs to external tools. Microsoft's Playwright MCP gives Copilot direct browser control — navigate, click, fill, screenshot, read DOM — turning vibe coding into verified vibe coding: the AI tests its own Java script before saving it.
How does your AI self-healing mechanism work?
A utility findElementWithHealing(Page page, String locator) tries the original first. On failure, it checks locator_db.json (read with Jackson); a hit means the locator was previously healed — reuse it. A miss calls Gemini for a new working locator, uses it, and writes it back to the JSON so the next run is cache-warm. Net effect: AI tax paid once per change.
How do you catch AI hallucination in tests?
Three habits: (1) every AI-generated locator runs in Playwright MCP before being saved, (2) every AI-generated defect report is read against the actual log, (3) low temperature (0.2–0.3) for scenario / data work so output stays grounded. Hallucinations sneak in when teams treat AI output as "done".