One of our customers is requesting for a testing protocol of the automated unit tests.
Is there a feature in CodeRush which would provide me with an overview of all tests and their state including the execution time?
If there isn't then wouldn't it be a good feature to create such a documentation by using the test output combined with XML documentation from the tests?
Or do you even know such a tool which is publicly available? I wasn't able to find one, yet.
Any feedback would greatly be appreciated.
best regards,
Alex
Hello Alex,
>Is there a feature in CodeRush which would provide me with an overview of all tests and their state including the execution time?
Test Runner Window can show execution time (duration) of the tests. By default, this is turned off and you need to toggle on "Show duration button" in the bar.
> If there isn't then wouldn't it be a good feature to create such a documentation by using the test output combined with XML documentation from the tests?
We have plans to implement the export to .html or .xml functionality for our TestRunner Window in the future. We already have such a feature in Code Coverage window. But I don't understand what it is - XML documentation from the tests. And how it should be included in the report. Is this XML doc-comments of these tests? It would be nice if you can tell us more about your needs. What report format you need .xml or .html or may be .pdf. How we should include XML documentation in this report?
>Or do you even know such a tool which is publicly available? I wasn't able to find one, yet.
If you need only XML report with test duration, then you can use for example Nunit framework andNUnit Console for test running. To generate xml-report run nunit-console.exe with the
--result:<FileName.xml>;format=nunit2
argument. <FileName.xml> - here the name of file for the generated report.
Please let us know if we can help you farther.
Hello Artem,
I can activate the generation of xml documentation files in the build properties of a project.
The xml documentation will be generated from the triple slash documentations in the code.
/// <summary> /// Class providing ActiveDirectory functionality. /// </summary> public class ActiveDirectoryHandler : IDisposable {
If I now would document all my test classes and test methods with such tags then the xml documentation file generated by the compiler could be used to generate a test run documentation as well.
The test runner could the generate a test documentation with the state and execution time of the test combined with the documentation of the tests itself.
I have now been searching for many hours for such a functionality but didn't find one. Could be a very cool feature I guess…
What do you think about that?
Best regards,
Alex
Thank you for the clarification Alex.
We have discussed your suggestion and found it interesting. We will take it into account when implementing export of a test report to .xml or .html. We will let you know once we make any progress in this field.
Hi Alex,

I would like to inform you that the latest CodeRush version (available at Visual Studio Market Place) supports export of a test report to an XML file.
Here is a screenshot illustrating how to find this function in the toolbar:
Hi George
Thank you very much for your positive Feedback.
You just hit the perfect Moment to release this feature.
We had a test session with an external Company. They requested a test execution report and I just could Show them your XML.
This was really cool.
I only have to additions to the current implementation:
- Could you please add the execution time and Duration to the XML
- could you please try to also integrate the XML Descriptions summary Information into each Tests Output
Best regards,
Alex
Hello Alex,
Thank you for the positive feedback.
To add duration for each test you need to click "Show duration" on the toolbar of the TestRunner Window (see the screenshot).
To add XML Doc Comments for test methods, you need to check the "Include XML documentation comments in export" option on the "Unit Testing \ Test Runner" options page.
We found that we do not add XML Doc Comments for types but we should, and I've created a separate ticket on your behalf (T667190: Test Runner - Test execution report does not contain XML Doc Comments for types) that will be answered shortly.
Clarify please, when you are talking "execution time" do you mean the full execution time for all tests in report?
Hi George
I just realized that there's a new Option of the test runner to include the XML comments in the Export file.
This is just great.
One Problem is that the Export crashes as soon as there's a Test which has a badly formed XML comment like follows:
///// <summary> /// Deletes all assets. /// </summary> [TestMethod()] [Ignore] public void DeleteAllAssets() {
If so the creation Fails with "An error occured during Export".
best regards,
Alex
Hello Alex,
I've created a separate ticket on your behalf (T667218: TestRunner - A test execution report fails if XML Doc comments are wrong). It has been placed in our processing queue and will be answered shortly.