incubator-jspwiki-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Jaquith <>
Subject Re: Javascript jollies (was: weird access rights issue)
Date Wed, 20 Aug 2008 17:23:55 GMT
Selenium would help immensely. During the 2.8 coding cycle, I  
refactored the web unit tests so that they would run without any  
external dependencies. The rationale was that we needed to make it  
easier to create and run web unit tests. Certainly, we can (and  
should) use Selenium more to test JavaScript functionality.

The nice thing about Selenium is that you can use the Firefox Selenium- 
IDE plugin to "record" the test session. Then, with a little light  
editing you can turn it into test that runs as part of the "webtests"  
Ant target. See the mostly-accurate docs in tests/etc/selenium/ 

The bad thing about Selenium is that it does NOT seem to work with  
Firefox 3 yet. However, Firefox 2, IE, Safari etc. seem to work fine.

Regarding the other comments about JavaScript dependencies in JSPWiki,  
everyone has made good points so far. I agree that we will need move  
certain functions from the client to the server at some point --  
ESPECIALLY for any client-side code that manipulates session state. By  
"manipulating session state," I MOSTLY mean server-side (JSP, servlet,  
core) code whose processing depends on client-supplied cookies.

In the short term, we should probably file JIRA issues as reminders  
for things that should be moved.


On Aug 20, 2008, at 12:15 PM, Harry Metske wrote:

> The point is that we don't do enough automated testing, it would be  
> nice if
> we had some kind of JUnit tests for JS.
> Can the selenium tests do something here ?
> What is the "industry standard" for JS testing ?
> I, also like to keep all the goodies of JS in JSPWiki on board, and  
> let's
> get to the Stripes release as soon as we can.
> regards,
> Harry
> 2008/8/20 Janne Jalkanen <>
>> On Aug 20, 2008, at 04:42 , Terry Steichen wrote:
>> I've been wondering for some time if JSPWiki hasn't become somewhat  
>> too
>>> dependent on esoteric Javascript code for its core functionality.   
>>> Dirk
>>> has done a wonderful job - of that, there's absolutely no doubt.   
>>> When
>>> the template logic works (as it normally does quite well), it's a  
>>> marvel
>>> to behold.
>>> But when it doesn't, it's sometimes a nightmare to figure out.   
>>> I'm OK
>>> figuring out Java, servlets, HTML and the like - even with its poor
>>> documentation, I can eventually figure out the innards of JSPWiki  
>>> code.
>>> But the increasingly complex Javascript will often does me in.
>> I think the problem partly stems from the fact that Dirk is the  
>> only one
>> doing the JS hacking.  With the Java code, it's a shared effort by  
>> many
>> people, so it tends to stay readable across for least a few people,  
>> which
>> makes it readable to the rest as well.
>> I think we need a few more Javascript hackers ;-)
>> (And also we'll need to think which of the JS functionalities would  
>> be
>> better done server-side.  For example, I think section editing  
>> would be
>> nicer to do server-side, not client-side - for the simple reason  
>> that then
>> we could also lock parts of the page, or also be completely  
>> collaborative.)
>> /Janne
> -- 
> met vriendelijke groet,
> Harry Metske
> Telnr. +31-548-512395
> Mobile +31-6-51898081

View raw message