Back to Courses
PYTHON + AI IN TESTING — GEMINI API · n8n · PLAYWRIGHT MCP · smolagents · HEALENIUM

AI Testing with Python —
From Gemini API to Self-Healing Automation

Build Gemini-powered test tools, automate cross-app workflows with n8n, write automation via vibe coding and Playwright MCP, then deploy self-healing tests with Healenium and autonomous agents with smolagents.

10+
Days of Training
4
Modules
40+
Topics Covered
AI
Powered

Who Is This Course For?

For QA engineers and automation testers who already work with Python and Selenium and want to add real AI capabilities to their toolkit. You will use google-generativeai, streamlit, smolagents, and Healenium — building practical tools that you can deploy in your actual work, not just toy demos.

Automation Engineers Python + Selenium Users QA Leads / SDETs AI-Curious Testers Framework Owners

Your AI Testing Journey

AI Fundamentals + Gemini API
n8n Workflows + AI Nodes
Vibe Coding + Playwright MCP
smolagents + Healenium
MODULE 01
AI Fundamentals & Google Gemini API
ML model, scikit-learn, Gemini API, Streamlit chatbot, AI Agent

You don't need to be a data scientist to use AI in your work. This module gives you enough foundational knowledge to work confidently with AI models, then gets you building real tools immediately using Google's Gemini API.

Core Topics
  • AI system components: Algorithm + Data + Model — the three building blocks of every AI application
  • ML fundamentals with scikit-learn: train a model, make predictions, understand overfitting
  • LLM concepts: tokens, context window, temperature, top-k — what they mean and how they affect output
  • Gemini API: genai.configure(api_key=KEY), model.generate_content(), reading response.text
  • Stateful chatbot: model.start_chat(history=[]), chat.send_message() — maintains conversation context
  • Streamlit UI: st.text_input(), st.button(), st.session_state — web app in under 20 lines
  • AI Agent pipeline: read questions from Excel with openpyxl → send to Gemini → email answers via SMTP
  • System prompt engineering: restrict Gemini to domain-specific answers with a well-crafted system instruction
WHY THIS MODULE

The automation engineer who can use AI to generate test scenarios, summarise test results, and build small internal tools is significantly more productive than one who can't. The Gemini API is free to start, takes 10 minutes to connect, and the Streamlit interface means you can turn an AI script into a shareable team tool in an afternoon. This is not a future skill — QA teams are using it right now.

MODULE 02
AI Workflow Automation with n8n
Google Forms/Sheets, n8n Docker, Gemini node, Gmail node, scheduling

n8n connects apps through a visual node editor — no custom integration code for each service. You build a pipeline once and it runs automatically: form submitted → data collected → AI analyses it → email sent.

Core Topics
  • n8n setup: docker run -d -p 5678:5678 -v ~/.n8n:/home/node/.n8n n8nio/n8n; access at localhost:5678
  • Google Cloud Console: create project, enable Sheets API + Gmail API, create OAuth2 Client ID
  • Google Sheets trigger node: poll for new rows, extract {{ $json.Name }} and {{ $json.Question }}
  • Gemini AI node: send prompt, receive response at {{ $json.content.parts[0].text }}
  • Gmail node: send HTML email with merged fields from Sheets + Gemini response
  • IF node: conditional branching — route based on field values
  • Cron trigger: schedule workflow runs at fixed intervals
WHY THIS MODULE

As an automation engineer, you'll often be asked to connect things that don't naturally talk to each other — "Can we auto-notify Slack when the nightly test run fails?" or "Can we send AI-generated summaries of new bug reports to the team?" n8n makes these pipelines visual and maintainable. It's also the fastest way to prototype an AI-powered workflow — what would take hours of Python code takes 15 minutes in n8n.

MODULE 03
AI in Testing & Vibe Coding
Scenario generation, vibe coding, Playwright MCP, agentic AI

AI is changing how test automation code gets written. This module teaches you to use AI as a genuine productivity multiplier — from generating test scenarios to writing Playwright scripts to controlling a live browser via MCP.

Core Topics
  • AI test scenario generation: prompt engineering to produce Given/When/Then output from a requirements document
  • AI test data generation: boundary values, invalid inputs, edge cases — on demand
  • Vibe coding workflow: natural language description → AI-generated Playwright script → human review → refine
  • AI for legacy code: paste a function, ask for an explanation, trace logic without reading every line
  • AI for root-cause analysis: paste a failing traceback, receive a structured explanation + fix suggestion
  • MCP — Model Context Protocol: standardised interface connecting AI models to external tools and services
  • Playwright MCP setup: install @playwright/mcp, configure in VS Code, connect to Claude/Gemini Copilot Chat
  • Agentic AI: orchestrator model delegates to specialised sub-agents; observe the full flight → payment → email agent pipeline
WHY THIS MODULE

Vibe coding is not about replacing your skills — it's about multiplying your speed. An engineer who can describe a test scenario in plain English and have an AI produce a working Playwright script in seconds still needs to understand what the script is doing and whether it's correct. This module teaches both sides: how to accelerate with AI, and how to maintain the critical eye that catches hallucinated selectors and missing assertions before they reach production.

MODULE 04
smolagents & Healenium
Autonomous AI agents + self-healing Selenium selectors

The final module combines two powerful capabilities: Healenium makes your Selenium tests self-repairing when a website changes, and smolagents gives you a lightweight framework for building autonomous AI agents that can act independently toward a goal.

Core Topics
  • AI Agent vs Agentic AI: single-task tool (Gemini email agent) vs multi-step orchestrator (smolagents pipeline)
  • HuggingFace smolagents: pip install "smolagents[toolkit]", define tools with @tool decorator
  • Agent loop: CodeAgent generates Python → executes → observes result → decides next step → repeats until goal met
  • Healenium architecture: ML-powered proxy sits between your test code and ChromeDriver — records DOM snapshots, recovers on failure
  • Docker setup: docker-compose up -d pulls healenium-backend + healenium-selector-imitator + PostgreSQL
  • Replace ChromeDriver() with SelfHealingDriver(ChromeDriver(), config) — one-line change, full self-healing
  • Dashboard: localhost:8085/healenium/report — healed element count, old XPath vs new XPath, screenshot diff
  • When to use agentic vs scripted: scripted = predictable flows; agentic = exploratory, adaptive, new-page scenarios
WHY THIS MODULE

Test maintenance is the hidden cost that makes automation teams scale back their suite. Every front-end release breaks selectors. Healenium removes most of that burden — your tests stay green even as the UI evolves, and the dashboard tells you exactly what changed. Combined with smolagents, you're building toward a future where an agent can walk through a feature it has never seen before, observe what the page does, and report whether it works correctly.

Interview Preparation

What is MCP and Playwright MCP?

Model Context Protocol is an open standard for connecting AI models to external tools. Playwright MCP specifically gives Claude or Gemini direct browser control — navigate, click, fill forms, screenshot, read DOM — making it a genuine agentic browser automation tool rather than just a code generator.

What did you build with the Gemini API?

A stateless Q&A chatbot, a stateful chatbot with chat.history, a Streamlit web interface, and a fully automated AI agent that reads questions from Excel with openpyxl, queries Gemini, and emails answers via Gmail SMTP — no human intervention between question and answer.

How does Healenium work technically?

Healenium proxies between SelfHealingDriver and ChromeDriver. On first run it records DOM snapshots of each element in a PostgreSQL store. When a locator fails later, it uses a tree-similarity algorithm against stored snapshots to find the best match, updates the locator, continues the test, and logs the change in the dashboard.

What is vibe coding in practice?

In practice: open Playwright MCP in VS Code, describe the test in Copilot Chat ("log in with these credentials and verify the dashboard loads"), receive generated Playwright code, read it carefully for correctness, then refine. The AI writes the scaffold; you ensure correctness, add edge cases, and integrate it into the framework.

What does smolagents' CodeAgent do differently?

CodeAgent doesn't just call a single tool — it generates actual Python code as its action at each step of the agent loop. It executes the code, observes the output, then decides what Python to generate next. This makes it flexible enough to handle tasks that weren't explicitly scripted.

When would you use n8n over Python code?

Use n8n when connecting pre-existing services (Google Sheets, Gmail, Slack, GitHub) with standard data flows — it handles OAuth, retries, and error workflows out of the box. Write Python when you need custom logic, complex data transformations, or tight integration with your existing pytest/Selenium codebase.