Skip to main content
Start of main content.

Testing

Introducing Drupal Testing Traits: Drupal extension for testing existing sites

Drupal allows writing tests for installation profiles. A profile can have sample content which is created during installation, like umami in Drupal core. Drupal allows writing tests for modules as well. A module can also have sample content which is created during installation or config import.

Drupal Testing Traits allows writing tests for an already installed site. A site with content types and content. You can write tests for the all the pages in your site in different viewports and test user interactions aka JavaScript tests.

Drupal 8 FTW: Is it a test or is it a form? Actually, its both

As you'd be aware by now - Drupal 8 features lots of refactoring of form procedural code to object-oriented.

One such refactoring was the way forms are build, validated and executed.

One cool side-effect of this is that you can now build and test a form with a single class.

Yep that's right, the form and the test are one and the same - read on to find out more.

Native PHPStorm Drupal Test Runner

PHPStorm has a lot of built in test runners, but it doesn't support Drupal's Simpletest test runner. In this blog post we'll see how we can execute Drupal tests inside PHPStorm using Drupal test runner.