xunit.runner.wpf icon indicating copy to clipboard operation
xunit.runner.wpf copied to clipboard

Output results in xml

Open Dre-Tas opened this issue 5 years ago • 4 comments

Hi everyone and thanks for the amazing project!

We forked this project to create a runner for Revit (architectural modelling software) and it's working great so far. The issue we're having now is that, to implement CI pipelines, we're trying to spit out an xml results file that will be then read by Azure.

Does this runner do that? I had a look at the code but couldn't really find anything, so I thought I'd ask in case I missed something. In case it doesn't, would you know what should I do and what xUnit APIs I should use to implement that?

Thanks!

Dre-Tas avatar Sep 30 '20 23:09 Dre-Tas

Hi,

I'm not sure exactly what content you want to have in the xml files, but for basic logging of what tests are run and their status, you probably want to implement a BaseTestRunsink to get notified of when individual tests start and stop.

Pilchie avatar Oct 02 '20 21:10 Pilchie

Thanks @Pilchie for the quick reply!

Yes something basic that I can use for CI (unfortunately I'm not too expert in this field yet so not 100% sure what I'll need) is good.

I'm thinking probably something like what's in the link at the bottom of the first post here: https://github.com/xunit/xunit/issues/1534

Do you happen to have some sample code that shows how to use that class?

Thanks,

Andrea

Dre-Tas avatar Oct 02 '20 23:10 Dre-Tas

It's used here to update the UI.

Pilchie avatar Oct 03 '20 00:10 Pilchie

Thanks @Pilchie for sharing that.

I just managed to have a good look at it, but I'm really struggling to understand how I should be using that in order to get the XML summary out.... Any help?

Dre-Tas avatar Oct 06 '20 07:10 Dre-Tas