
Testing Course Samples
Runs the course notebooks and code samples against a live Foundry or Azure OpenAI setup.
Install
npx skills add microsoft/ai-agents-for-beginners --skill testing-course-samples -g -a claude-code -y- Repository
- microsoft/ai-agents-for-beginners78.6k
- Category
- Testing
- Updated
- 5d ago
- License
- MIT
- Context cost
- Lightabout 1,005 tokens
- Runs scripts
- No, instructions only
What it does
Use when asked to validate, test, smoke-test, or run the course's notebook and code samples against a live Microsoft Foundry / Azure OpenAI configuration. Covers environment setup (.env, az login, packages), the scripts/validate-notebooks.ps1 runner, interpreting PASS/FAIL results, and which lessons need extra resources (Azure AI Search, GitHub MCP, Foundry Local, Playwright).
Testing the Course Samples
Validate that the lesson notebooks and code samples run against a live
Microsoft Foundry / Azure OpenAI setup. The repo ships a runner at
scripts/validate-notebooks.ps1 that
executes every Python notebook headlessly and prints a PASS/FAIL matrix.
When to use
- "Validate all the notebooks / samples against my Azure subscription."
- "Smoke-test the course after upgrading packages or changing models."
- "Which lessons still pass / fail live?"
Do not use this for the AI Smoke Test GitHub Action (that validates deployed
hosted agents, see tests/README.md). This skill
runs the notebooks locally.
Prerequisites (check first)
- Python 3.12+ with course deps:
python -m pip install -r requirements.txtplus the executor:python -m pip install nbconvert ipykernel. .envat the repo root (copy from.env.example) with at least:AZURE_AI_PROJECT_ENDPOINT, Foundry project endpoint (https://<account>.services.ai.azure.com/api/projects/<project>)AZURE_AI_MODEL_DEPLOYMENT_NAME, a non-deprecated deployment (e.g.gpt-5-mini)AZURE_OPENAI_ENDPOINT(https://<account>.openai.azure.com) andAZURE_OPENAI_DEPLOYMENTfor lessons that call Azure OpenAI directly (Lesson 06, 02-azure-openai, 14 handoff/human-loop).
az logincompleted, samples authenticate withAzureCliCredential(Entra ID, keyless).- Verify the model deployment exists:
az cognitiveservices account deployment list -g <rg> -n <account> -o table.
Running the validation
# All Python notebooks (skips .NET, .venv, site-packages, translations, skill assets)
pwsh scripts/validate-notebooks.ps1
# A single lesson, with a longer per-cell timeout
pwsh scripts/validate-notebooks.ps1 -Filter '08-*' -Timeout 600
# Just list what would run (no execution)
pwsh scripts/validate-notebooks.ps1 -List


