

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
1# E2E23This package contains Dify's repository-level Cucumber scenarios with Playwright as the browser layer. This file owns current package architecture, runtime, session and tag semantics, seed, protocol, and cleanup contracts. The repo-local `e2e-cucumber-playwright` skill owns authoring and review methodology; feature-specific facts belong in the nearest feature `AGENTS.md`.45## Commands67Run commands from the repository root. Install dependencies and browsers once with `pnpm install` and `pnpm -C e2e e2e:install`. Run only one local `pnpm -C e2e e2e*` process at a time because runners share ports, auth state, and log paths.89- Existing initialized instance: `pnpm -C e2e e2e`10- Standalone automated WCAG Level A scan: `pnpm -C e2e e2e:accessibility:a`11- Standalone automated WCAG Level AA scan: `pnpm -C e2e e2e:accessibility:aa`12- One-page automated WCAG scan: `pnpm -C e2e exec tsx ./scripts/run-cucumber.ts --full -- --tags "@axe and @wcag-a and @wcag-page-studio"` (replace the level and page tag as needed)13- Reset, initialize, and run deterministic scenarios: `pnpm -C e2e e2e:full`14- Prepare and run scenarios backed by shared fixtures: `E2E_START_AGENT_BACKEND=1 pnpm -C e2e e2e:prepared`15- Tagged subset: `pnpm -C e2e e2e -- --tags @smoke`16- Headed debugging: `pnpm -C e2e e2e:headed -- --tags @smoke`17- Prepare and run external runtime scenarios: `E2E_START_AGENT_BACKEND=1 pnpm -C e2e e2e:external`18- Seed against existing middleware without running Cucumber: `pnpm -C e2e seed -- --profile <prepared|external-runtime|post-merge>`19- Reset persisted E2E state: `pnpm -C e2e e2e:reset`20- Middleware lifecycle: `pnpm -C e2e e2e:middleware:up` and `pnpm -C e2e e2e:middleware:down`21- Scoped static checks: `vp check e2e`2223The runner reuses `web/.next/BUILD_ID` when present. Set `E2E_FORCE_WEB_BUILD=1` to force a frontend rebuild. Use `E2E_BROWSER=webkit` for focused cross-browser runs and `E2E_SLOW_MO=500` with a headed command for local action debugging.2425## Runtime Ownership2627- `scripts/setup.ts` owns reset, middleware, backend, and frontend startup.28- `scripts/run-cucumber.ts` is the only E2E runtime orchestrator. It owns service lifetime, optional seed execution, Cucumber invocation, and teardown.29- `scripts/seed-runner.ts` owns fixture creation and verification against an already-running runtime; it never starts services.30- `support/web-server.ts` owns frontend reuse, readiness, and shutdown.31- `features/support/hooks.ts` owns shared auth bootstrap, scenario lifecycle, and diagnostics.32- `features/support/world.ts` owns `DifyWorld`, the per-scenario behavior `BrowserContext`, and its authenticated setup and cleanup client. Browser and API identities remain separate so unauthenticated and logout journeys cannot invalidate fixture ownership.33- Cross-actor scenarios keep each actor in a separate `BrowserContext` and typed `DifyWorld` state so diagnostics and cleanup cover every actor.34- `features/step-definitions/` contains capability-oriented glue; `common/` is reserved for genuinely cross-capability steps.35- Step definitions that access World state use `async function (this: DifyWorld, ...)`; arrow functions cannot receive Cucumber's bound World instance.3637An uninitialized instance is installed and authenticated lazily; an initialized instance signs in and reuses authenticated state. Full runs prove reset and bootstrap during setup rather than through a Gherkin scenario. Cucumber's exit status is the behavior gate, and the runner also requires at least one `testCaseStarted` message so an empty tag selection cannot pass. Do not replace this gate with scenario-count baselines or skipped-scenario allowlists.3839## Tags And External Runtime4041- Default scenarios use shared authenticated storage state. `@unauthenticated` creates a clean context; `@authenticated` is an intent and selection tag only.42- `@axe` identifies standalone automated WCAG scans and is excluded from the default functional suite and normal CI commands. `@wcag-a` and `@wcag-aa` qualify the independent level-specific scans, and commands selecting either level must also select `@axe`. Page selectors use `@wcag-page-<slug>` and are attached to the matching Examples blocks under `features/accessibility/`. The accessibility workflow is an opt-in manual audit rather than a regression gate. The PR author should run the AA/all path before merge when changing the audit workflow, page matrix, or readiness contracts.43- `@prepared` requires the prepared fixtures; the post-merge seed profile includes them.44- `@external-model` and `@external-tool` identify scenarios that call real external runtimes. Deterministic commands exclude these tags; external commands are opt-in.45- `@microphone` uses the checked-in fake audio fixture and an isolated Chromium context.46- `@browser-smoke` runs focused keyboard and navigation coverage in Chromium and WebKit CI lanes.47- `@skip` temporarily excludes a scenario from every runner profile. Remove it as soon as the covered product behavior is available again; do not use it for permanent or environment-dependent suppression.48- Feature-owned services use their own tags. Agent v2 runtime scenarios use `@agent-backend-runtime` and require the explicit runtime-availability step. Set `E2E_START_AGENT_BACKEND=1` to start it locally, or provide `E2E_AGENT_BACKEND_URL` / `AGENT_BACKEND_BASE_URL`.4950Seed and Cucumber must share one runtime lifecycle. Combined commands own reset, middleware, services, seed, Cucumber, and teardown; CI must not reproduce that lifecycle in workflow YAML. `E2E_START_AGENT_BACKEND=1` starts a managed local backend before the API; it is mutually exclusive with an explicit Agent backend URL.5152Do not overload runtime tags to imply unrelated services or silently skip behavior when a required fixture is missing.5354## Browser, API, And Contract Boundaries5556The action under test belongs to the browser. APIs may prepare fixtures, poll persistence, and clean up; they do not replace the user's `When` action. Prefer a user-observable browser result unless persisted backend state is the contract under test.5758For ordinary Console JSON and representable multipart operations, use the scenario- or process-owned generated oRPC client with request and response validation enabled. Call generated operations directly. Do not add handwritten endpoint URLs, duplicate DTOs or schemas, response casts, one-to-one forwarding wrappers, mutable cross-scenario clients, or TanStack Query caching.5960Keep helpers only when they own fixture construction, multi-operation orchestration, cleanup registries, invariants, eventual-consistency polling, narrowed test views, or a protocol adapter. SSE, binary downloads, redirect-only flows, external services, and infrastructure readiness may use centralized adapters under their real owner.6162Validation failures are contract failures. Trace them to the backend schema owner, update `api/controllers/API_SCHEMA_GUIDE.md` contracts when required, regenerate `@dify/contracts`, and keep the scenario aligned with the product's real state owner. Do not disable validation or add fallback schemas to make E2E pass.6364## Seeds, Cleanup, And Diagnostics6566- Generate disposable resource names through `support/naming.ts` with an `E2E` prefix.67- Keep deterministic upload material in `fixtures/test-materials/` and resolve it through `support/test-materials.ts`.68- Seed scripts own shared long-lived fixtures; scenarios own disposable resources they create and must register cleanup.69- Use typed `DifyWorld` cleanup fields for known resource types and `registerCleanup(...)` for additional lifecycle owners. Registered callbacks run LIFO after typed cleanup queues.70- Remove child and referencing resources before owners. Attach cleanup failures to the report instead of swallowing them.7172Failures produce screenshots and HTML captures under `cucumber-report/artifacts/`; the HTML and Cucumber Messages reports live under `cucumber-report/`. Backend and frontend startup logs live under `.logs/`. Additional CI lanes preserve their own report and log directories.73
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| langgenius/difyweb/features/agent-v2/AGENTS.md · 152k | AGENTS.md | agent-behaviour | 16/100 | today | |
| langgenius/difycli/src/commands/AGENTS.md · 152k | AGENTS.md | testlint-formatagent-behaviour | 74/100 | 14 days ago | |
| langgenius/difyapi/AGENTS.md · 152k | AGENTS.md | apiagent-behaviour | 54/100 | 14 days ago | |
| langgenius/difycli/AGENTS.md · 152k | AGENTS.md | testtypestesting-strategy | 58/100 | 14 days ago | |
| langgenius/difydify-agent/AGENTS.md · 152k | AGENTS.md | styleagent-behaviour | 58/100 | 14 days ago | |
| langgenius/difye2e/features/agent-v2/AGENTS.md · 152k | AGENTS.md | setupbuildtesting-strategyapi+1 | 58/100 | 14 days ago | |
| langgenius/difyweb/AGENTS.md · 152k | AGENTS.md | teststyletesting-strategyui+1 | 47/100 | today | |
| langgenius/difypackages/dify-ui/AGENTS.md · 152k | AGENTS.md | stylesecurityuido-not | 50/100 | today | |
| langgenius/difyAGENTS.md · 152k | AGENTS.md | no sections | 40/100 | 11 days ago |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| n8n-io/n8npackages/@n8n/agents/AGENTS.md · 201k | AGENTS.md | buildteststylearch+3 | 100/100 | 14 days ago | |
| aaif-goose/gooseAGENTS.md · 53k | AGENTS.md | setupbuildtestlint-format+7 | 100/100 | 8 days ago | |
| duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70 | AGENTS.md | buildteststylearch+3 | 100/100 | 14 days ago | |
| deepseek-ai/deepseek-harnessnative/landlock-run/AGENTS.md · 104k | AGENTS.md | setupteststylearch+3 | 100/100 | today | |
| code-yeongyu/oh-my-openagentpackages/web/AGENTS.md · 68k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 13 days ago | |
| TryGhost/Ghoste2e/AGENTS.md · 55k | AGENTS.md | setupteststylearch+2 | 100/100 | today | |
| mui/material-uiAGENTS.md · 99k | AGENTS.md | setupbuildtestlint-format+9 | 100/100 | 14 days ago | |
| elastic/elasticsearchx-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/AGENTS.md · 78k | AGENTS.md | buildtestlint-formatstyle+2 | 100/100 | 14 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/langgenius-dify-e2e-agents)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.