undefined
undefined

Reputation: 34238

MSTest custom test-pass message

This is a bit of an unusual question but I have a test case with MSTest which goes through an assembly via reflection and tests if all types which match some pattern are serialisable. This all works fine and gives me good results. However it would also be useful to see a custom message on test pass telling me how many types it found which match the pattern (as a sanity check).

Does anyone know if this is possible without having to go all the way to the console output in the results page?

EDIT

I am using VS 2012, and would like the custom message to display on the test passed screen instead of having to go all the way to output to view the results.

enter image description here

Upvotes: 3

Views: 1627

Answers (1)

Simon Whitehead
Simon Whitehead

Reputation: 65049

Right click the column headers and go "Add/Remove columns..". Select "Output (StdOut)" and then you can do this:

Console.WriteLine("This is a message from my test!");

And it will be displayed like so:

enter image description here

Upvotes: 8

Related Questions