openSUSE/trollolo

Test suite needs some love

Opened this issue · 3 comments

Ana06 commented

We need to think about how to improve the test suite because currently there are many thing untested or test that are not actually testing what we want and are difficult to modify when changing the code.

Ana06 commented

I think that should be included in release 1.0.0. It is quite a lot of work 🙈

manno commented

I noticed we have three(?) different approaches to dealing with the outgoing Trello API requests.

I'll just put my notes here:

  • VCR tests: hard to write good expectations without exposing board and recording more requests since everything is a request? Regenerating requires example data on trello. Even though it's documented creating new VCRs looks complicated. Responses are just as real as in production.
  • BoardMock: verbose, exposes board for no reason beside testing? Strong expectations on mocked data possible.
  • stub_requests: only testing outgoing http, expectations even shallower than VCR. Seems like the oldest approach.
manno commented

I came up with a branch to remove VCR from the Scrum tests: https://github.com/openSUSE/trollolo/tree/wip-remove-vcr

I'd like to get rid of them, because expectations were weak and when using them to iterate on stories they add manual work. I constantly have to watch out for outdated cassettes and switch between real and dummy settings.