facundoolano / aso

Tools for app store optimization on iTunes and Google Play
MIT License
734 stars 143 forks source link

integration tests #20

Open facundoolano opened 6 years ago

facundoolano commented 6 years ago

Since the part most likely to break in this library is the integration with the underlying scrapers (either because the version changed and we need to adapt or because the scrapers themselves break), we should have automated tests that make non-mocked scraper requests.

The problem with this is that most aso methods will take an unacceptable amount of time to finish. An approach that work: have stub stores that fallback to the actual scraper the first time each method (e.g. .app(), .list(), .search) is called, cache that single result and reuse it on every subsequent request. This way we could verify the input and output values work as expected with the minimal amount of requests.