Testing AI & LLM Applications
Get unlimited access to all learning content and premium assets Membership Pro
Every summary number went up. It was a regression, and the summary is why nobody saw it.
A hundred and sixty-six lessons and a capstone. Thirty-one hours and twenty-eight minutes. Python throughout, taught from scratch.
Who this is for
Testers whose company has just shipped something with a model behind it, and who have been handed it with no idea what “passing” would even mean. And automation engineers who tried assertEquals once, watched it go red for no reason, and have been improvising since.
Why your existing tools stop working, in one number
Run the same input twice. You get two different answers — not occasionally, as a flake to be retried away, but as the normal behaviour of the thing.
Twenty runs of one case in this repository produce nineteen distinct outputs. The only two that match are run one and itself.
So the first thing to go is equality. Everything you know about a red test meaning a broken product goes with it, and this course is about what replaces them.
The reason this course exists, in one number
Here is a prompt change. Somebody tightened the instructions — asked for stricter JSON, a word limit, and a clear refusal when a request is not about the customer’s own order. Sensible. Here is the eval run, before and after:
| | before | after | |—|—|—| | mean pass rate | 0.862 | 0.871 | | strict JSON | 0.948 | 0.971 |
Every number improved. Ship it.
Except two cases lost 0.375 each — a third of their pass rate — and they are the two borderline ones, the requests that sit closest to the line the new instruction drew. Two cases got better, two got worse, eight did not move, and the average went up because there were more of the first kind.
The mean did not lie. It answered a different question from the one being asked, and the question being asked was “did anything get worse”.
A second one, because it is the half that decides whether your CI is worth having: the same two prompts, put behind a per-case gate. The stricter prompt fails the gate while having the higher overall pass rate — 0.880 against 0.845. A gate on the average would have passed it. A gate per case does not, and that is the entire design decision.
What you will be able to do
- Say what an eval is, and how it differs from a test, without hand-waving
- Build an eval set from real usage, and know why nobody can tell you how many cases is enough
- Write the checks that still work on a non-deterministic output — schema, format, constraints, refusal — and know what each one cannot see
- Use similarity scoring, and recognise the failure no threshold reaches
- Run an LLM as a judge, with a rubric, and know exactly what it is blind to
- Measure agreement between two human reviewers, and report it honestly
- Test retrieval and generation separately, because one number hides which half broke
- Test tool-calling by the trace, not the reply
- Run injection and jailbreak cases, and report what is still open
- Put all of it in CI behind a gate that fails for a reason you can defend
What you will build
An eval suite and the gate that guards it, against a feature whose output is different every time — and a gate on the average fails the assignment.
Your suite is run against nine prompt versions, of which you have seen one. One is genuinely better and must ship. One improves every summary figure by almost exactly as much — and quietly costs two borderline cases a third of their pass rate each. That one must stop. A third is the same prompt in other words at another seed, and stopping that is a failure too, because a gate that fires on noise gets switched off in a week.
There is no single threshold that gets all of them right, and that is measured rather than asserted.
Requirements
A computer and an editor. Python is taught from scratch — fifty-two lessons of it, the language, its tooling and pytest — so nothing is assumed.
No API key. No account. No bill. Every measurement in this course runs offline against committed sandboxes: 106 assertions behind the evals half, and a stand-in model that is honest about being one. Your numbers are the same as everybody else’s, and nothing stops working when a free tier ends.
What this course is not
It is not a course about building AI features, and it will not make you a machine learning engineer.
It does not claim to tell you how a real model behaves. The stand-in reproduces the things that break tests — non-determinism, format drift, partial instruction-following — and reproduces none of the things that make a model interesting: it has no semantics, it cannot be wrong in a way nobody anticipated, and every rate in it is a dial set to make an effect visible in twenty runs. The rule is stated on camera in the second lesson and holds for the whole course: a claim about how a test behaves is safe; a claim about how a model behaves is not. The relationships between these numbers are the teaching. The numbers themselves are not findings about anybody’s product.
It also does not pretend prompt injection is solved. Six channels, a competent defence, and not one of them closed.
And it will not tell you an LLM judge is reliable. The judge in this repository is four regexes built to be fooled, and it says so in its own header. What is demonstrated is structural and survives substituting the best judge that exists: a scorer given the answer and not the ground truth cannot check one against the other.
How it is taught
Foundations first, genuinely from scratch: what testing is for, how work moves, HTTP, git, and the whole Python language with pytest before a model appears.
Then the models themselves — what they are doing, and how they fail. Then the discipline: eval sets, deterministic checks, scoring, judges, human review, regression, RAG, tool-calling, injection, safety, budgets, flake gates, CI and production monitoring.
Every claim in the AI half is either measured in a committed sandbox you can re-run, or labelled on camera as something the course does not prove.
- 15 Sections
- 166 Lessons
- 10 Weeks
- IntroductionHow the course is put together, and the application you will work against.2
- 1. Foundations — QA & Test Design FoundationsWhat testing is for, and how to choose what to test. No tool, no code.14
- 2.1What quality actually means, and who owns it9 Minutes
- 2.2Manual, automated, and what automation cannot do10 Minutes
- 2.3Test levels: unit, integration, system, end-to-end11 Minutes
- 2.4The test pyramid, the testing trophy, and when each is wrong12 Minutes
- 2.5Functional vs non-functional testing9 Minutes
- 2.6Equivalence partitioning10 Minutes
- 2.7Boundary value analysis10 Minutes
- 2.8Decision tables and state transition testing12 Minutes
- 2.9Pairwise and combinatorial testing10 Minutes
- 2.10Exploratory testing and charters10 Minutes
- 2.11Risk-based test selection: what to automate first12 Minutes
- 2.12Writing a test case that survives a handover10 Minutes
- 2.13Bug reports that get fixed11 Minutes
- 2.14Entry and exit criteria, definition of done9 Minutes
- 1. Foundations — How Software Gets Built: SDLC, Agile & FlowWhere testing sits in the way work actually moves. No tool, no ceremony theatre.6
- 3.1How software gets built: waterfall, V-model, iterative11 Minutes
- 3.2Where testing sits, and why it moved left10 Minutes
- 3.3Scrum from a tester’s seat12 Minutes
- 3.4Kanban, flow, and work in progress10 Minutes
- 3.5Refinement: asking the question before the code exists11 Minutes
- 3.6When the process is the problem10 Minutes
- 1. Foundations — HTTP & API FundamentalsProtocol-level knowledge shared by every API course in every language.14
- 4.1Client, server, and the request/response cycle9 Minutes
- 4.2URLs, paths, query strings, and path parameters10 Minutes
- 4.3HTTP methods and what each one promises11 Minutes
- 4.4Status codes: the ones that actually matter in tests11 Minutes
- 4.5Request and response headers11 Minutes
- 4.6JSON: structure, types, and reading a payload10 Minutes
- 4.7REST: resources, representations, idempotency12 Minutes
- 4.8Authentication: basic, bearer tokens, API keys12 Minutes
- 4.9OAuth 2.0 flows a tester will meet13 Minutes
- 4.10Cookies, sessions and CSRF11 Minutes
- 4.11OpenAPI/Swagger: reading a spec as a test source13 Minutes
- 4.12GraphQL primer for testers11 Minutes
- 4.13SOAP and XML: what still exists and why9 Minutes
- 4.14Designing API test cases from a spec12 Minutes
- 1. Foundations — Git & GitHub for QAUsed by all 53 courses. Also the module that produces the student's portfolio.16
- 5.1Why version control, and what a repository is8 Minutes
- 5.2Installing Git and first-time configuration9 Minutes
- 5.3The three states: working tree, staging area, repository10 Minutes
- 5.4add, commit, log, and writing a useful commit message12 Minutes
- 5.5Ignoring files: .gitignore for test projects9 Minutes
- 5.6Branching and switching11 Minutes
- 5.7Merging, and resolving your first conflict13 Minutes
- 5.8Rebase vs merge, and when each is safe12 Minutes
- 5.9Remotes: clone, fetch, pull, push12 Minutes
- 5.10Pull requests and code review as a tester13 Minutes
- 5.11Tags and releases8 Minutes
- 5.12Undoing things: restore, reset, revert, reflog14 Minutes
- 5.13Stash, cherry-pick and interactive rebase basics12 Minutes
- 5.14Branching strategies: trunk-based vs GitFlow10 Minutes
- 5.15GitHub repo hygiene: README, structure, badges11 Minutes
- 5.16Building a QA portfolio repository that gets you hired12 Minutes
- 2. Language & toolchain — Python Core for AutomationQA-scoped. Everything needed to write and read a pytest framework.26
- 6.1Installing Python and managing versions9 Minutes
- 6.2PyCharm and VS Code setup for test projects12 Minutes
- 6.3Your first script, and running it9 Minutes
- 6.4Variables, numbers, and dynamic typing11 Minutes
- 6.5Strings and f-strings12 Minutes
- 6.6Type hints: why a tester should use them12 Minutes
- 6.7Booleans, comparisons and truthiness10 Minutes
- 6.8Conditionals and match statements11 Minutes
- 6.9Loops, range, enumerate, zip12 Minutes
- 6.10Functions, arguments, defaults, *args and **kwargs14 Minutes
- 6.11Lists and list methods12 Minutes
- 6.12Tuples and unpacking9 Minutes
- 6.13Dictionaries12 Minutes
- 6.14Sets9 Minutes
- 6.15Comprehensions12 Minutes
- 6.16Modules, packages and imports12 Minutes
- 6.17Classes, __init__ and instance attributes13 Minutes
- 6.18Methods, properties and class attributes12 Minutes
- 6.19Inheritance and super()12 Minutes
- 6.20Dunder methods worth knowing11 Minutes
- 6.21Dataclasses for test data11 Minutes
- 6.22Enums9 Minutes
- 6.23Exceptions: try, except, raise, custom exceptions14 Minutes
- 6.24Context managers and with11 Minutes
- 6.25Files, paths and pathlib11 Minutes
- 6.26JSON, CSV and YAML in Python13 Minutes
- 2. Language & toolchain — uv, pip & Project Toolinguv is the 2026 default; pip and Poetry covered for existing projects.10
- 7.1Python packaging: the problem it solves9 Minutes
- 7.2uv: install, run, and why it replaced the old stack12 Minutes
- 7.3uv: projects, lockfiles and reproducible installs13 Minutes
- 7.4pyproject.toml explained12 Minutes
- 7.5pip and requirements.txt for legacy projects11 Minutes
- 7.6Poetry: what it does differently10 Minutes
- 7.7Managing Python versions per project11 Minutes
- 7.8Dependency pinning and upgrade strategy11 Minutes
- 7.9Running your suite from the command line10 Minutes
- 7.10tox and nox for multi-environment runs11 Minutes
- 2. Language & toolchain — pytestThe single most important Python module in the catalog.16
- 8.1Why pytest won9 Minutes
- 8.2First test, discovery rules and naming12 Minutes
- 8.3The assert statement and assertion rewriting11 Minutes
- 8.4Fixtures: the core idea14 Minutes
- 8.5Fixture scopes: function, class, module, session13 Minutes
- 8.6conftest.py and fixture discovery13 Minutes
- 8.7Yield fixtures, setup and teardown12 Minutes
- 8.8Parametrize: data-driven tests done right14 Minutes
- 8.9Indirect parametrization and fixture params12 Minutes
- 8.10Markers, custom markers and selection13 Minutes
- 8.11Skipping, xfail and conditional execution11 Minutes
- 8.12pytest.ini / pyproject configuration11 Minutes
- 8.13Command-line options every tester should know12 Minutes
- 8.14pytest-xdist: parallel execution12 Minutes
- 8.15Hooks and writing a small plugin13 Minutes
- 8.16Structuring a large pytest suite12 Minutes
- 3. Core automation — LLM Foundations for QAHow the models actually behave. Prerequisite for every other X module.12
- 9.1What a large language model is doing when it answers10 Minutes
- 9.2Tokens, context windows, and why long sessions drift11 Minutes
- 9.3Temperature, sampling and non-determinism10 Minutes
- 9.4Choosing a model: capability, speed and cost trade-offs11 Minutes
- 9.5Prompting patterns that work for engineering tasks13 Minutes
- 9.6Giving context: files, specs, examples, constraints12 Minutes
- 9.7Hallucination: what it looks like in generated tests12 Minutes
- 9.8Where an LLM is reliably useful in QA, and where it is not12 Minutes
- 9.9Tool use and agents: the mental model11 Minutes
- 9.10Reviewing AI output: a tester’s checklist12 Minutes
- 9.11Data, privacy and what you must not paste into a model10 Minutes
- 9.12Cost awareness: tokens, caching, and budget discipline10 Minutes
- 3. Core automation — Testing AI & LLM ApplicationsThe fastest-growing QA specialism, and almost nobody is teaching it.16
- 10.1Why you cannot test an LLM feature with assertEquals11 Minutes
- 10.2What an eval is, and how it differs from a test12 Minutes
- 10.3Building your first eval set from real usage14 Minutes
- 10.4Deterministic checks: schema, format, constraints12 Minutes
- 10.5Similarity and reference-based scoring12 Minutes
- 10.6LLM-as-judge: rubrics, calibration and its blind spots14 Minutes
- 10.7Human review workflows and inter-rater agreement11 Minutes
- 10.8Regression testing a prompt change13 Minutes
- 10.9Testing RAG: retrieval quality vs generation quality14 Minutes
- 10.10Testing tool-calling and agent behaviour13 Minutes
- 10.11Prompt injection and jailbreak testing14 Minutes
- 10.12Safety, bias and harmful-output testing12 Minutes
- 10.13Latency, cost and token budgets as test criteria11 Minutes
- 10.14Non-determinism: flake budgets and statistical gates12 Minutes
- 10.15Running evals in CI12 Minutes
- 10.16Monitoring an AI feature in production11 Minutes
- 4. Engineering practice — Test Data, Config & Environments8
- 11.1Environments: local, dev, staging, production9 Minutes
- 11.2Configuration strategy: files, env vars, profiles12 Minutes
- 11.3Secrets in test projects: what never goes in Git11 Minutes
- 11.4Static fixtures vs generated data11 Minutes
- 11.5Data builders and faker libraries11 Minutes
- 11.6Seeding and cleaning: keeping runs independent12 Minutes
- 11.7Test isolation and parallel-safe data12 Minutes
- 11.8Data-driven testing: the concept and its shapes12 Minutes
- 4. Engineering practice — CI/CD Foundations + GitHub ActionsPrimary CI for the whole catalog: it produces a green badge on the student's repo.14
- 12.1Continuous integration, delivery and deployment10 Minutes
- 12.2Where automated tests sit in a pipeline10 Minutes
- 12.3GitHub Actions: workflows, jobs, steps, runners12 Minutes
- 12.4Your first workflow: run tests on push12 Minutes
- 12.5Triggers: push, pull_request, schedule, manual11 Minutes
- 12.6Caching dependencies to keep runs fast11 Minutes
- 12.7Matrix builds: browsers, versions, operating systems13 Minutes
- 12.8Secrets, environments and protected variables12 Minutes
- 12.9Publishing test reports and artifacts12 Minutes
- 12.10Failing the build correctly: exit codes and required checks11 Minutes
- 12.11Scheduled regression runs and nightly suites10 Minutes
- 12.12Reusable workflows and composite actions12 Minutes
- 12.13Self-hosted runners: when and why10 Minutes
- 12.14Reading a failed pipeline like an engineer12 Minutes
- 4. Engineering practice — Flakiness, Waits, Retries & ParallelismThe module that separates a suite people trust from one they ignore.10
- 13.1What flakiness costs, and why suites get abandoned10 Minutes
- 13.2Sources of flakiness: timing, state, order, environment12 Minutes
- 13.3Implicit, explicit and fluent waits — and auto-waiting13 Minutes
- 13.4Never sleep: replacing fixed delays with conditions11 Minutes
- 13.5Retries: where they help and where they hide bugs12 Minutes
- 13.6Test independence and ordering11 Minutes
- 13.7Parallel execution: threads, workers, and shared state13 Minutes
- 13.8Sharding a suite across CI machines11 Minutes
- 13.9Quarantine, tagging and flaky-test triage process12 Minutes
- 13.10Diagnosing a flaky test: a live investigation14 Minutes
- CapstoneThe project this course is marked on.2
- AssessmentA question bank covering the whole course.1
Get unlimited access to all learning content and premium assets Membership Pro
You might be interested in
Stay Updated with New Courses
Get the latest courses and learning tips delivered to your inbox.