Testing Server-rendered HTML Applications

Learn how to test server-rendered HTML endpoints.

Testing server-rendered HTML endpoints is very similar to testing JSON endpoints, but the response is an HTML document instead of JSON.

Controller

We’ll write tests for the user controller that handles the server-rendered HTML endpoints. Let’s start by looking at the controller code that we’ll be testing:

Get hands-on with 1300+ tech skills courses.