In unit testing, when a function relies on an external component, which technique is used to isolate the function for testing?

  • Fuzzing
  • Mutation Testing
  • Regression Testing
  • Stubbing
Stubbing involves creating a 'stub' or a simple implementation of the external component that simulates its behavior. This allows the function being tested to operate as if the external component is working, ensuring isolation in unit tests.
Add your answer
Loading...

Leave a comment

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