Re: httpunit and Javascript
"Wolfgang Fahl" <[email protected]>
| Newsgroups | gmane.comp.web.httpunit.devel |
|---|---|
| Organization | BITPlan GmbH |
| Message-ID | <[email protected]> |
Mark,
thanks for your reply. That is an excellent start.
I do also have the MalformedURLException problem for 37
testcases if I run them via the right mouse click "run
junit tests" (which I made available yesterday). All 710
tests run fine if I run the tests via the ant build
task. I'm just discussing this issue with Russel and I
assume it's just some global variable that needs to be
set - I'll stay tuned on this issue.
Would you please send the changes of the Java code you
made so far - if the changes don't break anything else
we might be able to already start committing some of it
and work together that way.
Discussing this on the developer mailing list might also
lead to some more support by others because the
javascript improvement is one of the most wanted
features for httpunit.
Wolfgang
>
> Hi Wolfgang,
>
> I have downloaded the current version from subversion, compiled it, and
> most of the test run. I seem to get about 70+ MalformedURLExceptions
> from the XML parser. What xerces version should I use? I am using the
> one from the 1.6.2 download.
>
> In any event, that didn't cause me trouble, because I can run the
> DocumentScriptingTest successfully. I made a new test, based on
> DocumentScriptingTest, to use the createElement() and createTextNode()
> functions of Document. Both failed, with "xxx is not a function".
>
> Now, what I want to do is to be able to have a javascript function which
> does a cloneNode() (which uses createElement()), updates some
> properties (eg names and ids), called by a button click. Then, my test
> program would do a form submit, with parameters which include the newly
> created elements.
>
> To do this, we obviously need to add some methods in the JavaScript
> class. I hacked around in there and added a jsFunction_createElement()
> method to Document, so that this test runs:
>
> public void testCreateElement() throws Exception {
> defineResource("OnCommand.html",
> "<html><head><title>Amazing!</title></head>" +
> "<body onLoad='var
> elem=document.createElement(\"input\");elem.id=\"hellothere\";alert(elem
> .id);'></body>" );
> WebConversation wc = new WebConversation();
> wc.getResponse( getHostPath() + "/OnCommand.html" );
> assertEquals( "Alert message", "hellothere", wc.popNextAlert()
> );
> }
>
> I just made the createElement method create an HTMLElement for the
> input. To make this work, I think I need to somehow connect this
> HTMLElement to an HTMLInputElementImpl. Is there any overview
> documentation on how the DOM works and how these things relate?
>
> If there is some documentation on this stuff I think I can play around a
> bit more before we talk. Otherwise, I will call you on Tuesday some
> time.
>
> Thanks,
>
> Mark
>
>
> At 04:20 AM 3/26/2008, you wrote:
> Dear Mark,
>
> currently I am on vacation. I'll be back on friday. I'm in the
> german/Berlin timezone. I'd be available on late friday afternoon
> e.g. around 6 pm german time. The next opportunity would then be
> the tuesday after this. Otherwise we could exchange information by
> e-mail.
>
> A first start would be to work on your concrete problem by working
> together on the current Subversion trunk revision which was you
> option 2)
> >2. Access the current code of httpunit with
> subversion (we currently
> >use cvs for our own work - can we access the
> code with cvs?). Has
> >much progress been made on this stuff? We can
> certainly do
> >programming and submit patches ourselves, but
> it would be nice to
> >know where to get started on this, and to know
> whether this kind of
> >feature is likely to be something we could do
> with hours or days vs
> >weeks or months of programming.
> The httpunit project has test cases for every feature so that it's
> possible to extend the code without breaking existing features.
> The estimation on how much effort it would be to get what you are
> asking for plus the answer to your question how much progress has
> been made depends on the set of features you are expecting. As a
> starting point I'd recommend to count the number of features / test
> cases that are in place for what you need in comparison to the
> number for features/test cases that still need to be implemented.
> Given Russells's and my experience on progress with features/test
> cases an estimate can be derived from this. From what I recall
> Russell is also very knowledgeable in the issue of project control
> and estimation and might be able to support your request in this
> matter.
>
> So if you'd be ready to look into what's there to check the
> estimation here is my two cents for how to start:
>
> I have made good experiences using Eclipse I'm using Version 3.2
> but probably the latest Version (3.3?) will also be fine.
>
> You might want to first install eclipse and then get the latest
> patches
> The updates are available via:
> http://update.eclipse.org/updates/3.x/
> e.g.
> http://update.eclipse.org/updates/3.2/
>
> The subversion plug-in subclipse is available via:
> http://subclipse.tigris.org/update_1.2.x
>
> reading of the repository is openly available. For committer right
> you need to contact Russell and i suggest you make yourself
> familiar with the code and the coding rules and thing like that
> before proceeding in this direction.
>
> yours
> Wolfgang
>
> BITPlan - smart solutions
> Pater-Delp-Str. 1, D-47877 Willich Schiefbahn
> Tel. +49 1805 - BITPLAN / +49 1805 248 752, Fax +49 2154 811-481
> Web: http://www.bitplan.de
> bitplan GmbH, Willich - HRB 6820 Krefeld, VAT-ID: 10258040548,
> Geschäftsführer: Wolfgang Fahl
>
BITPlan - smart solutions
Pater-Delp-Str. 1, D-47877 Willich Schiefbahn
Tel. +49 1805 - BITPLAN / +49 1805 248 752, Fax +49 2154 811-481
Web: http://www.bitplan.de
bitplan GmbH, Willich - HRB 6820 Krefeld, VAT-ID: 10258040548,
Geschäftsführer: Wolfgang Fahl
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Httpunit-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/httpunit-develop