How to prevent expected exceptions from breaking the debug test run?

后端 未结 3 1751
说谎
说谎 2020-12-19 01:03

When running MSTEST unit tests in debug mode, the execution stops in every expected exception that is thrown. My test looks like this

[TestMethod()]
[Expecte         


        
3条回答
  •  生来不讨喜
    2020-12-19 01:19

    Did you try running the tests using ctrl-R ctrl-T instead of ctrl-R T?

    EDIT If it's not a keyboard shortcut issue, then check out this link. You could try the following as noted there:

    1. Disable "break on user unhandled exceptions" for the exception types you you are encountering here (via Debug -> Exceptions)
    2. Disable "break on user unhandled exceptions" for all exceptions (via Debug -> Exceptions)
    3. Disable "Just My Code"

提交回复
热议问题