Skip to main content

Learning path · Intermediate

Testing software

How teams know their code works, and keep it working as it changes.

From your first assertion to a test suite a team can trust: the kinds of tests and where each fits, the habits that keep tests useful, the techniques that find what ordinary tests miss, and the tools that run it all.

36 pages4 chaptersabout 1 hours of reading

  • Testing & Quality
  • DevOps & Cloud

Not started yet0/36 read

Start with Quality Assurance

Progress comes from your reading history, kept only in this browser.

Chapter 1What a test is

  1. 1Quality AssuranceTesting & Quality, p. 21Quality assurance (QA) is the set of practices that ensure software meets its requirements and works reliably, aiming to prevent defects, not just find them.
  2. 2Test CaseTesting & Quality, p. 29A test case is a check of one specific behavior: starting conditions, input or steps, and the expected result that shows if the software behaves correctly.
  3. 3AssertionTesting & Quality, p. 3An assertion is a statement in code declaring that a condition must be true at that point, stopping the test or program with an error if it is false.
  4. 4Test RunnerTesting & Quality, p. 33A test runner is a tool that finds a project's automated tests, executes them, and reports which ones passed or failed, usually from a single command.
  5. 5Unit TestTesting & Quality, p. 35A unit test is a small, automated check that verifies one function, method, or class behaves correctly in isolation from the rest of the program.
  6. 6Integration TestTesting & Quality, p. 12An integration test is an automated test that checks whether several parts of a system, such as code, a database, and an API, work correctly together.
  7. 7End-to-End TestTesting & Quality, p. 8An end-to-end test is an automated test that runs a complete user journey through the whole application, from the user interface to the database and back.
  8. 8Test PyramidTesting & Quality, p. 32The test pyramid is a model for balancing automated tests: many fast unit tests, fewer integration tests, and only a few slow end-to-end tests at the top.

Chapter 2Writing tests that help

  1. 9Test FixtureTesting & Quality, p. 31A test fixture is the known state a test needs before it runs, such as sample data or a configured object, plus the code that sets it up and tears it down.
  2. 10MockingTesting & Quality, p. 16Mocking is a testing technique that replaces a real dependency, such as a database or API, with a fake you control so that code can be tested in isolation.
  3. 11Test CoverageTesting & Quality, p. 30Test coverage is a metric that measures how much of a program's source code is executed when its automated tests run, usually shown as a percentage.
  4. 12Flaky TestTesting & Quality, p. 10A flaky test is an automated test that sometimes passes and sometimes fails without any change to the code, which makes its results hard to trust.
  5. 13Snapshot TestingTesting & Quality, p. 25Snapshot testing is a technique that saves the output of code to a file on the first run and fails later runs if the output no longer matches that copy.
  6. 14Regression TestingTesting & Quality, p. 22Regression testing is the practice of re-running existing tests after a code change to make sure that features which used to work have not broken.
  7. 15Test-Driven DevelopmentTesting & Quality, p. 34Test-driven development is a coding practice in which you write a failing test first, then write just enough code to pass it, and then clean up the design.
  8. 16Behavior-Driven DevelopmentTesting & Quality, p. 4Behavior-driven development is a practice where developers, testers, and business people agree on plain-language examples that become automated tests.

Chapter 3Finding what tests miss

  1. 17Black-Box TestingTesting & Quality, p. 5Black-box testing checks software only through its inputs and outputs, against what it is supposed to do, without looking at or relying on the code inside.
  2. 18White-Box TestingTesting & Quality, p. 36White-box testing designs tests from knowledge of the code's internal structure, so that its statements, branches and paths are exercised and checked directly.
  3. 19Exploratory TestingTesting & Quality, p. 9Exploratory testing is a hands-on approach in which a tester learns about the software, designs tests, and runs them at once, guided by what they discover.
  4. 20Acceptance TestingTesting & Quality, p. 2Acceptance testing checks whether software meets the requirements agreed with its users or customers, so the team can decide if it is ready to release.
  5. 21Contract TestingTesting & Quality, p. 6Contract testing is a technique that checks whether two services agree on the requests and responses they exchange, without running both of them together.
  6. 22Property-Based TestingTesting & Quality, p. 20Property-based testing checks that a rule holds for many automatically generated inputs, instead of only for a handful of examples written by hand.
  7. 23Fuzz TestingTesting & Quality, p. 11Fuzz testing is an automated technique that feeds a program huge numbers of unexpected or malformed inputs to find crashes, hangs, and security vulnerabilities.
  8. 24Mutation TestingTesting & Quality, p. 17Mutation testing measures the quality of a test suite by inserting small deliberate bugs into the code and checking whether the tests fail and catch each one.

Chapter 4Speed, scale and automation

  1. 25Performance TestingTesting & Quality, p. 18Performance testing measures how fast, stable and scalable a system is under expected and extreme load, from response times to its breaking point.
  2. 26Load TestingTesting & Quality, p. 15Load testing is a type of performance testing that simulates many users or requests at once to measure how a system behaves under expected traffic.
  3. 27Stress TestingTesting & Quality, p. 27Stress testing pushes a system beyond its expected workload on purpose to find its breaking point and to check that it fails gracefully and recovers afterward.
  4. 28Smoke TestTesting & Quality, p. 24A smoke test is a quick, shallow check that the most important features of a build work at all, run before any time is spent on deeper testing.
  5. 29A/B TestingTesting & Quality, p. 1A/B testing is an experiment that shows two versions of a feature to random groups of real users and measures which one performs better on a chosen metric.
  6. 30Static AnalysisTesting & Quality, p. 26Static analysis is the automated examination of source code without running it, to find bugs, security vulnerabilities, and quality problems early.
  7. 31LintingTesting & Quality, p. 14Linting is the automated analysis of source code, without running it, to flag likely bugs, style problems, and suspicious patterns before the code ships.
  8. 32Test AutomationTesting & Quality, p. 28Test automation is using code to run tests and check their results, so the same checks repeat quickly and consistently on every change instead of by hand.
  9. 33JestTesting & Quality, p. 13Jest is a popular JavaScript testing framework that bundles a test runner, assertions, mocking, snapshots and code coverage in one package with little setup.
  10. 34PlaywrightTesting & Quality, p. 19Playwright is Microsoft's open-source framework for end-to-end testing and browser automation, driving Chromium, Firefox and WebKit through one API.
  11. 35CypressTesting & Quality, p. 7Cypress is a JavaScript framework that runs end-to-end and component tests for web apps inside the browser, with automatic waiting and an interactive runner.
  12. 36CI/CDDevOps & Cloud, p. 9CI/CD is a set of automated practices that build, test, and release code changes frequently, so software can be delivered to users quickly and safely.

Along the way, compare

Pairs on this path that are easy to mix up, side by side.

More

Settings