I suggest you ...

Mark tests using TestCaseSource as failed if an error in the method providing the TestCaseData fails

Currently an NUnit test that uses a TestCaseSource attribute to provide the data will not show up at all if the method providing the TestCaseSource data has an exception.

I often end up resorting to Resharper to run the offending test to find out what is going on.

It would be nice if the tests that are failing because their TestCaseSource is not running can show up as failed tests the same way that they do in Resharper.

4 votes
Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)

We’ll send you updates on this idea

Nathan Johnstone shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

1 comment

Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
Submitting...
  • James Nail commented  ·   ·  Flag as inappropriate

    I do this exact same thing too. It's not just necessarily TestCaseSource though -- any dynamically generated test cases generally suffer from this. In my case I use AutoFixture's autodata attributes feature, and when something is wrong with one of my tests, NCrunch just stops recognizing that test entirely.
    Resharper will still run my test and show me any exceptions that were thrown in test setup.

Feedback and Knowledge Base