This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Keeping tests in sync

 
Shane Hartman
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the best way to keep tests in sync, we have a development group of over 30 programmers and an off-shore arm. While we have been coming down hard on those who do not keep the tests up to date when they make changes, I wonder if their is a better way.
 
Vincent Massol
Author
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Shane Hartman:
What is the best way to keep tests in sync, we have a development group of over 30 programmers and an off-shore arm. While we have been coming down hard on those who do not keep the tests up to date when they make changes, I wonder if their is a better way.

Yes, simply set up a continuous build process (using Ant/CruiseControl or Maven). Make the test run as part of the build and make Ant/Maven fail the build when the tests fail. Make the continuous build send an email to the project mailing list on failure.
-Vincent
JUnit in Action author
 
Shane Hartman
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have that setup now, and that is how we know the tests failed and who failed them becuase source control records the name of the developer. Where it has really gotten us is when a new method is added an not test case is built.
 
Jon Strayer
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Shane Hartman:
We have that setup now, and that is how we know the tests failed and who failed them becuase source control records the name of the developer. Where it has really gotten us is when a new method is added an not test case is built.

I can't automate the notification for you, but if you use Maven it will use JCoverage to generate a coverage report (that you can then used to detect missing tests).
 
Karthik Guru
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Vincent Massol:

Maven). Make the test run as part of the build and make Ant/Maven fail the build when the tests fail.

I have'nt been able to do this. We use ANT. Any idea as to how i s'd make the build fail if even one test fails.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any idea as to how i s'd make the build fail if even one test fails.

Set the haltonfailure="on" attribute into your <junit ... > task.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic