Introducing Drupal Test Traits

moshe weitzman

Join us as we introduce Drupal Test Traits (DTT), a new open source project started by the Commonwealth of Massachusetts.

mass.gov is large, content-centric site. Most of our tests click around and assert that content is laid out properly, the right icons are showing, etc. In order to test this stuff, we need the mass.gov database - testing on an empty site won't do. The traditional tool for testing a site using an existing database is Behat.  So we used Behat for over a year and found it getting more and more awkward. We've replaced Behat with DTT!

DTT reuses the awesome Drupal 8 core testing system, so it works with your site's content, as opposed to an empty site. It supports testing client side interactions in addition to traditional browsing.

Attendees ideally have a basic understanding of functional testing of PHP projects. At the end of this session, you will have another tool to test your content-centric sites.

Learning Objectives

  • Learn a new approach to testing Drupal sites.
  • Learn under what conditions these tests are preferrable to Behat or other approaches
  • Learn how DTT tests are quick to write and straight forward to maintain.
  • Learn how to run DTT tests (use `phpunit`)

Target Audience

Any technical person who is curious about site testing.

Prerequisites

No hard prerequisites. If you want to be an A+ student, read up on Functonal testing and the Drupal 8 base test classes beforehand.

Track

DevOps & Infrastructure

Tags

back-end development
drupal 8
testing

Experience Level

Intermediate

When & Where

Time: 
Wednesday, 15 July, 2020 - 00:15 to 01:00
Room: 
Hopin Sessions

If no timezone is set on your profile, time is displayed in UTC.
Update your profile's timezone