Menu

Test Case Listeners

Help
2007-02-13
2013-04-25
  • Jeremy Stowell

    Jeremy Stowell - 2007-02-13

    Christian,

    Is there any information on Test Case Listeners and how to implement this? 

    Thanks

     
    • Christian Hargraves

      There some docs here on how to register a listener:
      http://jameleon.sourceforge.net/globalSettings.html

      The javadocs are here:
      http://jameleon.sourceforge.net/apidocs/net/sf/jameleon/event/TestCaseListener.html

      Basically, the steps are:

      1) Create a class that implements TestCaseListener. There are two methods, beginTestCase() and endTestCase()
          a) beginTestCase gets called when the test case is first getting executed.
          b) endTestCase gets called when the test case is completed.
          c) TestCaseEvent has a method called getSource(). The source is the TestCaseTag. The TestCaseTag has a method
             called getResults (http://jameleon.sourceforge.net/apidocs/net/sf/jameleon/TestCaseTag.html#getResults())
          d) The results are TestCaseResult. It contains everything about what was executed, how long it took, what the
             attributes were, pass/failure, error message and stack trace.
      2) Register it in jameleon.conf
      3) That's it.

      Let me know if this doesn't help.

       
    • Jeremy Stowell

      Jeremy Stowell - 2007-02-14

      Thanks Christian.  I will give it a shot.

       

Log in to post a comment.