liveBook · Manning

Integration test

As explained in Write Powerful Rust Macros

Integration testing evaluates the behavior and interactions of multiple software components, often across external system boundaries.

An integration test checks whether multiple software components work together as expected. It covers more code than a unit test and may use real dependencies, making it slower but providing broader confidence. section 6.6

Integration tests are useful when:

  • Communication with databases, services, or other outside parties needs verification. section 6.5
  • A macro-generated component must be checked from the outside rather than through implementation details. section 6.5
  • Unit tests leave uncertainty about whether the connected parts behave correctly together. section 6.5

Testing a builder macro

A builder macro can be tested through its externally visible behavior, while integration-level tests check communication with external systems. Black-box tests are less sensitive to rearranged implementation details, though failures may require more investigation. section 6.9 section 6.5

How Write Powerful Rust Macros covers it

How deep it goes
Defines scope, speed, dependencies, and confidence, but stops short of procedural setup or implementation details.
Examples
Uses real dependencies, outside communication, and macro-generated behavior as testing boundaries.
What it assumes
Assumes familiarity with unit tests and distinguishes broader integration coverage from private-function testing.
What you can do after
Evaluate whether multiple components interact correctly and decide when broader tests should complement unit tests.
How it connects
Connects unit testing with end-to-end, smoke, performance, load, contract, mutation, and fuzz testing.

Also explained in

Compare how 31 books explain integration test →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Write Powerful Rust Macros. The section links point to the parts of the book it draws on.