OroCommerce v6.1 End-to-End Behat Testing
E2e drives a real browser against a deployed application: no isolators, Mink + ChromeDriver only. The load-bearing distinction is the flag:
--skip-isolators— pure e2e. No DB, cache or container isolation, no fixture loading, no direct service calls. A step definition that calls a service rather than the browser fails here unless that service is reachable.--skip-isolators-but-load-fixtures— hybrid. Fixture loader stays active. NeedsORO_DB_DSNat the remote DB and local migrations exactly matching the deployed version; a mismatch produces silent garbage data.
Hero behat.yml
Import behat.yml.dist, point MinkExtension.base_url at the deployed host, give the artifact handler auto_clear: false so screenshots survive. Full block: references/v6.1.md.
ChromeDriver must use Oro's expected endpoint, not selenium-standalone's:
chromedriver --url-base=wd/hub --port=4444
Running Tests
php bin/behat --skip-isolators -- path/to/feature.feature # pure e2e
php bin/behat --skip-isolators-but-load-fixtures -- path/to/feature.feature # + Alice fixtures
composer require oro/e2e-tests --dev -n # pre-built scenarios + .behat-secrets.yml.dist
php bin/behat --skip-isolators -- vendor/oro/e2e-tests/Tests/Behat/Features/create_mailchimp_integration.feature
Secrets, healers, watch mode
Credentials sit in .behat-secrets.yml at the application root, referenced as <Secret:login.username>. Never commit it — the oro/e2e-tests package ships a .dist template (secret-management.md).
Reload Page Healer is on by default, OpenAI Healer is opt-in, custom healers implement HealerInterface with the oro_test.behat.healer tag (self-healing.md). Watch mode pauses on error with a "continue from line N" prompt (watch-mode.md).
Key Pitfalls
- Running e2e without
--skip-isolators— the isolators try to manage DB state on the remote app: dropping schema, loading fixtures, clearing caches. At best the run aborts; at worst it mutates the target silently. .app-env.localvs.env-app.test.local— Oro's own docs disagree: the e2e pages use the first forORO_DB_DSN, the functional-test pages the second. Pick wrong and the DSN is not read; the fixture loader silently falls back to no DB (remote-db.md).- Committing
.behat-secrets.yml— once in git history, rotation is the only remedy..gitignoreit; commit only the.dist. - Local source mismatch under
--skip-isolators-but-load-fixtures— the loader runs locally and writes to the remote DB, so differing migrations put rows in columns that do not exist or skip ones that do. Fixtures appear to load and assertions fail later with baffling data. Check out the deployed tag. - Production runs against real customer accounts — e2e mutates state permanently and there is no rollback. Use dedicated test users, customers and orders.
See Also
In references/: secret-management.md · self-healing.md · remote-db.md (the env-file conflict, ORO_DB_DSN) · watch-mode.md · v6.1.md (ChromeDriver, artifact handlers) · v7.0.md
Isolated local Behat: oro-behat-testing. Failing steps: oro-behat-debugging.