Profile Unit Test but not setup for that test
How do I get dotTrace to profile my unit test with a setup method without measuring the work that the setup method for that test does?
I am running Visual Studio 2013 with Resharper 8.0.2 and dotTrace 5.5.2
I am doing Line-by-line measurement with Wall Time CPU consumption.
Is there a measurement method or preference I can use to only profile the actual test method?
Or maybe I am doing it wrong :)
Please sign in to leave a comment.
Hi Anders,
What unit testing framework do you use? I guess it's NUnit according to "setup", but please confirm :)
Correct, it is NUnit
Hi Robert,
I've just checked this case, and dotTrace seems to distinguish Setup and Teardown from Test method. I've tried an elementary code:
And it produced the following result in the snapshot:
As you can see, both timing and method list look like these three methods are profiled separately. What is the difference in your case? Maybe you can send me an example of your code? My email is alexandar.rudenko@jetbrains.com.
Thanks for your answer.
This is indeed the way it works for me as well.
I was just wondering if it possible to exclude the work done by the setup method when profiling.
No, it's impossible - dotTrace profiles everything that happens in the application :)