A discussion on development isn't complete without a mention of testing. We focus here primarily on unit and integration testing - activities often performed by the developer.
We know that a lot of you still aren't writing unit tests. You say it's too hard, or you don't have time.
It's no longer hard, since all but express versions of Visual Studio 2010 now contain built-in unit testing tools, and if you're not happy with those there are free 3rd party tools such as NUnit, xUnit, and more. Surely you can find a test framework to suit you.
But you don't have the time? Yet you do have time to spend countless hours wading through your UI and code to isolate a single failing line of code, which could have been easily found and remedied, or maybe even avoided, if unit tests existed.
We'll offer two pieces of advice:
DevForce can help make testing easier.
Unit tests shouldn't go to the database, and you don't want to fire up IIS for your EntityServer, yet you want data for your testing. You also want to refresh the data easily so that the tests don't corrupt it.
Most of the techniques for creating design time data also apply to unit tests. The EntityManager can be used in "offline" mode - created without connecting to the EntityServer, and the DefaultQueryStrategy set to CacheOnly so that no queries are sent to the server. Data can be loaded from a previously created EntityCacheState; or simple entities created, and then added or attached to the EntityManager. Your tests can then run queries and perform property navigation, without requiring a database or potentially asynchronous service calls.
DevForce provides contextual discovery via the CompositionContext, which is particularly useful in creating custom fakes and mocks for testing.
Using CompositionContext.Fake and the EntityServerFakeBackingStore, you can test much of your code without ever touching a database.
When you're ready to test against a database, you can dynamically target different databases using data source extensions. You likely use one database during development, and other databases in your staging, test and production environments. Data source extensions allow you to easily switch among these databases depending on the environment.
Ward Bell on "The Art of Unit Testing"
Patterns and practices - Many of our patterns and practices for DevForce help with building more testable components.