How does a stub differ from a mock in integration testing?

  • A mock is a complete, functional implementation of a component
  • A mock is only used in object-oriented programming
  • A stub is a simplified implementation of a component with fixed behavior
  • A stub is used for unit testing, while a mock is used for integration testing
In integration testing, a stub is a simplified version of a component with predetermined behavior, while a mock is a complete, functional implementation with expected behavior.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *