I do this all the time.

Not sure what experiences you're looking for; if the data is _very_ complex
it may be easier to just embed a DB and load it up with DBUnit or something
like that.

I've also used builders to load up data structures for more-complex data,
stuck that data into a map with an ID key, and use those as test/demo DAOs.
It also makes it easy to push a button in the app to restore values if you
need to show something again etc.

Basically any tutorial that talks about testing in Spring is applicable,
the only difference is the MVC layer.

Dave

On Wed, Aug 22, 2012 at 3:33 PM, Davis, Chad <chad.da...@emc.com> wrote:

> I would like to deploy my app to a UI testing / demo environment.  In this
> environment, the regular business logic objects would be replaced ( via DI
> ) with mock implementations of those resources.  These mocks would return a
> static data set, thus giving a predictable behavior against which we can
> build automated UI tests, provide a lightweight demo environment that
> doesn't need integrated into our rather large and complex real world data
> context, etc.
>
> My thoughts are to use the Spring integration to inject the mocks.  I'm
> new to doing DI / testing in this kind of setting.  Is anyone doing
> something like this?  Can you share some experiences?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


-- 
e: davelnew...@gmail.com
m: 908-380-8699
s: davelnewton_skype
t: @dave_newton <https://twitter.com/dave_newton>
b: Bucky Bits <http://buckybits.blogspot.com/>

Reply via email to