[openstreetmap/openstreetmap-website] Missing feature tests (#1570)
notifications at github.com
Thu Jun 29 13:20:09 UTC 2017
Our test suite is heavily focussed on controller and model tests. Unfortunately this means that very little of the site is actually tested, that is, very few of the tests render the views, or check that links are working and pointing in the right place etc. The controller tests don't render views, and each controller method is directly tested, rather than using the routes.
This means that problems crop up even though all the tests pass - see e.g. https://github.com/openstreetmap/openstreetmap-website/commit/117f0e82260efba3c6862e3aefa4b015b062a109
The advice I've read over the years is to focus less on controller tests, and more on feature tests - where a web browser is used to render the html, click on links etc. I find this works well in my other projects.
I would suggest we do some or all of the following, but of course I'm open to suggestions:
* Add feature tests to catch all the problems in the commit mentioned above
* Ensure that the signup flow works using feature tests
* Consider replacing the non-API, non-XML/RSS controller tests as feature tests
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rails-dev