Why we test

Testing is your seatbelt. It allows us to develop fast crash in to a wall sometimes but get out safe in the end and slightly unharmed.

  • When upgrading gems or even upgrading rails we can feel a bit more secure
  • When refactoring we can make sure that the earlier defined logic still works
  • When release daily many times we can ensure that our software still works

What we test

We try to do as much system tests as posisble and only use the traditional unit test where logic is highly customized or system tests are not possible or too slow. With a system test we mean simulating the actual users and using all the components together, and a system as whole, instead of only a single component.

  • See DHH post on test driven development
  • We test high level specs and the most important user flows
  • Email flows ‘As a user i want to be able to reset my password via e-mail’
  • Timed flows and jobs ‘As a manager i want to ben notified when a deadline isn’t met so…’

How we test

We use capybara and poltergeist, selenium with chromedriver as our main test drivers.