Testing Vue Apps - Unit & E2E

Learn enterprise Vue best practices - unit testing, E2E testing, and continuous deployment.

This course teaches the three most important best practices of enterprise Vue development - unit testing, E2E (end-to-end) testing, and continuous deployment.

Module 1 - Automated browser testing with Nightwatch

In the first module we'll implement E2E testing using the Nightwatch JavaScript framework which automates browser actions like clicking buttons, filling in forms, and so on. We'll begin with an introduction to Nightwatch and its key features and concepts. We'll then write end-to-end tests for our app's main uses cases like logging in, adding an item to the cart, and so on.

We'll also learn how to make our tests run automatically through headless Chrome.

Module 2 - Frontend unit testing with Jest and Vue Test Utils

In the second module, we'll learn how to unit test a Vue client app. The key tools we'll use are Jest and Vue Test Utils.

We'll begin this module with an introduction to using Jest as a frontend test runner. Then, we'll create our first component unit tests using Vue Test Utils.

Next we'll learn the most important testing patterns for Vue unit tests and use these to write a frontend test suite.

On the way we'll also learn important testing concepts like mocks, stubs, and spies.

Module 3 - Continuous Deployment of a full-stack Vue app

In the third module, we'll be deploying our app to a Heroku environment using GitLab continuous deployment.

We'll begin with an introduction to GitLab CI, and see how it allows us to create a robust deployment pipeline. We'll then configure GitLabCI to create a build of our app in a cloud-based virtual machine and automatically run our test.

Finally, we'll integrate Heroku into the pipeline so that if our tests pass, our code can get pushed to Heroku and the app will be updated.

Back to courses