036: End to End Testing REST API (Part 4)

In this episode of Testing All The Things we continues to use Test Driven Development (TDD) to drive out the implementation the simple HTTP REST(ish) API in Go using Gorilla Mux.

In this video we use end to end testing to drive out the functionality to validate the ISBN that is requested. During the video we create a Business Logic layer to validate the incoming ISBN to separate the knowledge of the HTTP layer into the REST Handler and keep the database code in its own code. We use Unit Tests to drive out the implementation of the new business logic code.

The code produced during this episode can be found on GitHub

035: End to End Testing REST API (Part 3)

In this episode of Testing All The Things we continues to use Test Driven Development (TDD) to drive out the implementation the simple HTTP REST(ish) API in Go using Gorilla Mux.

In this video we use Unit and Integration test to move the code that gets book data from the database into different places. We first create a HTTP Handler using Unit test. In the second part we create something to retrieve a book from the database by its ISBN using integration tests. Finally we remove the old code that our end to end test drove out in the previous video and get the application working with the new code we write in this episode.

The code produced during this episode can be found on GitHub

030: Fake – Test Doubles

This episode of Testing All The Things we finish a series where we look at different forms of Test Doubles. We will look at a different type of Test Double in each of the videos. We will implement our own test doubles, we will not use a mocking framework.

We use Test Doubles to replace the dependencies a class uses in production so we have complete control over its dependencies enabling us to isolate the code under test from the implementation of its dependencies.

In the video we look at the Fake type of Test Double.

The code produced during the Test Doubles episodes can be found on GitHub

029: Mock – Test Doubles

This episode of Testing All The Things we continue a series where we look at different forms of Test Doubles. We will look at a different type of Test Double in each of the videos. We will implement our own test doubles, we will not use a mocking framework.

We use Test Doubles to replace the dependencies a class uses in production so we have complete control over its dependencies enabling us to isolate the code under test from the implementation of its dependencies.

In the video we look at the Mock type of Test Double.

The code produced during the Test Doubles episodes can be found on GitHub

028: Spy – Test Doubles

This episode of Testing All The Things we continue a series where we look at different forms of Test Doubles. We will look at a different type of Test Double in each of the videos. We will implement our own test doubles, we will not use a mocking framework.

We use Test Doubles to replace the dependencies a class uses in production so we have complete control over its dependencies enabling us to isolate the code under test from the implementation of its dependencies.

In the video we look at the Spy type of Test Double.

The code produced during the Test Doubles episodes can be found on GitHub

027: Stub – Test Doubles

This episode of Testing All The Things is the first in a series where we look at different forms of Test Doubles. We will look at a different type of Test Double in each of the videos. We will implement our own test doubles, we will not use a mocking framework.

We use Test Doubles to replace the dependencies a class uses in production so we have complete control over its dependencies enabling us to isolate the code under test from the implementation of its dependencies. In the video we look at the Stub type of Test Double.

The code produced during the Test Doubles episodes 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: