Stepping through and debugging code in Unit tests

前端 未结 8 1999
离开以前
离开以前 2020-12-09 01:34

I have not been able to debug or step through unit test.

Here is my sample test code...

using System;
using System.Text;
using System.Collections.Gen         


        
8条回答
  •  时光说笑
    2020-12-09 01:49

    If you were running nunit, that was so easy:

    1. Run nunit and open your desired assembly in it.
    2. Open visual studio -> Debug -> Attach to Process...
    3. Select process of nunit
    4. Put break point in each line you want.
    5. Go back to nunit and run tests
    6. You will see that execution stops at break points

提交回复
热议问题