Drupal Test Traits - Learn by example
Drupal Test Traits - Learn by example
Learn about Drupal Test Traits (DTT), an open source project started by the Commonwealth of Massachusetts. Dive into real tests from our open source project, and learn how DTT works under the hood.
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 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.
At the end of this session, you will have another tool to test your content-centric sites.