On Nov 4, 11:39 am, Charlie Schaubmair <
occur...@gmail.com> wrote:
> Hi,
>
> I've asked one of my questions allready in the CB-Forum, but it seems here
> are more users reading this.
>
> I'm a totally newbie in testing.
>
> I've a ColdBox App. and want to test some services I've created. For these
> services I need also the objects which will be created via other beans.
>
> These beans will be created via ColdSpring, so now my question:
> How is it possible to get these beans via ColdSpring to test it with
> MockBox?
>
> My solution for this is now working --> see attached test.cfc
>
> then I've created another test function and saw that it is always very, very
> slow (every test lasts for minimum 5 seconds), because the setUP-function is
> called for every test-function --> test2.cfc
>
> then my idea was to set everything into the application scope --> test3.cfc
> but then my:
> getController().runEvent("main.onRequestEnd");
> will not work anymore
> but it is now very fast: 0-20ms / test
>
> Am I on the correct way, or how to test this?
>
> The next question for me is:
> How to test if an user object was inserted correct into our DB?
> Maybe something like this:
>
> with an own created user dummy object), this will creat also a session with
> the user object