Open simon-andrews opened 6 years ago
@simon-andrews Since you're the owner can you set up the account on Travis CI and select this repo to be used?
Done: https://travis-ci.org/simon-andrews/umass-toolkit
Nothing happens till we add a config though.
Might make sense to look into mocking for the tests so that we're not slamming a bunch of API endpoints on every commit. (And so tests don't fail if a server goes down, etc)
Some of the value of unit testing would be checking that all the APIs/websites we're using are still up and working the way we expect them to. I currently have Travis configured to run tests every week whether there's new commits or not, just to check this. We should look in to using mocking for checking our own code though.
We could have two test sets: our stuff, and just checking that external stuff still works. In Travis an environment variable that picks which one we run, and allow failures for the external one.
This project is getting bigger, and more code means more possibilities for bugs to surface.
I guess the goal here is to set up something with Travis and Python's built-in unit testing framework. In particular, some of the dining stuff is sketchy and I want to make sure we're handling edge cases.
I think this would be a good beginner task. You'll learn about unit testing, best practices, Python, and devops in general. There's lots of documentation for Travis, and plenty of examples all over the web to take ideas from. Setting up unit tests could be trickier, but still pretty simple.