1

I have an XUnit test which is failing with a nullreference exception, probably there's some property on one of the objects that I need to give a value for but haven't. That would be easy to figure out, except attempting to debug tests isn't working. If I try to debug it with the little icon between [Fact] and the test declaration, it tells me: Test run finished in 3.4 ms. 0 Total tests - 0 Passed, 0 Failed, 0 Skipped and none of the breakpoints get hit. If I look at the test in at Test Explorer, it has the Not Run icon. The way I know it's a nullreference exception is by going to the output window, Show output from Tests, and looking there. I have the xunit.runner.visualstudio nuget package installed in my test package. Any ideas?

user973223
  • 127
  • 1
  • 8
  • NullReference exception, as any other exception, contains a line number where exception were thrown. – Fabio Jun 06 '20 at 00:19
  • yeah, the nullreference itself isn't so much what I'm concerned about, the real problem is why isn't the test run connected to the test explorer? – user973223 Jun 07 '20 at 04:23
  • +1 for mentioning `xunit.runner.visualstudio`. Have you tried the steps mentioned on this SO response? https://stackoverflow.com/a/10908685/3298119 – Baz Guvenkaya Dec 01 '20 at 05:50

0 Answers0