dwyl / smart-home-firmware

Firmware for dwyl/smart-home-security-system
GNU General Public License v3.0
4 stars 0 forks source link

Hub server integration testing #16

Closed th0mas closed 4 years ago

th0mas commented 4 years ago

Setup integration tests with the Heroku-hosted hub server.

This should allow us to reach a reasonably high level of coverage on the firmware.

codecov[bot] commented 4 years ago

Codecov Report

Merging #16 into master will increase coverage by 26.52%. The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master      #16       +/-   ##
===========================================
+ Coverage   58.82%   85.34%   +26.52%     
===========================================
  Files          12        8        -4     
  Lines         136      116       -20     
===========================================
+ Hits           80       99       +19     
+ Misses         56       17       -39     
Impacted Files Coverage Δ
lib/smart_home_firmware/client/hub_client.ex 90.56% <100.00%> (+21.81%) :arrow_up:
lib/smart_home_firmware/lock/lock.ex 54.54% <100.00%> (+18.18%) :arrow_up:
lib/smart_home_firmware/display/supervisor.ex
lib/smart_home_firmware/nfc/mifare_client.ex
lib/smart_home_firmware/nfc/nfc.ex
lib/smart_home_firmware/display/scene/welcome.ex

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update bdfe7ea...a73216f. Read the comment docs.

th0mas commented 4 years ago

I think 89% is as high as we can reasonably go with testing without mocking out a NFC reader on travis

nelsonic commented 4 years ago

Still getting quite a few intermittently failing tests: https://travis-ci.com/github/dwyl/smart-home-firmware/builds/180839960 image

@th0mas can you please investigate this? and if it's not related to any open issues e.g. https://github.com/dwyl/smart-home-firmware/issues/12 please create a new issue. If we need to ask a question on Elixir Forum / StackOverflow or Nerves Repo, please do so and link to the question so we can track the progress. Thanks!

th0mas commented 4 years ago

Created issue #17

This was a bit of an oversight on my part as I only ever ran the tests in quick succession so never ran into heroku-timeout issues