Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


ID: 22586, POCMock

by Ludovic Dubois Email: Anonymous


POCMock is a tool for developers who carry out white box automatic testing in Microsoft.NET environment.
Download Details
FTP  download also available
CDN Login Required to Download. (You will be redirected to the login page if you click on the Download Link)
To download this, you must have registered:
A free membership

For Delphi, Version 8.0  to 9.0 20 downloads
Copyright: No significant restrictions


Size: 1,245,910 bytes
Updated on Tue, 08 Feb 2005 07:15:27 GMT
Originally uploaded on Fri, 08 Oct 2004 14:27:39 GMT
SHA1 Hash: 9F58E2D723CB714275DCC2792661D8C6F6B435EB
MD5 Hash: EF031340F573C4E32ED1895B214EFAB1

    Explore the files in this upload

Description
We all want the best products, especially those that offer the very best in quality.

Automatic unit testing is the best guarantee of quality. One very good tool makes it possible to attain this goal : NUnit.

Unfortunately, it is not enough!
Unit testing is carried out from outside the code to test: we only test the use of the classes, methods, properties… but we do not know what goes on inside. We do not know if the problem is in our class or in another class used by our class (classes over which we have no control, like those found in Microsoft.NET Framework, those of third-parties, etc.)

The following is a list of typical problems:

How can we isolate the class we want to test if it uses other classes?
Is the problem in our class?

What about those problems that we cannot reproduce automatically?
How do you test the behaviour of our software if the network goes down?

What about rare and infrequent situations?
Imagine that we have to perform a task on February 29 only. Do we have to carry out one test every four years? Do we have to change the clock every time we perform a test?

What about the availability of necessary resources to carry out the testing?
Does every developer need to have a database, a Web server, etc. to avoid conflicts during development?

How much time is needed before getting to what you really want to test?
Connecting and disconnecting from a database takes time. To conduct independent testing, this has to be done for each test and we have hundreds of tests to do!


Mocking enables you to simulate classes so that all these problems does not occurs: You call the method to test within your NUnit test (or any other test environment), and this method use the lower level classes that you simulate when mocking them. All what you have to do is specifying in your test code what calls will be done to these low level classes, what the parameters constraints are, what to return to the calling code (the code to test) in order to simulate them.

So, you can proceed the tests very quickly, without using any real resource, you can simulate troubles....

For more information, see http://www.prettyobjects.com/pocmock.aspx

   Latest Comments  View All Add New

Move mouse over comment to see the full text

Could not retrieve comments. Please try again later.

Server Response from: ETNACDC03