- Testing levels
- Testing best practices
- Frontend testing standards and style guidelines
- Getting started with Feature tests
- Flaky tests
- GitLab pipelines
- Review apps
- Testing Rake tasks
- End-to-end tests
- Migrations tests
- Contract tests
This document describes various guidelines and best practices for automated testing of the GitLab project.
It is meant to be an extension of the Thoughtbot testing style guide. If this guide defines a rule that contradicts the Thoughtbot guide, this guide takes precedence. Some guidelines may be repeated verbatim to stress their importance.
Following are two great articles that everyone should read to understand what automated testing means, and what are its principles:
- Five Factor Testing: Why do we need tests?
- Principles of Automated Testing: Levels of testing. Prioritize tests. Cost of tests.
Learn about the different testing levels, and how to decide at what level your changes should be tested.
Everything you should know about how to write good tests: Test Design, RSpec, FactoryBot, system tests, parameterized tests etc.
Everything you should know about how to write good Frontend tests: Jest, testing promises, stubbing etc.
Need to get started with feature tests? Here are some general guidelines, tips and tricks to get the most out of white-box testing.
What are flaky tests, the different kind of flaky tests we encountered, and what we do about them.
How GitLab test suite is run in the CI context: setup, caches, artifacts, parallelization, monitoring.
How review apps are set up for GitLab CE/EE and how to use them.
Everything you should know about how to test Rake tasks.
Everything you should know about how to run end-to-end tests using GitLab QA testing framework.
Everything you should know about how to test migrations.
Introduction to contract testing, how to run the tests, and how to write them.