Acceptance testing
Testing if functionality matches requirements. The specs used in acceptance testing are often described as if a real user is interacting with the system under test (SUT).
Accessibility testing
Testing that an application is usable by those with accessibility requirements (such as large enough text, buttons with text labels, labelled inputs, etc.).
Arrange/Act/Assert
A way to structure your tests into three parts.
- Arrange (set up the world/get test data),
- Act (run the thing you are testing),
- Assert (check that the returned value/output was as expected).
Assertions
Test code which checks that some condition/value matches what you expect. If an assertion fails, the test fails.
Component testing
Testing a single UI component. For React apps this typically means rendering it without a real browser (such as in a JSDOM environment - a realistic fake DOM, handling events etc) and interacting with it in a simulated but realistic way.
Coverage
A metric showing how much of your application code has tests checking that code. 100% coverage (not realistic) would mean every part of your application code has a test checking it.
End-to-end (E2E) testing
Testing an entire flow ("end to end"). It often refers to running the whole application in a headless browser (e.g. Chrome) with Cypress or Playwright. It is the slowest type of test, but the most realistic.
Flaky tests
Tests which unexpectedly sometimes fail, sometimes pass.
Happy path
The "success" flow. For example, testing that "a form submits correctly". The sad path is when testing errors, such as "a form handles an invalid email address".
Integration testing
Testing how different parts of a system (or different components) work together.
Jest
Very popular test runner - you use this to run your tests. Vitest is a widely-used alternative, especially in Vite-based projects.
Playwright
A tool from Microsoft which lets you run automated tests in headless browsers, such as Chrome, for realistic (although quite slow) tests.
React Testing Library (RTL)
A popular library for testing React components. Although it is not officially part of React, it is so widely adopted that it is considered the standard approach for React testing.
Regression testing
Re-running tests to check that new changes haven't broken existing functionality or reintroduced the same bugs.
Sad path
Testing the error or failure flows (the opposite of a happy path). For example, testing that "a form handles an invalid email address".
System under test (SUT)
The thing you are testing. For example, a function, class, component, or entire application depending on the scope of your test.
Test Driven Development (TDD)
A way to design software by writing your tests first, then adding the implementation so the tests pass
Unit testing
Testing individual functions, methods, or components in isolation from the rest of the application
Visual regression testing
Automatically comparing screenshots of UI components to detect unexpected visual changes
Vitest
Popular test runner. Its API is very similar to Jest.
Some unknown term missing from here? Please get in touch and I will add it here.