Unit tests and fixtures

We have a bunch of unit tests that check a lot of web pages and REST API services.

Currently, when our tests run, it pulls live from these pages, but sometimes it can take a lot of time, and it also seems that tests should test more than our code, and not just rely on what they get up and answer (if it makes sense..).

Is it better to practice storing a valid api response, and using unit tests to load this during installation?

Thoughts?

+3
source share
3 answers

It looks like you are trying to check too much at a time.

, Rest API ( cotrole) , . , API, , , API .

, , . API, , , API , .

+4

/mock- . ( , ).

, , , , .. , , .

0

Source: https://habr.com/ru/post/1744127/


All Articles