Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.

xUnit test results export to TestRail



I’ve got Selenium automation tests using C# with xUnit test framework.
When the tests are run the results are generated into a xUnit standard XML file.
I am looking at the ways to somehow import the results from XML file into the TestRail so that I have a central repo for all test runs and I can generate meaningful reports inside TestRail.
I know there’s an API I can use but creating methods inside the tests to post each test result is looking very cumbersome.
Instead it would be really great if I can import the XML file into TestRail.
please help.


Hi Dinesh,

Thanks for your posting. It’s planned to add direct support for xUnit files and potentially other formats. For now, we would recommend going through the XML files and submitting the results manually via TestRail’s API:



I would like to vote for this.


HI ericoijJPL,

Thank you for your post. I have gone ahead and added your vote to this feature request.


I have a c# script that I put together for this. It works for xunit out of the box. Where can I upload this so that others can try it out?


Hi Beto,

Thanks for your reply! You could feel free to upload this to any third party script hosting/repository service (e.g. such as GitHub or any other that you prefer). As there’s been some discussion on this post regarding this you can provide the link here, and I’m sure this could be helpful to other users! Thanks again!