The Mystery of Dynamic Assemblies
summary
Investigates slow unit-test runs caused by dynamic mocking and test frameworks: profiling revealed Moq as a slow spot, but replacing it with hand-made stubs didn’t help. Demonstrates using a profiler to compare mock libraries (Moq, NSubstitute), test frameworks (NUnit, xUnit), Reflection.Emit dynamic type generation, and Castle.DynamicProxy to locate performance root causes in the CLR (clr.dll).
AI-written summary · about
chapters (17)
- 0:00Introduction
- 1:14Slow unit tests
- 6:56Examining source code
- 11:14Mock vs Moq
- 15:10Switching to Moq
- 23:37Profiling slowest tests
- 27:13Dynamic types and reflection
- 31:29Creating dynamic types
- 35:59Performance comparison
- 39:10Testing dynamic type creation
- 42:15Multiple assemblies solution
- 47:21Updating Moq config
- 51:18Results and verification
- 53:25Investigation conclusions
- 55:10Debugging methodology
- 57:17Real project background
- 1:00:09Q&A
