moodle-behat-testing

moodle-behat-testing is a skill for Claude Code from SaadRahman01/claude-moodle-dev. It costs 45 tokens per session (1,966 once invoked), scanned A, original, MIT.

A testing guide for Moodle plugins using Behat, a tool that drives a real web browser through user-like acceptance tests. Moodle is a learning platform, and acceptance tests check complete features through the interface.

In plain words
What is it for?
Use it to write or run Moodle feature files, define custom test steps, prepare test data, test JavaScript scenarios, and configure Selenium or another browser driver.
Why use it?
It explains how to test browser-based behavior, JavaScript interactions, sessions, cookies, and full request flows instead of only testing isolated code.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the moodle-dev plugin — 13 skills, 8 commands, 2 agents shipped together

Good fit Use it to write or run Moodle feature files, define custom test steps, prepare test data, test JavaScript scenarios, and configure Selenium or another browser driver.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/saadrahman01/claude-moodle-dev/moodle-behat-testing
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add SaadRahman01/claude-moodle-dev --skill moodle-behat-testing
Clone the repo
git clone --depth 1 https://github.com/SaadRahman01/claude-moodle-dev

Made for: Claude Code.

Or install moodle-dev, the plugin that ships this one along with the rest of its 13 skills, 8 commands, 2 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for moodle-behat-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/saadrahman01/claude-moodle-dev/moodle-behat-testing/github.svg)](https://agentmods.dev/skills/saadrahman01/claude-moodle-dev/moodle-behat-testing)
Your own site
<a href="https://agentmods.dev/skills/saadrahman01/claude-moodle-dev/moodle-behat-testing"><img src="https://agentmods.dev/badge/skills/saadrahman01/claude-moodle-dev/moodle-behat-testing/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for moodle-behat-testing

Your own site · 80×15
<a href="https://agentmods.dev/skills/saadrahman01/claude-moodle-dev/moodle-behat-testing"><img src="https://agentmods.dev/badge/skills/saadrahman01/claude-moodle-dev/moodle-behat-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,966 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00045 $0.01966
Opus 5 $0.00023 $0.00983
Sonnet 5 $0.00009 $0.00393
Haiku 4.5 $0.00005 $0.00197

Measured 9d ago against content hash 03204500ab2e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

moodle-behat-testing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/moodle-behat-testing/SKILL.md · 243 lines

How it starts

The opening of the file, as written. The whole thing — 243 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Moodle Behat Testing

Overview

Behat drives a real browser against a dedicated Moodle test site. Features live in <plugin>/tests/behat/*.feature. Custom steps go in tests/behat/behat_<component>.php extending behat_base. Moodle provides hundreds of built-in steps (login, course creation, navigation).

When to Use

  • Writing end-to-end / acceptance tests
  • Testing JavaScript-driven UI (drag-drop, modals, AJAX)
  • Reproducing bugs that need full request cycle + cookies + session
  • Adding scenarios to a plugin's regression suite

Skip when: writing unit tests for business logic — use moodle-phpunit-testing.

First-time setup

# config.php additions:
$CFG->behat_wwwroot   = 'http://localhost:8000';
$CFG->behat_dataroot  = '/var/moodledata_behat';
$CFG->behat_prefix    = 'beh_';

# Initialize test site:
php admin/tool/behat/cli/init.php

# Install + start a Selenium-compatible driver (one of):
docker run -d -p 4444:4444 selenium/standalone-chrome:latest
# or chromedriver, geckodriver

# Run:
vendor/bin/behat --config /var/moodledata_behat/behat/behat.yml \
  --tags @local_example

Feature file skeleton

@local_example @javascript
Feature: Mark attendance
  In order to track presence
  As a teacher
  I need to mark students present

  Background:
    Given the following "courses" exist:
      | fullname | shortname |
      | Maths    | M101      |
    And the following "users" exist:
      | username | firstname | lastname |
      | teacher1 | Tina      | Teach    |
      | student1 | Sam       | Student  |
    And the following "course enrolments" exist:
      | user     | course | role           |
      | teacher1 | M101   | editingteacher |
      | student1 | M101   | student        |

  Scenario: Teacher marks a student present
    Given I log in as "teacher1"
    And I am on "Maths" course homepage
    When I follow "Attendance"
    And I click on "Mark present" "button" in the "Sam Student" "table_row"
    Then I should see "1 present" in the "Today" "fieldset"

Read the full file on GitHub · 243 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 243 lines · 45 tokens per session scan A 03204500ab2e

Subscribe to this mod's changes

moodle-behat-testing is a skill published in the GitHub repository SaadRahman01/claude-moodle-dev (36 stars, last pushed 2mo ago), licensed MIT. It adds 45 tokens to every session and 1,966 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

testing-e2e

End-to-end testing patterns with Playwright — page objects, AI agent testing, visual regression, accessibility testing with axe-core, and CI integration. Use when writing E2E tests, setting up Playwright, implementing visual regression, or testing accessibility.

yonatangross/orchestkit · 55 tokens

design-ship

One-shot pipeline turning a claude.ai/design link into a pull request: scaffold via /ork:design-import, stories and specs via /ork:cover, browser verification via /ork:expect, then open the PR. Use when a design link should come back as a PR with no intermediate steps; if all you need is the components written to…

yonatangross/orchestkit · 84 tokens

testing-patterns

Redirect — testing-patterns was split into 5 focused sub-skills. Use when looking for testing-patterns, writing tests, or test automation. Redirects to testing-unit, testing-e2e, testing-integration, testing-llm, or testing-perf.

yonatangross/orchestkit · 59 tokens

playwright-automation

Browser automation and testing with Playwright. Use when testing web applications, automating browser tasks, taking screenshots, or validating UI behavior.

majiayu000/spellbook · 32 tokens

e2e-testing

ORGII keeps two separate E2E surfaces. Do not use one as proof for the other.

org2AI/ORG2 · 0 tokens

dual-instance-verification

Dual-instance (双机) real-machine verification protocol for ORG2 cloud sync and session sharing. Use before declaring any sharing/sync/collab feature or fix "verified": share/unshare, push/retract, fork/import, comments, member-floor, replay, continuation, or anything touching Org2CloudSyncEngine, collab engines, or the…

org2AI/ORG2 · 0 tokens