sambegin / Firesteer

A brilliant desktop application that gives you full control over your Firestore database
MIT License
7 stars 1 forks source link

Tests (unit / int / accept) setup #5

Open sambegin opened 6 years ago

sambegin commented 6 years ago

Because we make great code and great software ( :) ), we need to have a proper way to test our code.

We need to determine here :

  1. Minimum code coverage
  2. Unit / Integration test lib (Jest is already there... might be a great fit since we are mainly using React. Open to suggestion if there is something better for electron app!) 3 : Acceptance tests ?
matdurand commented 6 years ago
  1. Not a big fan of 100% coverage. 90% is usually good enough for me.
  2. I assume we will not be using a lot of electron native feature, except storing credentials. If so, Jest is probably good enough. If we add a lot of native electron code in the future, we might need another solution for testing it.
  3. Spectron is the chromedriver for electron (https://electronjs.org/docs/tutorial/using-selenium-and-webdriver). Tescafe also has a plugin, but the latest built seems to be failing.
sambegin commented 6 years ago

1 : Ok 2 : Let's stick to Jest for now since we might also stick on "web oriented" features at first (we're not electron pros yet ;) ). We'll consider other solution if implement more native feature 3 : I've had better experience with testcafe on web applications but don't know how it react on electron app. We should probably give it a try when we'll feel the need of adding end-to-end tests... For now, let's start by adding some features with simple unit test ;)