incubator-jspwiki-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Jaquith <andrew.jaqu...@mac.com>
Subject Re: web testing
Date Mon, 12 Nov 2007 01:18:35 GMT
JP - thanks for taking the initiative on JMeter. I did the original  
work on the  JWebUnit tests, and have no particular attachment to  
them. We can probably remove the Ant targets for it. The important  
thing with JMeter is that we have test coverage for the most important  
web activities, like editing pages, registering users, and the like.

I have not taken a look at your recent commits, but they sound like a  
step in the right direction!

Web unit tests are vey important. I would go so far as to say that we  
gotta get all the web tests to run cleanly before we declare 2.6.0  
stable.

On that subject, HSQL sometimes refuses to work when you run it from  
Ant. I *think* the problem might be a dangling lock file -- check the  
tests directory to see if there is one already there... Also, the Ant - 
debug parameter might also shed light on the problem.

Andrew

On Nov 11, 2007, at 19:38, Juan Pablo Santos Rodríguez <juanpablo.santos@gmail.co 
m> wrote:

> Hi,
>
> I've just committed initial support for web tests based on JMeter  
> 2.3. While
> doing it I've encountered a couple of issues I wasn't aware of and  
> I've also
> hadn't many time to dig into them:
>
> 1.- Test webapps
> The build.xml file packages and deploys 5 test webapps of JSPWiki:
> test-custom, test-custom-absolute and so on. I'm having problems with
> test-custom-jdbc and test-container-jdbc, both refuse to being  
> deployed...
> I'm thinking it's probably because of HSQL, is there any special  
> condition
> needed to start it? how can I debug on that?
>
> The other issue I've encountered with these webapps is when  
> undeploying
> them: they don't get totally (or correctly) undeployed. Almost all  
> of the
> webapp gets deleted except WEB-INF/lib/JSPWiki.jar so, after a few  
> seconds,
> it appears as deployed in the tomcat manager. If I try to undeploy  
> it again,
> I get this Exception on Tomcat:
>
> java.lang.IllegalStateException
>        at org.apache.catalina.loader.WebappClassLoader.loadClass(
> WebappClassLoader.java:1248)
>        at org.apache.catalina.loader.WebappClassLoader.loadClass(
> WebappClassLoader.java:1208)
>        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java: 
> 319)
>        at org.apache.log4j.spi.LoggingEvent.<init>(LoggingEvent.java: 
> 154)
>        at org.apache.log4j.Category.forcedLog(Category.java:388)
>        at org.apache.log4j.Category.error(Category.java:319)
>        at com.ecyrd.jspwiki.util.WikiBackgroundThread.run(
> WikiBackgroundThread.java:172)
> Exception in thread "JSPWiki Lucene Indexer"  
> java.lang.NoClassDefFoundError:
> org/apache/log4j/spi/VectorWriter
>        at org.apache.log4j.spi.LoggingEvent.<init>(LoggingEvent.java: 
> 154)
>        at org.apache.log4j.Category.forcedLog(Category.java:388)
>        at org.apache.log4j.Category.error(Category.java:319)
>        at com.ecyrd.jspwiki.util.WikiBackgroundThread.run(
> WikiBackgroundThread.java:172)
> 10-nov-2007 17:07:11 org.apache.catalina.loader.WebappClassLoader  
> loadClass
>
> I've tried to undeploy them with Tomcat Manager and with build.xml  
> script,
> same results on both.
>
> 2.- JWebUnit tests
> Days ago I said they were all failing me, probably because of me.  
> Seems
> wasn't me: I've checked against a fresh install and they do keep  
> failing
> but, the strange thing is that, when running them inside Eclipse as  
> normal
> JUnit test (right click -> run as -> JUnit test) they do work. So most
> probably is a JUnit issue. While the JUnit bundled with Ant 1.6.5 and
> 1.7probably is
> 3.8.x, Eclipse bundles JUnit 4.3. The first one complains about  
> being unable
> to parse the mootools.js file, the latter does not, and only fails  
> when
> asserting against unlocalized Strings.
>
> This is issue isn't very important as we're going to JMeter based  
> tests so
> haven't looked to much into it. Btw, which is the plan for the  
> JWebUnit
> tests? With latest cvs, they aren't any longer executed. I'd rather  
> take out
> the jwebunit libs, but keeping the tests and anotating them as  
> deprecated..
> After all they're good examples of jwebunit.
>
> 3.- JMeter
> The jmeter-tests.jmx file is prepared to be run inside the Ant  
> build, if
> anyone wants to play around with it outside the Ant build, there are  
> several
> parameters which have to be passed to JMeter at startup:  
> test.protocol,
> test.host, test.port and test.context.path. This can be accomplished  
> by
> invoking jmeter.bat/.sh with the corresponding -J flags or by  
> appending them
> to the JMETER_HOME/bin/jmeter.properties file.
>
> Also, this file has a couple of listener disabled by default,  
> they're only
> used for debugging the jmeter script, as they impact in JMeter  
> performance.
>
> Finally, I've also committed another jmx file with initial nodes to  
> start
> recording tests so, if anyone wants to, can start immediatly O:-)  
> Just move
> them to the WorkBench node and start recording.
>
> Regards,
> JP

Mime
View raw message