• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Keeping tests in sync

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
it's a teeny, tiny, wafer thin ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic