PHP Meetup December 7, 2017 – TDD / BDD with Codeception

John talks at the Inevation Center in Las Vegas.

Topic: TDD / BDD with Codeception

Git Repo

What is TDD/ BDD?

  • Devops methodology for creating quality software
  • automated tests – Software that tests other software
  • make the test first
  • short cycles, single responsibility, loosely coupled
  • Red, green, re-factor!

TDD becomes sensible…

  • When you don’t know what to do
  • When the project becomes complex
  • When there are bugs
  • When you are performing code rescue
  • When multiple people with varying skill levels are invovled
  • When you care about costs and efficiency

Testing vesus Development

  • Vocabulary is wrong

BDD should statements

  • itShouldDoSomethingUseful(){}
  • itShouldHaveSomeKindOfProperty(){}

Codeception toolkit

  • PHPunit
  • Behat
  • Webdriver
  • Selenium
  • PhantomJS
  • WP-Codeception
  • DB interfaces
  • Framework interfaces

Codception architecture

  • YML files
  • PSR-4 namespaces
  • Suites, groups, environments, grid

Leave a Reply

Your email address will not be published. Required fields are marked *