• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Keeping tests in sync

 
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.
 
Author
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.
 
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).
 
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.
 
author
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.
 
roses are red, violets are blue. Some poems rhyme and some are a tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic