Implement an E2E test for UserController

Now that we have a basic understanding of the E2E testing concepts, it’s time to implement a real test in our app. In this lesson, we’ll explore the essential steps to configure a test database for E2E testing using DBSeedingService. We’ll cover configuring and seeding a test database dedicated to the E2E tests, allowing us to run tests against a controlled environment. Additionally, we’ll implement tests for the CRUD endpoints in UserController.

Configure test database

To set up a dedicated database, we need to create the database using the following SQL script. Note that the database is already provisioned in the live code editor. Therefore, the script is for reference.

Get hands-on with 1200+ tech skills courses.