Instrumental Test: Record and replay your network payload
Ever wonder how nice if you could record your network fetch payload and replay it? This blog will talk about it, makes your Instrumental Test easier.
Background
In my previous blog, I mentioned about Instrumental Test, skipping the need of using Thread.sleep(..)
.
However, there’s still a limitation there, that is the network fetch from the server might change, and this will cause the result the test could fail from time to time, and need to be updated.
So it would be cool if we could record the payload fetch in the past, and replay it in the future in our test.
We could do this using a library by AirBnB, Okreplay
.