-
Notifications
You must be signed in to change notification settings - Fork 0
What is fake
Devrath edited this page Jul 8, 2021
·
3 revisions
- Suppose we want to check the memory usage of a function
- The function create 1000 records and we need to check this
- Here we use the fakes
- Fakes are almost the working implementation
- But it is a shortcut implementation
- Using the fake, we can connect to the local HTTP server
- Instead of connecting to the remote server, it connects to the local server implementation
- Then it responds to the actual data it receives from the local server.
- When we use mocks when the production code changes, we need to make a lot of changes in the test code as well
- using the fake version, we are separating what from how, we just need to visit the fake code and change the implementation
Most of the time, when we are using a rest API and we want to load test the API, we end up using the fakes