Dear all,
i migrated approx 80% of my tests to 1.4rc3 without any hassle - great job!
Some little suggestions:
Julien, you converted WebTestCase.tester to a protected field as
suggested by Dirk Jerusalem and strongly supported by myself :-). While
this is OK in terms of the functionality, i'd suggest that you hide the
tester field behind a getter-method - as it was in the 1.3 version. Just
to - hide the internal WebTestCase structure and to reduce API changes.
Additionally, i'd suggest to change the overridden tearDown() to have
protected access. I cannot see any need to have this public.
The version 1.3 threw a "FailingHttpStatusCodeException" on goto(...) -
which is a nice behaviour. I tested access constraints on the WebApp
using this functionality (trying to access a protected resource ended up
in a http 403 error). Version 1.4rc3 throws an AssertionFailedError -
which prevents me to distinguish between a "wanted" failure (access to
restricted areas) and a test failure. Well, i could search the exception
message - but i think it is bad programming style to explicitely catch
AssertionFailedErrors within a test case.
After re-thinking:
the missing FailingHttpStatusCodeException lets some of my tests be
"no-tests".
original code:
try {
gotoPage("manageSites.do");
fail("FailingHttpStatusCodeException expected");
} catch (FailingHttpStatusCodeException expected) {
}
Now if i replaced FailingHttpStatusCodeException with
AssertionFailedError the test would ALWAYS run green...
So, my suggestion, keep the TestCase exceptions thrown by assertxxx()
methods and HttpErrors apart.
Thanks a lot for your efforts,
Tom
--
____________________________________________
Brockmann Consult
Dipl.-Ing. Thomas Block
Max-Planck-Str. 2 / GITZ
21502 Geesthacht
Tel: +49 (0)4152 889 304
mailto:[EMAIL PROTECTED]
http://www.brockmann-consult.de
____________________________________________
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Jwebunit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users