026: Refactoring with Test && Commit || Revert (TCR)

In this episode we continue to use Test && Commit || Revert (TCR). This way of practising TDD. The practise was developed by Oddmund Strømme and written about by Kent Beck

The practise encouraging writing a test then writing the implementation in tiny iterations by reverting all changes made since since the last time the tests passed.

During this video we implement complete Untangling Conditionals Kata by Tom Oram

The Jetbrains IntelliJ IDEA plugin we use during this video is called Limited WIP.

The code produced during this episode can be found on GitHub

025: Test && Commit || Revert (TCR)

In this episode we play with Test && Commit || Revert or TCR. This way of practising TDD. The practise was developed by Oddmund Strømme and written about by Kent Beck ():

The practise encouraging writing a test then writing the implementation in tiny iterations by reverting all changes made since since the last time the tests passed.

During this video we implement the FizzBuzz code kata using the TCR technique.

The Jetbrains IntelliJ IDEA plugin we use during this video is called Limited WIP.

The code produced during this episode can be found on GitHub

023: End to End Testing REST API

In this episode we continue to use Test Driven Development (TDD) to drive out the implementation the simple HTTP REST(ish) API microservice in PHP.

We add handling when the database is not available to the endpoint GET to retrieve a book by its ISBN.

We start by refactoring the endpoint code to add different layers (Controller – Business Logic – Book Repository). We then add Unit and Integration tests to ensure our code ensure each part of our application can handle the different exceptions being thrown.

The code produced during this episode can be found on GitHub

During this video we use:

022: End to End & Integration testing REST API

In this episode we continue to use Test Driven Development (TDD) to drive out the implementation the simple HTTP REST(ish) API microservice in PHP.

We add handling when a book is not available to the endpoint GET to retrieve a book by its ISBN.

Starting with an End to End Test write using PHP Unit and Guzzle HTTP Client for PHP to design out how consumers of the API will interact with the endpoint.
We then add an Integration test to ensure our code uses Doctrine PHP ORM to interact with the Postgres database to get the book data.

The code produced during this episode can be found on GitHub

During this video we use:

Episode 021: End to End & Integration Testing a REST API

In this episode we continue to use Test Driven Development (TDD) to drive out the implementation the simple HTTP REST(ish) API microservice in PHP.

We add a new endpoint GET to retrieve a book by its ISBN.

Starting with an End to End Test write using PHP Unit and Guzzle HTTP Client for PHP to design out how consumers of the API will interact with the endpoint.
We then add an Integration test to ensure our code uses Doctrine PHP ORM to interact with the Postgres database to get the book data.

Finally we add a Unit Test to the Book object to enable it to render itself into JSON using PHP’s JsonSerializable interface.

Don’t miss the excellent demonstration why we need to use different types of test at 33.15 the moment all the Unit Tests pass and the End to End Tests still fails

The code produced during this episode can be found on GitHub

Episode 020 – End to End Testing (REST API)

In this episode of Testing All The Things we start to use Test Driven Development (TDD) to drive out the implementation the simple HTTP REST(ish) API microservice in PHP.

The first feature we add is a new endpoint to GET the health of the API microservice. Starting with an End to End Test write using PHPUnit and Guzzle HTTP Client for PHP to design out how consumers of the API will interact with the /health endpoint.

The second feature was to handle requests where the route could not be matched and return a HTTP 404 Not Found. Again we start with an End to End Test to drive out how API consumers will interact with the Microservice. We then move on to unit testing the implementation of a ErrorRendererInterface from the Slim Framework. Finally we plug in our ErrorRenderer into the Slim application to make all the tests pass.

The code produced during this episode can be found on GitHub

Episode 017 – Test && (Commit || Revert)

In this screencast we try out a new Test Driven Development concept call Test && (Revert || Commit) or TCR .

The idea of TCR is that you work in very small increments and a little bit of test code and a little bit of production code. When you run the test if the test pass your changes are committed and if you tests fail your changes are reverted.

You can find the code created during this video in this GitHub repository.

The plugin I use for IntelliJ is Limited WIP