jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From laurent.duper...@masq.ca
Subject I'm probably misunderstanding something here...
Date Thu, 11 Apr 2002 20:08:06 GMT

I'm trying to run the attached servlet test, but when I do, I get an error
on the assertion of the content type as text/plain. If I use my Web browser
to access the URL, though, I get the correct type.
Here is the ant target that runs the test:

	<target name="run_tests">
	<echo message="Running tests"/>
    <junit printsummary="yes" haltonfailure="yes" haltonerror="yes" fork="yes">

        <pathelement path="${build}"/>
		<pathelement path="etc"/>
        <pathelement location="${weblogic.lib}/weblogic.jar"/>
		<fileset dir="lib">
		  <include name="**/*.jar"/>
		  <exclude name="**/log4j.jar"/>

        <formatter type="plain" usefile="false"/>

        <test name="ca.masq.prototype.laurent.cactus.CactusServletTest"/>


And the error I get is:

     [echo] Running tests
    [junit] Running ca.masq.prototype.laurent.cactus.CactusServletTest
     [java] [warning] Failed to configure logging system : Could not find file [/log_server.properties]
     [java] log4j:ERROR No appenders could be found for category (org.apache.cactus.server.ServletTestRedirector).
     [java] log4j:ERROR Please initialize the log4j system properly.
    [junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 0.717 sec
    [junit] Testsuite: ca.masq.prototype.laurent.cactus.CactusServletTest
    [junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 0.717 sec
    [junit] Testcase: testHelloWorld took 0.706 sec
    [junit] 	FAILED
    [junit] Unexpected type expected:<text/plain> but was:<application/x-www-form-urlencoded>
    [junit] junit.framework.AssertionFailedError: Unexpected type expected:<text/plain>
but was:<application/x-www-form-urlencoded>
    [junit] 	at ca.masq.prototype.laurent.cactus.CactusServletTest.endHelloWorld(Unknown Source)
    [junit] 	at org.apache.cactus.AbstractTestCase.callEndMethod(AbstractTestCase.java:329)
    [junit] 	at org.apache.cactus.AbstractTestCase.runGenericTest(AbstractTestCase.java:460)
    [junit] 	at org.apache.cactus.ServletTestCase.runTest(ServletTestCase.java:133)
    [junit] 	at org.apache.cactus.AbstractTestCase.runBare(AbstractTestCase.java:400)
    [junit] Testcase: testHelloWorld
Trying to override old definition of task runservertests

Where is my understanding incorrect?



Laurent Duperval <mailto:laurent.duperval@masq.ca>

"God hates me, that's what it is ..."

View raw message