Testing Visual Basic .NET with NUnit , Page 3
Understanding the Test Cycle with NUnit
NUnit makes a copy of your class library containing the tests. It then loads the copy into its own application domain. The benefit here is that you can change your code and recompile and NUnit will automatically detect that the test assembly or dependent assemblies have changed, reloading them without necessitating an NUnit restart. This is a nice feature that permits you to seamlessly edit, compile, test, and modify code without stopping, starting, and reloading test assemblies.
In addition to loading the test assembly into its own AppDomain, NUnit looks for a file named testassembly.dll.config. This allows you to associate a configuration file with your test assemblies. For example, if you have special configuration information—a TraceSwitch, for example—you can copy that information into a .config file that will be read and used by NUnit too. Normally only Web.config and application .config files are read by .NET assemblies, but because NUnit supports a .config file you will not have to modify code that is dependent on a .config file for NUnit testing.
About the Author
Paul Kimmel is a freelance writer for Developer.com and CodeGuru.com. Look for most recent book "Advanced C# Programming" from McGraw-Hill/Osborne on Amazon.com. You can also look for his upcoming book Visual Basic .NET Power Programming from Addison-Wesley. Paul Kimmel is available to help design and build your .NET solutions and can be contacted at email@example.com.
# # #
Page 3 of 3