hi,
I just committed the test stuff including new support for "integrated =
HttpRuntime" testing, aka "NUnitAspEx". For now, the sources of our =
NAnt.NUnit2OutProc.Task and the NUnitAspEx library can be found at
https://testingaspnet.googlecode.com/svn/trunk=20
Please give it a try and let me know, if there are any issues. If =
everything goes well, I'll tag the project(s) accordingly in google-svn =
for the spring release.
ad "NUnitAspEx":
Given the most recent TestDriven.NET version, the [AspTestFixture] tests =
should run from within both vstudios 2k3 & 2k5 as well as from within =
nant. However it does *not* work with Resharper's NUnit support as =
Resharper obviously uses a lower nunit version.
To get an idea on how to write an AspTestFixture, look at=20
=
Spring.Net\test\Spring\Spring.Web.Tests\Web\Support\PageHandlerFactoryTes=
ts.cs
and the corresponding testweb in=20
=
Spring.Net\test\Spring\Spring.Web.Tests\Data\Spring\Web\Support\PageHandl=
erFactoryTests\*
=20
Suprisingly - at least to me - the test w.r.t =
Server.Transfer()/SPRNET-763 =
(http://opensource.atlassian.com/projects/spring/browse/SPRNET-763) / =
"PageHandlerFactoryTests.TransferAfterSetResult") does not produce any =
problem. If somoneone can spend a few minutes please double-check that I =
didn't miss something.
cheers,
Erich
> -----Original Message-----
> From: Mark Pollack [mailto:mar...@sp...]=20
> Sent: Monday, December 03, 2007 3:19 PM
> To: Erich Eichinger; 'Aleksandar Seovic'; 'Bruno Baia'
> Subject: RE: Server.Transfer() issue
>=20
> Hi,
>=20
> Thanks for the big push, and adding the foundation for the=20
> unit tests. We
> are in the home stretch after lord knows how long with 1.1. =20
>=20
> All we can do then is to follow up on DI-transfer issue with=20
> the person who
> reported it, should additional minor items come up we can=20
> schedule them for
> 1.1.1
>=20
> Cheers,
> Mark
>=20
>=20
> -----Original Message-----
> From: Erich Eichinger [mailto:E.E...@di...]=20
> Sent: Sunday, December 02, 2007 11:39 PM
> To: Mark Pollack; Aleksandar Seovic; Bruno Baia
> Subject: RE: Server.Transfer() issue
>=20
> =20
> Hi,
> =20
> I spent a couple of a couple of hours on this now. To=20
> automate testing such
> stuff, I decided to upgrade my NUnitAspEx framework to NUnit=20
> 2.4.1. I will
> commit it tomorrow - there is one minor open issue to solve.
> =20
>=20
> Anyway: I cannot confirm the problems w.r.t=20
> Server.Transfer(). Asfaik there
> have been 2 types of complaint on the forums:
>=20
> 1) A "ViewStateMac Validation" error occured
>=20
> This happens, if you do a Server.Transfer() during a Postback and has
> nothing to do w/ Spring. This is normal behaviour, because=20
> the second page
> (after the Transfer) tries to deserialize the encrypted=20
> ViewState of the
> first page.
> In this case one must use the @Page directive=20
> "EnableViewStateMac=3D'false'"
>=20
> 2) PreviousPage property is not set correctly
>=20
> I couldn't reproduce this at all. The PreviousPage property is set as
> expected to the reak type of the page (not the proxy)
>=20
>=20
> Need a lot of sleep now...
>=20
> cheers,
> Erich
>=20
>=20
> ________________________________
>=20
> From: Mark Pollack [mailto:mar...@sp...]=20
> Sent: Saturday, December 01, 2007 9:09 PM
> To: Erich Eichinger; 'Aleksandar Seovic'
> Cc: 'Bruno Baia'
> Subject: RE: Server.Transfer() issue
> =09
> =09
> X-ExchangeSecure-AntiSpam: valid(71)=20
>=20
> Hi,
>=20
> =20
>=20
> I don't know the answer, just wanted to kick start the=20
> conversation
> again ...aleks any suggestions here
>=20
> =20
>=20
> Mark
>=20
> =20
>=20
> Issue a) is par for the course....
>=20
> =20
>=20
> =20
>=20
> =20
>=20
> From: Erich Eichinger [mailto:E.E...@di...]=20
> Sent: Wednesday, November 28, 2007 1:31 AM
> To: Aleksandar Seovic; Mark Pollack
> Cc: Bruno Baia
> Subject: RE: Server.Transfer() issue
>=20
> =20
>=20
> Hi,
>=20
> =20
>=20
> thanks for the response. I'll have a look at that.
>=20
> =20
>=20
> The pb w/ populating the PreviousPage property is, that
>=20
> =20
>=20
> a) again it needs a reflection hack
>=20
> b) when should this be done? I don't think we can=20
> easily set this
> property right after calling ProcessRequest() in
> PageHandlerFactory.PageHandler.ProcessRequest().
>=20
> =20
>=20
> Is there more about it than Session & Process support?=20
> I don't think
> Session support depends on those 2 proxies. But I will=20
> double-check this.
>=20
> =20
>=20
> cheers,
>=20
> Erich
>=20
> =20
>=20
> ________________________________
>=20
> From: Aleksandar Seovic [mailto:al...@s4...]
> Sent: Wed 2007-11-28 06:33
> To: 'Mark Pollack'; Erich Eichinger
> Cc: 'Bruno Baia'
> Subject: RE: Server.Transfer() issue
>=20
> Actually, those proxies are necessary for a number of=20
> things to work
> and
> have been around from the very beginning. The process stuff was
> added to
> them way later (and should probably be taken out and handled
> differently).
> =09
> The main reason for the proxies, if I remember=20
> correctly, is that
> without
> them your pages lose HTTP session information.
> =09
> It's been a while, so I can't exactly remember why this=20
> is the case,
> but I
> do remember that they were needed to support proper=20
> session behavior
> and
> cannot be taken out that easily.
> =09
> Isn't there a way to retrieve the appropriate value and populate
> PreviousPage property on the Spring-managed page within those
> proxies.
> Actually, I things there should already be some code in=20
> there that
> deals
> with that...
> =09
> - Aleks
> =09
> -----Original Message-----
> From: Mark Pollack [mailto:mar...@sp...]
> Sent: Wednesday, November 28, 2007 12:04 AM
> To: 'Erich Eichinger'
> Cc: 'Bruno Baia'; 'Aleksandar Seovic'
> Subject: RE: Server.Transfer() issue
> =09
> Adding 'da-man' into the discussion....
> =09
> =09
> http://opensource.atlassian.com/projects/spring/browse/SPRNET-763
> =09
> We can't go with option 1) since to me that sounds like we are
> leaving the
> result-set mapping functionality broken.
> =09
> Any comments on option #2 aleks?
> =09
> =09
> Mark
> =09
> -----Original Message-----
> From: Erich Eichinger [mailto:E.E...@di...]
> Sent: Tuesday, November 27, 2007 5:57 PM
> To: Mark Pollack
> Cc: Bruno Baia
> Subject: Server.Transfer() issue
> =09
> =09
> yet another decision request:
> =09
> I investigated the issue of Server.Transfer() causing=20
> troubles when
> being
> used in Postback-scenarios. I guess I found the reason:
> Spring.Web's PageHandlerFactory.GetHandler() method=20
> doesn't return
> the
> requested page instance but a proxy (classes
> PageHandler/SessionAwarePageHandler). During=20
> Server.Transfer(), the
> output
> of GetHandler() is pushed onto a pageHandlerStack, which - among
> others - is
> used to determine the "PreviousPage" property. Of course in this
> case
> "PreviousPage" doesn't return an instance of the user's=20
> page, but
> Spring's
> proxy page instance.
> =09
> To solve those problems I expect it to be necessary to=20
> remove those
> proxies.
> Aleks' introduced them for supporting the IProcess=20
> infrastructure,
> thus I
> think we can safely remove them. Atm they are causing=20
> more troubles
> than
> they solve.
> =09
> Question - if I don't find another workaround for this issue:
> =09
> 1) File it in the release's readme under "Know issues"
> =09
> or
> =09
> 2) remove the proxy classes and risk introducing other bugs
> =09
> =09
> your choice?
> =09
> -Erich
> =09
> =09
> =09
> =09
>=20
>=20
>=20
|