You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2003/01/30 17:19:26 UTC
DO NOT REPLY [Bug 16600] New: -
JUnitTestAdapter throws SAXException because no DTD found
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16600>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16600
JUnitTestAdapter throws SAXException because no DTD found
Summary: JUnitTestAdapter throws SAXException because no DTD
found
Product: Commons
Version: 1.0 Alpha
Platform: All
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: Latka
AssignedTo: commons-dev@jakarta.apache.org
ReportedBy: richard@dallaway.com
I've not yet found a DTD to use with Latka tests, but it seems that the
JUnitTestAdapter forces validaton for Lataka tests.
For example, try something like this:
<?xml version="1.0" standalone="no"?>
<suite defaultHost="localhost" defaultPort="80" label="No-op test set" />
together with...
Test test = JUnitTestAdapter.createTestFromResource("aboveFile.xml");
assertTrue("Expected to find test", test != null);
TestResult result = new TestResult();
test.run(result);
...and you'll get:
org.apache.commons.latka.LatkaException: org.xml.sax.SAXParseException: Document
root element "suite", must match DOCTYPE root "null".
at org.apache.commons.latka.Latka.runTests(Latka.java:168)
As a "fix" I have a patch that gives the user static access to the Latka
instance used by JUnitTestAdapter, allowing the user to setValidating(false) on
the latka instance.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org