[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jakarta-commons-dev
Subject:    [Latka:PATCH] JUnit bridge for Latka
From:       Charles Burdick <charles_burdick () yahoo ! com>
Date:       2001-10-17 21:55:04
[Download RAW message or body]


I wrote some classes that implement the Test interface of JUnit and the
LatkaEventListener of Latka.  This allows you to use the JUnit test
runners to drive Latka test suites and get the correct JUnit events
back.

Morgan made some commits earlier for me with the beginnings of the
Latka-JUnit bridge.  Here's the completion of that.

Examples and usage notes below.

Thanks,
Chuck


Quick usage example:
===================
import org.apache.commons.latka.junit.JUnitTestAdapter;
import junit.framework.*;

public class TestWeb extends TestCase {
  public TestWeb(String testName) {
    super(testName);
  }

  public static Test suite() {
    TestSuite result = new TestSuite();
   
result.addTest(JUnitTestAdapter.createTestFromResource("file1.xml"));
   
result.addTest(JUnitTestAdapter.createTestFromFile("/path/to/file2.xml"));
   
result.addTest(JUnitTestAdapter.createTestFromURL("http://some/file3.xml"));
    return result;
  }
}
===================
"file1.xml" is in the classpath, "file2.xml" is a regular file on the
system, and "file3.xml" could be on a remote server somewhere.

NOTE: We (read Morgan) discovered a bug in Crimson v1.1.3.  Make sure
you use the crimson from JAXP 1.1 both in your $CLASSPATH and in your
$ANT_HOME/lib.


__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com
["junit-bridge.patch.gz" (application/x-gzip-compressed)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic