tags:

views:

127

answers:

2

Hello guys, great site. Recently I started using mstest for testing.

  1. Is there any way to write messages to test window if test successed? I don't see the way, messages are alowed only if test fails. What if I want to let say, print little description of a test, so I can see what test means without having to open the test. Or, as now is the case, I'm measuring times of execution for some tests, I want to print that time out.

  2. Is there a way to extend test methods so to easy choose if I want tests with or without time measuring, choosing the mode of test execution?

Thanx

+2  A: 

Right click on the columns in the test result window and choose "Add/Remove Columns". Add the columns for "Duration" and "Output (StdOut)". That will give you test timing and let you see what the tests print.

hfcs101
A: 

Why not give your tests descriptive names?

[Test]
public void AddsTwoNumbersTogether() {...}

[Test]
public void DividesFirstNumberBySecondNumber() {...}

etc.

Jim Arnold