| > End-to-end tests are unit tests, generally speaking. Generally, in the software industry, those terms are not considered the same thing, they are at opposite ends of a spectrum. Unit tests are testing more isolated/individual functionality while the end to end test is testing an entire business flow. Here's an example of one end to end test (with validations happening at each step): 1-System A sends Inventory availability to system B 2-The purchasing dept enters a PO into system B 3-System B sends the PO to system A 4-System A assigns the PO to a Distribution Center for fulfillment 5-System A fulfills the order 6-System A sends the ASN and Invoice to system B 7-System B users process the PO receipt 8-System B users perform three way match on PO, Receipt and Invoice documents |
Bad example, perhaps, but that's also a unit test[1]. Step 8 is dependent on the state of step 1, and everything else in between, so it cannot be reduced any further (at last not without doing stupid things). That is your minimum viable unit; the individual, isolated functionality.
[1] At least so long as you don't do something that couples it with other tests, like modifying a shared database in a way that that will leave another test in an unpredictable state. But I think we have all come to agree that you should never do that – going back to the reality that the term unit test serves no purpose anymore. For all intents and purposes, all tests now written are unit tests.