Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up some sort of unit testing/CI thing #18

Open
simon-andrews opened this issue Aug 15, 2018 · 4 comments
Open

Set up some sort of unit testing/CI thing #18

simon-andrews opened this issue Aug 15, 2018 · 4 comments
Labels
good first issue Good for newcomers

Comments

@simon-andrews
Copy link
Owner

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.

@simon-andrews simon-andrews added enhancement New feature or request good first issue Good for newcomers labels Aug 15, 2018
@mattrossman
Copy link
Collaborator

@simon-andrews
Copy link
Owner Author

Done: https://travis-ci.org/simon-andrews/umass-toolkit

Nothing happens till we add a config though.

@simon-andrews simon-andrews removed the enhancement New feature or request label Aug 18, 2018
@TsarFox
Copy link
Collaborator

TsarFox commented Aug 27, 2018

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)

@simon-andrews
Copy link
Owner Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants