Thread: [Httpunit-develop] Need Help!!!
Brought to you by:
russgold
From: kesav r. <ke...@gm...> - 2011-12-15 13:54:40
|
Dear Http Developer, Is there any API with HTTPUnit where i can get the WebLink from WebResponse based on the XPATH. I am not able to find any API which can support this under WebResponse class. I am using httpunit-1.7 version. Thanks In Advance, Kesav |
From: Wolfgang F. <wf...@bi...> - 2011-12-19 07:58:59
|
Dear httpunit developers and users, Please let me know what other questions you'd like to see answered in this FAQ and I'll try to add them together with a decent answer. Please read the parts on Questions #5 and #6 before submitting any proposed changes ... this will speed up things a lot. The response time is much higher for responses following the procedure. Otherwise it might take month or even a year or two before the maintainers get to work on your responses. The 1.7.1 release has been overdue for quite a while now - please use the subversion snapshot for the time being. FAQ === 1. Where can I get information on httpunit? 2. Where do i get the most recent version of httpunit 3. Where do I find examples for the use of httpunit? 4. How do I sign up for the developer mailing list? 5. How do I get support for httpunit? 6. How can I suggest modifications to httpunit? 7. How do I find a testcase to start from? 8. What is the development environment for httpunit? 9. What do I do if i have trouble using httpunit with JavaScript? 10. Who are the developers behing httpunit? 11. What is the current version of httpunit? 1. Where can I get information on httpunit? ------------------------------------------- httpunit is an OpenSource Project and it is hosted on SourceForge at https://sourceforge.net/projects/httpunit. There is a project homepage at http://www.httpunit.org/ which contains a limited set of documentation. There is a general FAQ section at http://www.httpunit.org/doc/faq.html 2. Where do i get the most recent version of httpunit ----------------------------------------------------- The most recent version of httpunit can be found in the Subversion repository. The repository is explained at: https://sourceforge.net/scm/?type=svn&group_id=6550 the URL for it is: https://httpunit.svn.sourceforge.net/svnroot/httpunit/trunk/httpunit/ to build and test it use the following commands (after installing maven ...) mvn compile (optional first step) mvn test (optional second step) mvn package (will compile and test anyway ...) A nice browser front end for it is: http://httpunit.svn.sourceforge.net/viewvc/httpunit/trunk/httpunit/ 3. Where do I find examples for the use of httpunit? ---------------------------------------------------- a) There is a "cookbook" http://www.httpunit.org/doc/cookbook.html b) There is a tutorial: http://www.httpunit.org/doc/tutorial/index.html c) There are examples delivered with httpunit and accesible via the subversion respository: http://httpunit.svn.sourceforge.net/viewvc/httpunit/trunk/httpunit/examples/ 4. How do I sign up for the developer mailing list? --------------------------------------------------- via the link https://lists.sourceforge.net/lists/listinfo/httpunit-develop 5. How do I get support for httpunit? ------------------------------------- This mailing list and the trackers on https://sourceforge.net/projects/httpunit/support are a good point to start. Don't expect too much - you might want to get active yourself. 6. How can I suggest modifications to httpunit? ----------------------------------------------- httpunit is strictly based on test-first development. If you'd like to get it modified you might want to prove your point by showing what is not working and how you would like it to work. Doing this within the JUnit testsuite of httpunit is the preferred way. And providing the test source code first gives you much better chances of a quick response. If you'd like to supply a minor change that is easy to understand and does not change anything or not much (e.g. adding a comment or changing the layout of a statement or doing an algorithm slightly different) then it might be sufficient to show that the change does not break any of the existing test cases. Don't count on this. A JUnit test case is your better option. Please supply a testcase with the expected result for the feature you are asking for and we'll look into implementing it. For a start you might want to get the trunk version from the subversion repository (see https://sourceforge.net/scm/?type=svn&group_id=6550 and have a look at the source code of some of the more than 800 JUnit based testcases in there. Eclipse workspace patch files are welcome - other formats are also o.k. but just a bit more work. When you are ready you might want to attach the testcase (and if you already have started implementing it also the actual code) to your feature request. If you propose a change make sure that all testcases run so after the change there should be more testcases than before and none of them is broken / does not work any more. This should give you a clue on what a proper testcase for httpunit looks like. The main communication about further details of the development is via the httpunit developer mailinglist. 7. How do I find a testcase to start from? ------------------------------------------ a) To find such tests I usually set a break point at the function that I'd like to test and then run all tests from the HttpUnitSuite. When the debugger halts at the breakpoint you'll see which test(s) called the function. b) Another option is to search the full source code of all tests for keywords that match what your are intending to do c) A third option is to look in the tracker items https://sourceforge.net/tracker/?group_id=6550 and look for a comparable issue. Then use the trackers id e.g. Bug report number to find a test case for it. 8. What is the development environment for httpunit? ---------------------------------------------------- You need a Java compiler and may be an Integrated Development Environment like Eclipse. Using maven ist the simplest way to compile, test and package httpunit. If you use Eclipse you might want to set your MAVEN_REPOSITORY variable to the root of your maven repository e.g. on a Mac and or Linux to .m2/repository Currently httpunit is mostly tested on these operating systems: - Windows XP, Windows 7 - Suse Linux 11.3 - The latest Mac OS X (10.6) The test environment is Eclipse Indigo 3.7.1 with a JDK 1.6 compiler set to JDK 1.4 compatiblity mode (this is also what you'll find set up in the Subversion library) People from this mailing list also test with command line Maven environments, NetBeans and what have you got (it would be good to get some examples named here ... feel free to let me know your environment if it is an addition to the above) 9. What do I do if i have trouble using httpunit with JavaScript? ----------------------------------------------------------------- HttpUnit 1.x support of Javascript is limited. There is a new Javascript engine in development but the development is almost stalled due to limited resources. To work around the issue you might want to - try the new scripting engine - switch off javascript - if you get an org.mozilla.javascript.EcmAError ... undefined ... find the missing javascript function, implement it and supply the patch for the community see "6. How can I suggest modifications to httpunit?" 10. Who are the developers behind httpunit? ------------------------------------- Russell is the main developer of httpunit. He made it open source and dozens of people have since then supplied input e.g. in form of patches. Wolfgang has been committer for a few years now - he concentrates on communicating with the developers and gathering patches. 11. What is the current version of httpunit? ------------------------------------ The 1.7 release available for download on Sourceforge is stable but does not have the set of patches since that release. A maintainance release is due since mid 2010 and might show up anytime soon. Thank you for reading these Frequently Asked Questions and Answers. Yours Wolfgang -- BITPlan - smart solutions Wolfgang Fahl Pater-Delp-Str. 1, D-47877 Willich Schiefbahn Tel. +49 2154 811-480, Fax +49 2154 811-481 Web: http://www.bitplan.de BITPlan GmbH, Willich - HRB 6820 Krefeld, Steuer-Nr.: 10258040548, Geschäftsführer: Wolfgang Fahl |