Tigge / antfs-cli

Extracts FIT files from ANT-FS based sport watches such as Garmin Forerunner 60, 405CX, 310XT, 610 and 910XT.
MIT License
312 stars 76 forks source link

Unit tests + TravisCI #117

Closed Toilal closed 9 years ago

Toilal commented 9 years ago

Maybe you already know TravisCI, but this service is great to build and run unit tests on each push performed, against each supported python version.

This could be added on this project, but also on openant project. I can make the travisCI configuration and CI build in setup.py if you want @Tigge, but you will have to configure the TravisCI webhook in github (Step 1 & 2 in the link) for both projects.

Also, coveralls.io is as service for measuring code coverage on unit tests, could be nice to include too.

Also we could use setuptools instead of distutils. (for example, to make python setup.py test just works).

The following is just an idea, as there are already unit tests included in openant : Maybe we could add a feature to "record" a real device messages at some time, to be able to replay it for test purposes. I think we could add a test to simulate download and upload for each supported device.

Tigge commented 9 years ago

I'm all for resources that can help with testing in any way so I'll be happy to add any hooks needed or anything else. It is probably most interesting to start with openant, there are a few unittest there that doesn't require a device so those can be set up and made to run right away. In comparison with openant, antfs-cli is actually rather tiny. But if you or anyone else want to add more unit tests to either of the projects no one would be more happy then me :smile:.

Moving from distutils to setuptools is also fine by me, seems the later is the preferred way nowadays.

Using fake device data with test in openant is certainly a good thing to do, whether that is recorded or just constructed or simulated in some way. With more development two clients running openant should be able to talk with each other as well, could be interesting for tests.

But let's start with the configuration and test in setup.py and then I'll set up that hook.

Tigge commented 9 years ago

Ok, added hook: https://travis-ci.org/Tigge/openant

Toilal commented 9 years ago

Thanks ! Could you add coveralls.io too ? Having the code coverage figures will help to try to increase it :) I'll make a PR with setuptools and .travis.yml configuration file.

Tigge commented 9 years ago

Done: https://coveralls.io/r/Tigge/openant

Toilal commented 9 years ago

I've opened PR in both projects @Tigge, let's try merging the one from openant it should then run tests in travisCI and add upload code coverage to coveralls.IO.

Tigge commented 9 years ago

And we can close this now. Thanks!