Reputation: 1239
Is there a way to get Visual Studio (2017 Enterprise) to show all values of input parameters with which the test was launched?
In the output window, there are just three dots after certain length, just as in Test explorer (which I have to drag over 2 monitors to see that and the Copy All button there should be named Copy some).
Right now I see in the output and test explorer:
27/05/2019 12:55:29 Error] [xUnit.net 00:00:03.9604849] SomeNamespace.SomeTestName(sut: SomeClass { }, someString: "spz5cf1f13d-6e3f-4f86-9a6a-5bc4cf9d0fca", foo: Foo { SomeBool = True, SomeId = 138, SomeString = "Duvodf6d90c61-f090-4f22-9e2e-37e2062bb848", SomeString = "ESSKa62ce76d-d56a-40d8-904a-fef1884ac86a", ExtensionData = null, ... }) [FAIL]
I'd like to see all values within Foo class, not "...".
I tried the "Test" options in VS, but nothing in there influences this (including logging level).
Test input is generated by AutoFixture. Sometimes the test passes, sometimes it fails. Also it is integration test, which contacts web service, which doesn't throw very nice exceptions and basically just tells me "Somehting is wrong". If I invoke test in debuger enough times, I'll have example o failing input, but there should be an easier way.
Upvotes: 1
Views: 30
Reputation: 1239
Apparenlty you need implement ToString in test parameters. The Foo class in question was generated DTO, some component (xUnit?) generated its string representation via reflection with limited length and that was displayed in test explorer and output window.
Once you implement proper ToString, Test Explorer is still showing abriged text, but Output window contains whole result of ToString.
Upvotes: 1