Win a copy of Terraform in Action this week in the Cloud forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

JUnit/Test Manager: Logging Results

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok let's start simple. Let's say all I want to do is capture Pass/Fail results from my JUnit execution that is run on our nightly builds. Maybe this is like a stability metric for planning purposes.
Both the test tool(TestManager) and JUnit have a base class which is normally extended in your unit test creation. The TestManager base class sets up the connection to the repository for storing results. I have a simple method call in this base class to log a result.
What's the smartest way to do this integration? Have the JUnit base class extend the testManager base class and modify the Assert method in the JUnit framework to log a pass/fail result as well as display a JUnit failure?
 
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You might take a look at Artima SuiteRunner, which adds reporting and some other things to Junit. Seethe SuiteRunner home page
 
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ant already has this capability. Check out the JUnit and JUnitReport tasks. I use them in our automated builds and they produce excellent looking reports.
 
John Pritchard
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the replies. I guess in my project's case, we are trying to use the same common repsoitory that we use for functional and load tests (Rational TestManager).
 
Loren Rosen
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One additional comment...
Unit tests can be run both by developers and by QA. I assume you're just interested in logging the QA runs?
 
John Pritchard
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You got it. That's really the whole point of this; to allow QA to execute JUnit tests from their Test Management sofwtare they use for Functional and Performance tests.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic