سؤال

I have some MSTest unit tests that are running just fine on my machine but are failing in my autobuild.

The error gives a generic fault exception then says "See the inner exception for details".

Normally I would just run the test then examine the inner exception. But it is working fine on my machine.

Is there a way to tell the tests to record the inner exception test too? Or do I have to log on to my build machine and try to run the tests from there? (Not really a great solution in my opinion.)

هل كانت مفيدة؟

المحلول

I'm not aware of any method to get the exception after a test has failed.

You could always use a logger to log the exceptions that occur and write them to a file or mail them to you so you get all the details you need.

Or you could (temporarily) wrap your unit test in a try/catch -> throw and write the InnerException to your test outcome.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top