Who Is This Course For?
For QA engineers and automation testers who already work with JavaScript + Playwright (or want to move from Selenium) and want to add real AI capabilities to their toolkit. Over 15 days you will use ml.js, @google/generative-ai, Ollama, xlsx (SheetJS), nodemailer, make.com, GitHub Actions, GitHub Copilot in VS Code, Playwright MCP (a native JavaScript tool), and Antigravity — building practical tools, end-to-end workflows, and a Playwright Test 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 as a JSON file, expose it as an Express REST endpoint, and give it a browser UI (JavaScript's native home). One language end-to-end from model to UI.
- The 3 ingredients of every AI app: Algorithm + Data + Model
- ML fundamentals with
ml-regression-multivariate-linear(from the ml.js suite): prepare data, train aMultivariateLinearRegressionmodel, make predictions - Tabular data handling with
Danfo.js— pandas-style DataFrames for Node.js - The "train once, use many" pattern — why training every run wastes time
- Save the trained model as JSON (
JSON.stringify(model.toJSON())); reload in one line — no special serialization format needed - Expose the model as a REST API with Express.js —
GET /predict?squareFeet=8returns the prediction - Build a native HTML + JavaScript page that calls
fetch('/predict?...')— same language as your backend - Train → save → API → UI: the first ML deployment pipeline where every layer is JavaScript
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, and build a chatbot that remembers context.
- Sign up to Google AI Studio (
aistudio.google.com), generate a Gemini API key - Install the official Node SDK:
npm install @google/generative-ai - The 7-element prompt framework: role · task · context · tone · format · constraints · question
- Single-turn requests:
await model.generateContent(prompt)→ read.response.text() - Stateful chatbot:
const chat = model.startChat({ history: [] })+await chat.sendMessage(prompt)— preserves conversation context - System instructions: keep the model on-topic across a long session
- Async/await patterns for LLM calls in Node.js
- Trade-offs of cloud LLMs: cost · security / data leakage · internet dependence · version drift
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.
- 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 Node using the built-in
fetchAPI (Node 18+) — no library, no setup - Parse JSON natively with
JSON.parse(await response.text())— JavaScript's home turf - Install
Open WebUIfor a ChatGPT-style local interface - When local beats 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. You'll build two RAG pipelines and then automate Gmail-sending from Node.
- What RAG actually means: Retrieval (fetch fresh data) · Augmented (merge with prompt) · Generation (LLM answers with context)
- Free pipeline: fetch DuckDuckGo results from Node, feed to local qwen2
- Paid pipeline: official SerpAPI npm package (
npm install serpapi) feeds Google results to Gemini - Sign up at
serpapi.com, copy API key, hit the same Google index Google itself uses - Send Gmail from Node using nodemailer — the standard Node.js email library
- Enable 2-factor auth, generate an App Password at
myaccount.google.com/apppasswords - SMTP send pattern via nodemailer — clean, promise-based API
- 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 JavaScript 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.
- JavaScript AI Agent: read questions from Excel with xlsx (SheetJS) —
npm install xlsx - xlsx API:
XLSX.readFile()·XLSX.utils.sheet_to_json()— flat objects ready for Gemini - 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: JavaScript 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 Playwright Test → Allure report deploys to GitHub Pages → an AI summarises results → email lands in your inbox.
- Trigger on push: when code lands on master, GitHub Actions kicks off the workflow
- Ubuntu runner setup: install Node.js (via
actions/setup-node) ·npm ci· Allure CLI · Playwright + browsers (npx playwright install) - Run tests with
npx playwright test— Playwright Test has built-in JUnit XML and Allure reporters - Generate Allure HTML report from results (via
allure-playwrightreporter) - Deploy report to GitHub Pages via
peaceiris/actions-gh-pages - Parse Playwright's
results.xml(JUnit format) 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.
- 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 Node usingchild_process.execSync - 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 — and where JavaScript benefits more than any other language. VS Code is Copilot's primary platform, the Continue plugin was built for it first, and Playwright MCP is natively a Node tool (you'd be installing it anyway).
- Vibe coding: describe what you want in plain English, AI writes the JavaScript code
- VS Code setup: install GitHub Copilot + Copilot Chat extensions
- The 6 daily uses: write · explain · refactor · debug · MTC → automation · code migration (Selenium ↔ Playwright)
- Convert Selenium JavaScript to Playwright JavaScript (or Python Playwright to JavaScript) with one prompt
- Use a local LLM inside the IDE — install Continue for VS Code, point it at
localhost:11434 - MCP — Model Context Protocol: standardised way AI tools talk to applications
- Install Microsoft's Playwright MCP:
npm install @playwright/mcp@latest— a native Node fit, no language bridge - Wire up
mcp.jsonin VS Code; enable in Copilot Chat settings - Use Copilot in Agent mode + Playwright MCP: AI opens a real browser, finds locators, writes verified JavaScript 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 JavaScript + Playwright Test + 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 JavaScript + Playwright Test + POM framework via prompt:
package.json,playwright.config.js, fixtures, page objects, sample test - Approve plan → Antigravity writes the files → run the sample test with
npx playwright test→ it just works - Standard layout:
tests/·pages/·fixtures/·playwright.config.js - Playwright Test conventions:
test.beforeEach()setup,test.afterEach()teardown, fixtures viatest.extend({}) - Convert an Excel manual test case (OSPOS) to a Page Object Model script via prompt (using
xlsx) - Configure
config.json+ 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, locator) - Cache healed locators in
locator_db.json— native fit: JSON files are JavaScript's home format - Read/write via
fs.readFileSync+JSON.parse/JSON.stringify— no library needed - 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 ml.js?
A MultivariateLinearRegression model that predicts land price from square-feet, trained once on a small dataset, saved as JSON, served via an Express endpoint as /predict?squareFeet=8, with a native HTML+JS page on top — the full ML deployment pipeline end-to-end in JavaScript.
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 Node 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 Node when you need custom logic or tight integration with your existing Playwright Test codebase.
How does your GitHub Actions pipeline report results?
Playwright Test writes JUnit 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 — and because Playwright itself is a Node tool, MCP integration is native — no Java/Python bridge to worry about.
How does your AI self-healing mechanism work?
A utility findElementWithHealing(page, locator) tries the original first. On failure, it checks locator_db.json (native JSON.parse); 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".