jUnit Tests

52 views
Skip to first unread message

Walt Javins

unread,
Mar 22, 2011, 2:10:04 AM3/22/11
to google-v...@googlegroups.com
Howdy all,

I have fixes ready for issues 18 and 19.  But before I commit them, I wanted to breach the subject of jUnit tests, as I have some ready.

1) Are tests something we'd be interested in adding to the project?
+ Test cases will help prevent regression as new contributors add to the library.
+ Testing will provide a way to verify behavior without making a round trip to google voice via test.java, which can take a couple second.
+ The project will seem more respectable (?)
- jUnit is yet another dependency for development (Though, we should ignore the test suite in the build).
- Potentially slower development if contributors feel compelled to write tests.

If we do start adding test cases:

2) Should we bundle a jUnit library with the project? Or are we still assuming that everyone will continue to use Eclipse to build, and thus have access to jUnit?

3) Should the tests be intermixed with the source code or in a parallel file hierarchy (a la Maven's standard setup)? E.g.:

If tests are intermixed we'd have something like:
~/src/com/techventus/server/voice/util/SMSParser.java
~/src/com/techventus/server/voice/util/SMSParserTest.java
 
If tests are in a parallel structure it would look like:
~/src/com/techventus/server/voice/util/SMSParser.java
~/test/com/techventus/server/voice/util/SMSParserTest.java
 
Personally, I prefer the latter, as it doesn't clutter the working tree with tests.  And it arguably makes it easier to package up a .jar without the test cases (thinking about it from an ANT/Maven perspective).

Let me know what you all think!

Walt

Matthew Blanchette

unread,
Mar 22, 2011, 10:17:06 PM3/22/11
to google-v...@googlegroups.com
Hi Walt,

For 1, I definitely think unit tests should be added to the project and hopefully become part of the normal development cycle.
I agree with your points and having any unit tests would be an improvement.

For 2, it depends if developers still want the build to depend on Eclipse. My advice would be to include the JUnit library in the project if using an Ant build, allowing for automated builds and testing.

For 3, I also agree to keep the test source files separate.

-Matt

--
You received this message because you are subscribed to the Google Groups "Google Voice Java" group.
To post to this group, send email to google-v...@googlegroups.com.
To unsubscribe from this group, send email to google-voice-j...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-voice-java?hl=en.

Joseph Malone

unread,
Mar 22, 2011, 10:18:53 PM3/22/11
to google-v...@googlegroups.com, Matthew Blanchette
Are you guys all Committers?

Walt Javins

unread,
Mar 22, 2011, 11:34:56 PM3/22/11
to google-v...@googlegroups.com
Yes.  We're both committers, according to the people list on the site.

Walt

Tobias Eisentrager

unread,
Mar 23, 2011, 4:00:23 AM3/23/11
to google-v...@googlegroups.com

I am for the unit tests as well, and please keep them seperate. I will always use eclipse so I don't care so much about external builds.

Toby

>>>> ~/*src*/com/techventus/server/voice/util/SMSParser.java
>>>
>>> ~/*src*/com/techventus/server/voice/util/SMSParserTest.java

>>>
>>>
>>> If tests are in a parallel structure it would look like:
>>>
>>>> ~/*src*/com/techventus/server/voice/util/SMSParser.java
>>>
>>> ~/*test*/com/techventus/server/voice/util/SMSParserTest.java

Jeferson Lesbao

unread,
Apr 11, 2011, 9:46:33 PM4/11/11
to google-v...@googlegroups.com
without doubt unit test are indispensable for a good software project. yet Google Voice. the unit tests and integration test has become a international pattern, in my opinion we must start with the tests as soon as possible;
Jeferson L Siqueira. a.k.a - aajjbb

Jeferson Lesbao

unread,
Apr 11, 2011, 9:50:07 PM4/11/11
to google-v...@googlegroups.com
just to accomplish.. about the eclipse build and the separated test sources. i made Matthew my words

JM

unread,
Mar 12, 2012, 3:21:31 PM3/12/12
to google-v...@googlegroups.com
I am still waiting for someone to post some unit test code!!!
Reply all
Reply to author
Forward
0 new messages