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

Implement Unit Tests #57

Open
thomthom opened this issue Dec 5, 2012 · 6 comments
Open

Implement Unit Tests #57

thomthom opened this issue Dec 5, 2012 · 6 comments

Comments

@thomthom
Copy link
Member

thomthom commented Dec 5, 2012

Once we've implemented an API for automating import and export, refactored the blocking messageboxes out of the code, #47, we should add some unit tests to this project.

@jimfoltz
Copy link
Contributor

What would be some useful tests? I'm not sure I completely understand what to test for.

@scottlininger
Copy link
Contributor

What level to unit test a piece of working software is always a matter of pro and con. The religious would say that every method (and every code path inside that method) should be unit tested, and if that's hard to do then you should refactor.

The mildly practical would say "don't fix what's not broken," which throws out refactoring but still leaves unit testing every method as a good path.

In my opinion, the first step is to document a simple and standard way of running unit tests, even if we don't choose to attempt 100% code coverage. Then any bugs can be "proven to exist" then "proven to be fixed" by writing the unit test that demonstrates the problem.

@thomthom
Copy link
Member Author

Seeing that the SketchUp team is more experienced than the rest of the collaborators here, maybe you lot can start up with a couple of tests so we can use as an guide?

Monkey see, monkey do. oook

@jimfoltz
Copy link
Contributor

jimfoltz commented Mar 9, 2013

Yes, please layout an example or pattern we can follow.

@scottlininger
Copy link
Contributor

K. I'll add it to my work list and try to post an example soon...

@thomthom
Copy link
Member Author

Might move this to version 2.3 - depending on the progress of TestUp2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants