Testing Drupal with Cypress

Imagine you're building the perfect feature for one of the most important projects in your life, the client approves it and you deploy it to production, but then, right after you deployed, something else crashes... Oh no! Another core feature of your website just broke because of one of the changes from your perfect feature and you didn't noticed until it was already in production. This is basically in our worst nightmares, and also that's why it is so important to have a test suite for our projects.

Automated testing is great but maintaining our tests is a hard task too. Sometimes, as projects evolves, things can break and we may need to do changes to our suites, working with tools like Behat makes the maintainability in some projects to be quite a challenge because, basically, we need to keep updated two sides of the same work: features written in business language and the logic for them in the steps definition.

Automated testing is quite challenging, maintaining tests suites is a pretty intensive job and doing it for Drupal projects is an extra layer of complexity sometimes. There are some tools out in the wild that can make this job a lot easier for us. In this talk we are going to have an introduction to end to end testing using Cypress, which is a testing framework based on Javascript and doesn't use Selenium at all.

At the end of this talk, assistants will be able to:

  • understand what is end-to-end testing.
  • know the advantages of using Cypress in Drupal projects.
  • understand basics of testing with Cypress.
  • create tests with Cypress.
  • run Cypress tests as part of a pipeline using CircleCI.
Topics
Back-end Development / DevOps

Presenters