E
E
endenwer2015-07-31 10:50:10
API
endenwer, 2015-07-31 10:50:10

Is it worth using mock/stub external api in integration tests?

I know not to use mock/stub in integration tests, but if not, then I need to create accounts on the services that I work with via api and configure them for tests. If you use mock / stub, then the tests will not react in any way to the api change. Would like to know how you do it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2015-07-31
@endenwer

The test is taken. Its purpose is clearly stated. Then it looks which components are critical to achieve the goal, and which are not. From this knowledge, you can understand what can be isolated, and what should take part in any case.

I
Ilya Bondarenko, 2015-08-07
@bondarenko

I agree with Dmitry about the definition of expediency.
As for tools, I can advise gem vcr. Flexible and comfortable.
On our project, the time for passing tests was reduced by three times.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question