Skip to content

Commit b266fa3

Browse files
authored
Add Functional test example in README (#71)
1 parent 2f6dd56 commit b266fa3

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
## Overview
99

10+
Makes it easy to run Functional, FunctionalJavascript, and Nightwatch tests in DDEV.
11+
1012
This service can be used with any project type. The examples below are Drupal-specific. Contributions for docs and tests that show this service working with other project types are appreciated.
1113

1214
## Installation
@@ -15,6 +17,10 @@ This service can be used with any project type. The examples below are Drupal-sp
1517
ddev add-on get ddev/ddev-selenium-standalone-chrome
1618
ddev restart
1719
```
20+
Functional and FunctionalJavascript tests require the `drupal/core-dev` Composer package or equivalent:
21+
```bash
22+
ddev composer require drupal/core-dev
23+
```
1824

1925
> [!NOTE]
2026
> Run `ddev add-on get ddev/ddev-selenium-standalone-chrome` after changes to `name`, `additional_hostnames`, `additional_fqdns`, or `project_tld` in `.ddev/config.yaml` so that `.ddev/docker-compose.selenium-chrome_extras.yaml` is regenerated.
@@ -29,9 +35,10 @@ After installation, make sure to commit the `.ddev` directory to version control
2935

3036
## Usage
3137

32-
- Your project is now ready to run FunctionalJavascript and [Nightwatch](https://www.drupal.org/docs/automated-testing/javascript-testing-using-nightwatch) tests from Drupal core, or [Drupal Test Traits](https://gitlab.com/weitzman/drupal-test-traits) (DTT). All these types are tested in this repo. Some examples to try:
38+
- Your project is now ready to run [Functional](https://mglaman.dev/blog/do-you-need-functional-test), FunctionalJavascript and [Nightwatch](https://www.drupal.org/docs/automated-testing/javascript-testing-using-nightwatch) tests from Drupal core, or [Drupal Test Traits](https://git.drupalcode.org/project/dtt) (DTT). Some examples to try:
39+
- Functional:
40+
- `ddev exec -d /var/www/html/web "../vendor/bin/phpunit -c ./core/phpunit.xml.dist ./core/modules/migrate/tests/src/Functional/process/DownloadFunctionalTest.php"`
3341
- FunctionalJavascript:
34-
- Ensure you have the `drupal/core-dev` Composer package or equivalent.
3542
- `ddev exec -d /var/www/html/web "../vendor/bin/phpunit -c ./core/phpunit.xml.dist ./core/modules/system/tests/src/FunctionalJavascript/FrameworkTest.php"`
3643
- Nightwatch
3744
- `ddev exec -d /var/www/html/web/core yarn install` (do this once)

0 commit comments

Comments
 (0)