GHPReporter / Ghpr.MSTestV2

Adapter for MSTestV2 (generate HTML report for MSTestV2)
https://ghpreporter.github.io/
MIT License
3 stars 1 forks source link

MSTestV2 real-time reporting #26

Open angyaloliver opened 4 years ago

angyaloliver commented 4 years ago

Hi @elv1s42,

I have managed to set up real-time reporting with NUnit and I was wondering whether the same is possible with MSTest (or MSTestV2). Is it possible that if I run my tests via vstest console/MSTest.exe, the report will be generated (the same way as with nunit3-console)? I also managed to make MSTest with imported .trx files work (with Ghpr.Console) and I am not sure whether I am missing something or it is not possible yet.

Thank you in advance!

elv1s42 commented 4 years ago

Hi @angyaloliver!

Thank you for this issue. The short answer: This feature is not supported yet. The long answer: When tests are running using Ghpr.NUnit package, we are using the NUnit extension point (https://github.com/nunit/docs/wiki/Event-Listeners) which helps to get real-time test results. I tried to find some similar extension points to implement a similar feature for MSTest or/and MSTestV2 but didn't find any useful information. If you know any links to MSTestV2 documentation please let me know. I wan only able to find this related document: https://github.com/Microsoft/testfx-docs/blob/master/RFCs/003-Customize-Running-Tests.md According to this document I may need to create a custom attribute that should be used instead of the standard one in order to include tests in the report in "real-time" mode.

Thank you

angyaloliver commented 4 years ago

Thank you for the quick response. I will let you know if I find something.

elv1s42 commented 4 years ago

@angyaloliver, it looks like there are some extension points that can be used for real-time reporting in MSTestV2!

Moreover, I've raised the question about extension points about a year ago inside the MSTestV2 repository (see https://github.com/microsoft/testfx/issues/626), but completely forgot about it! 🤦‍♂🤦‍♂🤦‍♂

I'm reopening this one, will try to implement the real-time reporting for MSTestV2