Test Driven Development with Codeception

rakesh_verma

Testing is an integral part of Software development and everybody from junior developer to Senior Architect should know its importance. However, there is still a dogma that testing is tougher than writing code and hence, many developers either don't write tests at all or don't complete all the cases which an ideal test suite should take care of.

My session is focused on:

  • How an ideal test suite should look like.
  • What all kind of tests are there (Unit, Cest or API, Integration, Browser or E2E )
  • How Codeception can be the right choice for beginners as well as senior developers
  • What a test should cover to make sure that the code they write won't break on production and they can sleep well on the night of deployment.

It'd be a 30-minute presentation and would include:

  • Importance of testing and what can go wrong if the code is not tested.
  • Test-driven development (Test first, code later).
  • The basics of best testing practices.
  • Codeception Test with an example for unit test and Cest (API test)
  • Cases that should be covered when writing tests, which shall include but won't be limited to:
    • Writing better mocks.
    • Unit tests to ensure every method works well within their scope.
    • API contract is the same before every deployment using CEST.
    • Why internet should be disconnected when the tests are running.

Pre-requisite:

  • Basic knowledge of PHP

Benefits to Attendees:

  • Would learn the Importance of Testing
  • Fair Comparison between multiple testing frameworks.
  • Exposure to Testing Framework - Codeception.
  • Hands-on example of a well-covered test case.
  • Attendees would know what kind of tests are best suited for them and what types of tests to be created under given circumstance
  • May realize how testing is the meditation to a developer's life.

Program tags

apis, php, testing

Experience Level

Beginner

Drupal Version