Recommended Free Tools
Automate Drupal testing by matching each behavior to the narrowest PHPUnit test layer that can verify it, running those tests locally, and then configuring CI to run them when code changes. Use unit tests for isolated PHP logic, kernel tests for code that needs Drupal’s bootstrapped runtime, functional tests for full-site behavior, and FunctionalJavascript tests when real browser interactions matter. For Drupal.org projects, current guidance is to use GitLab CI and start from the Drupal Association-maintained .gitlab-ci.yml template.
Choose the Drupal test layer that fits the behavior
Drupal documents four PHPUnit test layers. Prefer the least expensive layer that actually exercises the behavior: a broader test can verify more of the stack, but it also needs more infrastructure and usually takes longer.
| Layer | What it exercises | Good fit | Tradeoff |
|---|---|---|---|
| Unit | Isolated PHP logic with minimal dependencies | Pure logic and many input combinations | Does not exercise a booted Drupal site |
| Kernel | A bootstrapped Drupal kernel with selected extensions | Service, entity, or request behavior that needs some Drupal runtime | Applicable tests need database configuration; less of the site is available |
| Functional | A full Drupal instance through BrowserTestBase |
Routes, forms, permissions, and site behavior that does not depend on real JavaScript interaction | More setup and execution cost than isolated unit tests |
| FunctionalJavascript | A real browser driven through WebDriver | AJAX and actual JavaScript or browser behavior | Requires additional browser tooling and takes longer to execute |
Drupal advises using a non-JavaScript test layer when the behavior does not require JavaScript interaction. Kernel tests can be faster than full functional tests for some combinations of checks, but they have limitations, including session handling. See Drupal’s PHPUnit testing documentation and FunctionalJavascript guide.
Plan a suite before wiring up CI
- Inventory the behavior and its risk. Separate isolated logic, Drupal service or kernel behavior, complete user workflows, and browser-only interactions.
- Assign each case to the narrowest adequate layer. Keep fast, isolated checks in unit tests; add kernel or functional coverage only where the runtime is part of the behavior being verified.
- Reserve browser tests for browser-specific risk. Use FunctionalJavascript for behaviors such as AJAX or interactions whose correctness depends on actual JavaScript execution.
- Choose CI environments that reflect the project. Check the Drupal core branch and project dependencies for supported PHP, PHPUnit, database, and browser requirements before pinning versions or creating a matrix.
This structure keeps routine checks focused while retaining realistic coverage for the workflows that need Drupal or a browser.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →#1 Best Overall
Install development dependencies and configure PHPUnit
Install test dependencies
For Composer-based recommended projects, Drupal’s testing guide shows adding drupal/core-dev as a development dependency. For Git-based checkouts, install the Composer dependencies required by the project. Keep development dependencies off production servers.
Set up the project’s PHPUnit configuration
Configure Drupal’s bootstrap and test paths for the repository layout. Supply a test base URL and database connection where the selected test types require them, and make sure any browser-test output directory is writable. Drupal notes that core updates can overwrite a core/phpunit.xml file, so keep project-specific configuration in a deliberate location and verify it after core updates.
Rank #2
The correct working directory and executable path vary by project: modules or site modules may be run from Drupal’s core directory using the vendor PHPUnit executable. Follow the repository’s current configuration rather than copying paths from an unrelated project. Use the official Drupal PHPUnit execution guide for setup details.
Meet the environment requirements
- Kernel tests that use a database need valid database configuration.
- Browser-based functional tests need a database and a Drupal site reachable through a web server.
- FunctionalJavascript tests also need Chrome or Chromium and a compatible ChromeDriver or WebDriver service. Match the driver to the installed browser; Drupal’s sample version pins may be old and should not be copied without checking current compatibility.
Run tests locally and verify that they ran
Before adding a test command to CI, run it locally using the project’s PHPUnit executable and configuration. Use the command and paths documented for that repository; there is no single safe command line for every Drupal project layout.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Rank #3
- Read verbose output for skipped tests. An environment problem, such as a missing database, can cause a test not to execute even when the command itself appears to complete.
- For FunctionalJavascript tests, start the browser and matching driver service, then invoke PHPUnit directly as Drupal’s guide prescribes. Do not route JavaScript tests through
core/scripts/run-tests.shwhen ChromeDriver may not be running. - When a test is skipped, fix the missing prerequisite or report the skip explicitly in CI; do not treat a green command exit as proof that the intended assertion ran.
Automate Drupal.org project checks with GitLab CI
Drupal.org’s current project automation guidance uses GitLab CI. Put a .gitlab-ci.yml file at the repository root and begin with the Drupal Association-maintained template, then adapt it to the project’s test types and supported core, PHP, and database environments. Review any .dist configuration files in the repository because GitLab CI may consume configuration that DrupalCI previously ignored. DrupalCI-specific workflow guidance is retired; use the current GitLab CI documentation for Drupal.org projects.
Declare test dependencies in composer.json for maintained contributed projects so CI can install the dependencies required to run the tests. Set job triggers and test coverage to fit the repository: run quick checks frequently, and schedule browser-heavy checks where their added fidelity is needed.
Rank #4
Keep CI useful as Drupal and dependencies change
- Check compatibility against the project’s actual Drupal core branch and dependency constraints before updating PHP or PHPUnit versions.
- Keep database and web-server setup aligned with the test layers being run; a unit-only job should not be mistaken for validation of functional behavior.
- Ensure browser and driver versions remain compatible when maintaining FunctionalJavascript jobs.
- After core updates, confirm that the project PHPUnit configuration still points to the intended bootstrap, test paths, and output locations.
- Review GitLab CI configuration files, including
.distfiles, when jobs behave differently from the previous DrupalCI setup.
Drupal’s guides describe the test layers and their prerequisites, but do not establish a universal PHP/PHPUnit compatibility matrix for every project. Verify supported versions against the core branch and dependencies you maintain. The Drupal documentation also covers kernel tests and HTTP requests.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Or skip the browser setup
If the task is to capture a website screenshot rather than validate Drupal code or site behavior, ScreenshotNeo offers a screenshot API and MCP server. A single GET request can return an image or PDF:
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallBest Value
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Quick Recap
See the ScreenshotNeo API documentation for request options. Cookie banners and consent notices, newsletter popups, and chat widgets are removed before capture; bot checks, blank pages, failed loads, timeouts, and cache hits are not billed. Its MCP server lets AI agents use screenshot tools, and the free plan includes 1,000 shots per month without a card; paid plans start at $5 for 3,000 shots. This is for screenshot capture, not a replacement for Drupal’s PHPUnit tests or CI checks.
Sign up for ScreenshotNeo’s free plan.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




