|
From: Owen R. <OR...@th...> - 2003-07-15 20:23:28
|
> Looks cool, but I think I'm missing something. Can you give me a > scenario of when it would be preferable to host a mock in a remote > server? the scenario for using a remotable mock is when writing the stub code to communicate with a remote server. it enables you to mock out the behaviour of the server without needing to hit the server. you can verify that the data passed back and forth can be correctly marshalled, that your remoting configuration is being properly loaded, and that (when you use RemotingConfiguration) you are actually hitting the remote instance -- not simply a local instance. > One of the reasons we started mocks in the first > place was to get away from testing against servers -- just > too many failure modes. it's hard to see what the failure modes are? the mock server is hosted locally. you are simply opening sockets on the local machine and passing data back and forth. if this doesn't work on your development/integration machine then there is probably something wrong with your environment. i can see the concern if the server is remote or requires installing and configuring some external bit of software. part of the reason that i really like it is that it enables you to simulate and test your failure modes: what happens if the server throws this exception from this method. oh ok, let me write some code to handle that. > Would this be better as an extension to a core library? this depends on how you define an extension. the code is located in a separate folder/namespace (NMock.Remoting). i think that this is a reasonable location for it. it has no impact on existing nmock users and it introduces no new dependencies into the nmock assemblies. i can't see any criticism of including it, unless you think that it is somehow polluting the core intentions of the library. o. --- R. Owen Rogers ThoughtWorks Ltd Peek House 20, Eastcheap London EC3M 1EB tel: +44 (0) 207 090 7400 mobile: +44 (0) 787 673 8898 ThoughtWorks - Deliver with passion! |---------+-----------------------------------------> | | Steve Freeman | | | <st...@m3...> | | | Sent by: | | | nmo...@li...| | | ceforge.net | | | | | | | | | 07/13/2003 08:26 PM | |---------+-----------------------------------------> >--------------------------------------------------------------------------------------------------------------------------------------------------| | | | To: Joe Walnes <jo...@tr...> | | cc: Owen Rogers <OR...@th...>, nmo...@li... | | Subject: Re: [Nmock-general] remotable mocks | >--------------------------------------------------------------------------------------------------------------------------------------------------| I'm also concerned. One of the reasons we started mocks in the first place was to get away from testing against servers -- just too many failure modes. Would this be better as an extension to a core library? S. Joe Walnes wrote: > Looks cool, but I think I'm missing something. Can you give me a > scenario of when it would be preferable to host a mock in a remote server? ------------------------------------------------------- This SF.Net email sponsored by: Parasoft Error proof Web apps, automate testing & more. Download & eval WebKing and get a free book. www.parasoft.com/bulletproofapps1 _______________________________________________ Nmock-general mailing list Nmo...@li... https://lists.sourceforge.net/lists/listinfo/nmock-general |