2

When I run Xunit tests via Visual Studio’s Test Explorer and click on the “Output” link, a new tab with the test’s log is opened in Visual Studio. The log is truncated - the following message appears:

“Log truncated: To get complete log, select ‘Copy All’ from the right click menu and then paste into a text editor like Notepad.”

Is there a way to maximize the standard output on Visual Studio,I had tried everything online and nothing seems to be working.

I'm using Visual Studio 16.8.6

Sorry if this question is being duplicated.

1 Answer 1

2

You need to add an Environment Variable to the machine you are running the tests on. The variable name is _TestExplorer_TestResultMessageMaxLength_ and set the value to however many characters you want to be retained for each unit test. The default value is 4000 characters, so without this environment variable the log will be limited to 4000 characters (per unit test).

Source: https://developercommunity.visualstudio.com/t/regression-test-explorer-copy-all-does-not-give-fu/1042000

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.