---
title: "Testing Strategies: Unit, Integration, E2E"
description: "Master testing: unit testing, integration testing, end-to-end testing, mocking, fixtures, coverage goals, and CI/CD integration."
author: "Mohammad Abu Mattar"
canonical: https://mkabumattar.com/quizzes/post/testing-strategies-quiz
---

# Testing Strategies: Unit, Integration, E2E

Welcome to the Testing Strategies Quiz! This quiz covers unit testing, integration testing, end-to-end testing, mocking, fixtures, code coverage, and more. Test your knowledge and understanding of these essential concepts in software testing. Good luck!

## Questions

### 1. What is unit testing?

- The practice of verifying individual functions or methods in complete isolation
- The verification of complex data flows between the backend and the database
- The manual process of checking the user interface for visual inconsistencies
- The deployment of code to a staging environment for real-world user feedback

**Hint:** Think about testing functions.

### 2. What is integration testing?

- The verification of interactions between multiple components or external services
- The process of testing a single line of logic without any external dependencies
- The act of combining multiple source code files into a single production bundle
- The practice of testing the entire system from the perspective of an end user

**Hint:** Think about testing together.

### 3. What is end-to-end (E2E) testing?

- The simulation of complete user workflows from the frontend through to the backend
- A method for testing private class methods to ensure internal state consistency
- A technique for verifying that the API documentation matches the actual code
- The process of testing how an application behaves when the network is offline

**Hint:** Think about testing full flows.

### 4. What is the test pyramid?

- A strategy favoring many unit tests, fewer integration tests, and minimal E2E tests
- A design pattern where tests are written in a hierarchical order of code complexity
- A requirement that every line of code must be covered by at least three test types
- A visual representation of the server infrastructure used to run automated suites

**Hint:** Think about quantity per type.

### 5. What is a mock?

- A replacement for a dependency that allows for controlling and inspecting behavior
- A duplicate of the production database used for running heavy analytical queries
- A specialized function that automatically fixes bugs found during a test run
- A type of comment used to temporarily disable tests that are currently failing

**Hint:** Think about fake implementations.

### 6. What is a stub?

- A simplified object that returns fixed, predetermined data for specific calls
- A complex simulation of a third-party API that includes full business logic
- A temporary variable used to hold the results of a failed assertion
- A piece of code that connects the frontend components to the backend API

**Hint:** Think about fake functions.

### 7. What is a spy?

- A wrapper around a function that records details about how it was called
- A hidden security tool that monitors the cluster for unauthorized access
- A test that intentionally fails to ensure the reporting system is active
- A specialized type of mock that deletes data after a test completes

**Hint:** Think about call tracking.

### 8. What is a fixture?

- A baseline set of data or state used consistently across multiple test cases
- A physical hardware device used to run mobile application tests
- A permanent change to the production database required for a new feature
- A syntax error that prevents a test file from being executed by the runner

**Hint:** Think about test setup data.

### 9. What is code coverage?

- A metric indicating the percentage of source code executed during a test suite
- A security report listing all the third-party libraries used in a project
- A legal document that protects developers from liability for code defects
- A count of how many developers have reviewed a specific pull request

**Hint:** Think about how much tested.

### 10. What is Cypress?

- A modern, browser-based framework designed for end-to-end testing
- A server-side language used for writing high-performance unit tests
- A cloud-based tool for storing and versioning large binary test files
- A plugin that automatically converts manual tests into automated scripts

**Hint:** Think about E2E testing.

### 11. What is test isolation?

- Ensuring that the outcome of one test does not affect the outcome of another
- Running all tests on a single, disconnected machine to prevent data leaks
- A rule that prevents developers from talking to each other during the QA phase
- The practice of putting all failing tests into a separate folder for later review

**Hint:** Think about independent tests.

### 12. What is a flaky test?

- A test that provides inconsistent results without any changes to the code
- A test that is designed to fail when the system is under heavy load
- A test that takes a long time to run due to slow network connections
- A test that has been deprecated and is no longer part of the main suite

**Hint:** Think about inconsistent results.

### 13. What is Test-Driven Development (TDD)?

- A process where you write a failing test before writing the actual implementation
- A strategy where developers only write code that has already been tested manually
- A management style that rewards developers based on the number of tests written
- A tool that automatically generates unit tests based on existing production code

**Hint:** Red-Green-Refactor cycle?

### 14. What is Behavior-Driven Development (BDD)?

- A methodology using human-readable descriptions to define how an application should act
- A performance test that monitors the behavior of the server CPU during a spike
- A way of writing code where the computer predicts the next logic step for the developer
- A security protocol that tracks the behavior of users on a public network

**Hint:** User scenarios and Gherkin syntax?

### 15. What is snapshot testing?

- A technique that compares the current output of a component to a previously stored version
- A method for taking a photo of the developer to verify their identity
- A way of testing that only checks the code that was changed in the last hour
- A tool that creates a backup of the entire server before a test begins

**Hint:** Store expected output and compare?

### 16. What is the AAA (Arrange-Act-Assert) pattern?

- A structural pattern that divides a test into three clear, sequential phases
- A grading system that ranks tests from A (perfect) to F (completely broken)
- A cloud provider requirement that all tests must be authenticated with three keys
- A technique for running three different tests at the exact same time

**Hint:** Test structure with three phases?

### 17. What is parameterized testing?

- A method for executing the same test logic multiple times using different input data
- A test that checks if the parameters of a function are typed correctly
- A way to limit the number of arguments a function can receive during a test
- A performance metric that measures the time it takes to parse URL parameters

**Hint:** Test same logic with multiple inputs?

### 18. What is regression testing?

- Re-running existing tests to confirm that new changes have not introduced any new bugs
- The practice of reverting the code to a previous version when a test fails
- A testing phase where old, unused code is deleted from the repository
- A manual process where users report bugs they found in the previous release

**Hint:** Check that bug fixes don't break existing features?

### 19. What is smoke testing?

- A preliminary set of tests that verify the most critical functions of an application
- A test that checks if the server hardware is overheating under load
- A specialized security test that checks for vulnerabilities in firewalls
- The process of deleting all log files before starting a fresh test run

**Hint:** Quick critical path tests?

### 20. What is performance/load testing?

- A strategy to evaluate how a system performs under a high volume of concurrent users
- A test that checks if the developers are writing code fast enough
- A way to measure the physical speed of the internet connection in the office
- A method for compressing the application size to improve download times

**Hint:** Test system under high load?

### 21. What is security testing?

- The practice of identifying vulnerabilities and threats in application code or infrastructure
- The act of locking the office doors to prevent unauthorized physical entry
- A requirement that all developers must use complex passwords for their accounts
- A test that checks if the application can run on a secure operating system

**Hint:** Test for vulnerabilities and attacks?

### 22. What is contract testing?

- A technique to ensure that a provider and a consumer of an API agree on the data format
- A legal review of the terms of service agreement for a new software product
- A test that verifies if a developer has completed their assigned tasks
- A way to verify that a third-party vendor is following their service level agreement

**Hint:** Test API contracts between services?

### 23. What is mutation testing?

- An advanced method that modifies the source code to check if the test suite fails
- A process for automatically updating the code to a newer version of a library
- A test that checks if the application can adapt to different screen sizes
- A way of testing how an application behaves when its binary data is corrupted

**Hint:** Mutate code and verify tests catch changes?

### 24. What is property-based testing?

- A strategy where a test generates random data to verify that certain logic properties always hold
- A test that verifies whether object properties are stored correctly in the database
- A method for calculating the market value of the source code of a software application
- A test that only focuses on the CSS properties of a web page

**Hint:** Generate random inputs and verify properties?

### 25. What is accessibility testing?

- The practice of ensuring that software is usable by people with various disabilities
- A test that checks if the website can be accessed from any country in the world
- The process of checking if the application has a fast enough login time
- A test that ensures the server room is accessible to maintenance staff

**Hint:** Test for inclusive UI for people with disabilities?

### 26. What is the test data builder pattern?

- A design pattern that uses a fluent interface to construct complex objects for testing
- A tool that automatically scrapes data from the web to use in a test suite
- A database script that builds a new table every time a test is executed
- A specific way of organizing the folders where test data is stored

**Hint:** Fluent API for building test data?

### 27. What is test isolation and why is it important?

- A requirement that tests remain independent to prevent side effects and shared state
- A security feature that keeps the test code separate from the production code
- A strategy where only one developer is allowed to run tests at a time
- A rule that forces tests to only run on a specific version of the operating system

**Hint:** Independent tests without side effects?

### 28. What is continuous testing in CI/CD?

- The automated execution of software tests as part of the software delivery pipeline
- A manual process where a QA engineer tests the application every single day
- A test that runs in an infinite loop until it finds a bug
- The practice of writing tests while the application is already running in production

**Hint:** Run tests automatically on every commit?

### 29. What is canary testing and canary deployment?

- The process of releasing a new version of code to a small group of users to monitor performance
- A specialized test designed to check software compatibility with legacy browsers
- The act of testing the application in a room filled with actual birds
- A strategy where the test suite is executed by an AI that mimics a human user

**Hint:** Roll out changes to small subset first?

### 30. What is chaos engineering and chaos testing?

- The discipline of experimenting on a system to ensure its ability to withstand turbulent conditions
- A methodology where developers write code without any plan or documentation
- A specialized test that checks for errors in the mathematical formulas of an application
- The practice of running all tests at the same time on a single CPU core

**Hint:** Inject failures to test resilience?
