airbnb / okreplay

📼 Record and replay OkHttp network interaction in your tests.
Apache License 2.0
781 stars 71 forks source link

Replace data in yaml file with fake data in @Before setUp() method #75

Closed coding-kot closed 6 years ago

coding-kot commented 6 years ago

Hi there. We usually replace data in yaml file with fake data and it works perfectly if it is in the tests. Okreplay records tape with real request/response and we just replace it afterwards with fake data and use it in READ_ONLY mode. In the test we just type fakeuser/fakepassword and everything works fine.

But when we do the same thing in the setUp() method with annotation @Before (for example, everytime we log in to the app and then do the tests), it works good with original real data but if we change it, it fails.