简体   繁体   中英

execute/debug a unit test “method” in c#?

is there any way to execute/debug a unit test "method" in c#. I m new to unit testing and there are lot of test methods in our file. I needed to test one among them.

Just put a breakpoint inside the unit test method and then use Ctrl+R+T . This will run the unit test in debug mode and the breakpoint will be hit. Alternatively to using the keyboard shortcut you could open the Test Explorer Window and then locate the unit test you want to run, right click on it and select Debug Unit Test.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM