Warwick,

thank you so much for this.
I have focussed on ServletAccessTest for a start. It looks like this testcase can not be run on it's own.

testServletParameters(com.meterware.servletunit.ServletAccessTest)  Time elapsed: 0.004 sec  <<< ERROR!
java.lang.NullPointerException
at com.meterware.servletunit.ServletUnitClient.newInvocation(ServletUnitClient.java:82)
      at


setInvocationContextFactory is not called before calling newClient(). Instead of a null pointer exception there will be a RunTimeException now and it's checked that setInvocationContextFactory has a non-null parameter.

 /**
     * set the invocation context factory to be used
     * @param invocationContextFactory
     */
    static void setInvocationContextFactory( InvocationContextFactory invocationContextFactory ) {
        if (invocationContextFactory==null)
            throw new RuntimeException("setInvocationContextFactory called with null invocationContextFactory parameter");
        _invocationContextFactory = invocationContextFactory;
    }

Russ - how do we get a proper InvocationContextFactory setup for ServletAccessTest?

Yours
  Wolfgang
Am 12.09.12 13:49, schrieb Warwick Hunter:
Fedora 16 x86_64 Quad Core

I only tested the 1085 revision. Let me know if you want me to do more.

Tests in error: 
  testServletParameters(com.meterware.servletunit.ServletAccessTest)
  testTitle(com.meterware.httpunit.WebPageTest): Invalid Http response

Tests run: 813, Failures: 0, Errors: 2, Skipped: 8

Details attached.

Warwick

Dear httpunit developers,

Kai has proposed to upload the current state of httpunit to the central maven repository.
Russell has than modified the project content to better support maven. Unfortunately the test cases did not run through reliably
and as a first measure Russell has converted the tests to JUnit 4 (see below)

I'd like to ask all httpunit developers to help test and fix the current httpunit state.

Please find below a script which can test multiple httpunit revisions using maven. Currently we are interested in the revison 1085
test results and ways to fix the remaining problems.

To test only revision 1085 the following commands will do:
svn checkout -r 1085 https://httpunit.svn.sourceforge.net/svnroot/httpunit/trunk/httpunit httpunit1085
cd httpunit1085
mvn test
Thank you for your support

Yours
  Wolfgang


# test different versions of httpunit
# to check for regression
# WF 2009-10-05
# retest 2012-09-06
root=`pwd`
#r=971
r=1085
while [ $r -le 1085 ]
do
  date=`date`
  echo testing $r at $date
  cd $root
  svn checkout -r $r https://httpunit.svn.sourceforge.net/svnroot/httpunit/trunk/httpunit httpunit$r > /dev/null
  cd httpunit$r
  mvn test > ../htestresult.$r
  grep FAILURE ../htestresult.$r
  echo done
  r=`expr $r + 1`
done

I have now converted the tests to JUnit4 and am initializing the pseudoserver once per class rather than once per test. This speeds up the tests slightly (about 15%) and makes them much more reliable. On the other hand, it does mean that the tests can be slightly interdependent - resource names should be made unique between tests. What I see now is that there are two tests which appear to be failing intermittently:

WebClientTest.testInternalErrorException
WebImageTest.testGetImage

It might be worth taking a look to see if you are seeing the same behavior and if you have any ideas on how to fix it.

rev 1085 has the following results here:

Ubuntu 12.04 LTS Quad Core 2.3 GHz:
Tests run: 813, Failures: 0, Errors: 0, Skipped: 8
[INFO] Total time: 18.200s

Mac OS Tiger Quad Core 2 GHz:
Failed tests:
  testInternalErrorException(com.meterware.httpunit.WebClientTest): Should have rejected the request

Tests run: 813, Failures: 1, Errors: 0, Skipped: 8
[INFO] BUILD FAILURE
[INFO] Total time: 20.650s

Windows XP virtual machine in Mac OS Quad Core env:
Tests hang at Running com.meterware.httpunit.WebPageTest ... and one failure before that:

Tests run: 38, Failures: 1, Errors: 0, Skipped: 3, Time elapsed: 1.781 sec <<< FAILURE!
Running com.meterware.httpunit.WebFormTest


-- 

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 

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Httpunit-develop mailing list
Httpunit-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/httpunit-develop




--
Warwick Hunter
K1300S m: +61 4 1242 1576 skype: warwickhunter



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/


_______________________________________________
Httpunit-develop mailing list
Httpunit-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/httpunit-develop

-- 

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