Analyze Test Execution Result and Output
- 2 minutes to read
After test execution is finished, CodeRush updates the test status within the code editor and in the Test Runner window. A test can have one of the following statuses:
Test is ready to run.
Test is waiting to run.
Explicit test (is not executed by the Run All button).
Test has passed.
Test has failed.
Test was ignored.
You can right-click a test to navigate to its code.
To obtain detailed information on a failed test, use one of the following ways:
Select a failed test and open the Details tab in the Test Runner window.
Hover the mouse pointer over the failed test icon in the code editor. You can use the context menu to select all text and copy it.
The Unit Test Runner also displays the output information in different tabs of the Test Runner window.
The table below shows what methods are associated with each tab. Once a method from the list below is executed, the text passed to the method as an argument appears in the corresponding tab.
|Console output||Console.Write, Console.WriteLine|
|Console errors||Console.Error.Write, Console.Error.WriteLine|
|Debug output||Debug.Write, Debug.WriteLine|
Grouping and Filtering
The Test Runner window allows you to group tests by:
- File Path
- Flat List
To see Not Run, Passed, Failed, Ignored or Explicit tests, toggle the corresponding toolbar in the Test Runner window.
The Run All command takes filtering into account. This command runs all tests shown in the tests tree when the Test Runner applied filtering.
If you are looking for a particular test, enter a part of the test method name in the Search field.
Export Test Results Data
Test Runner can export test execution results to XML.
The test results data contains the following info:
- Test name
- Execution duration (if available).
- Failure details (if the test failed).
If you want to include test’s XML documentation comments in the report:
1) Open the Unit Testing | Test Runner options page.
2) Enable the “Include XML documentation comments in export” option.