freesound icon indicating copy to clipboard operation
freesound copied to clipboard

Create infrastructure for integration tests

Open ffont opened this issue 7 years ago • 2 comments

Sometimes the unit tests we have are not enough to reliably test some functionalities and mocking is not really an option. For example, if we want to test the search functionality in depth we need to get real responses from Solr. For that we need some infrastructure for integration tests that has Freesound web and some other services running.

To start, we should prepare infrastructure in Travis (liked with the repo) that runs Freesound and Solr with a small fixed number of sounds indexed. Then we should have some test cases running there and reporting results to Github just like normal unit tests (but as a differentiated check).

In the future it would be good to add more sounds to this integration testing environment and be able to do "qualitative" checks in the data (e.g. check that Solr returned results make sense according to the query).

ffont avatar Sep 06 '18 13:09 ffont

Might be relevant: https://github.com/moliware/travis-solr

ffont avatar Sep 06 '18 14:09 ffont

This is an awesome idea 👍

If you want to test this you can actually run travis locally through Docker which would allow you to develop the tests and setup locally rather than doing testing by commit-wait-fix cycles on github:

https://docs.travis-ci.com/user/common-build-problems/#troubleshooting-locally-in-a-docker-image

bdejong avatar Sep 07 '18 11:09 bdejong