{"id":20830416,"url":"https://github.com/javiertuya/dotnet-test-split","last_synced_at":"2025-05-07T22:21:49.844Z","repository":{"id":39663736,"uuid":"436310822","full_name":"javiertuya/dotnet-test-split","owner":"javiertuya","description":"Splits dotnet test trx files into separate junit xml files like those generated by maven surefire report plugin. The trx files can be generated from MSTest, NUnit or Xunit.","archived":false,"fork":false,"pushed_at":"2025-05-03T05:29:53.000Z","size":105,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-03T06:25:02.240Z","etag":null,"topics":["junit","mstest","nunit","reporting","split","surefire","xunit"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/javiertuya.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-08T16:11:14.000Z","updated_at":"2025-05-03T05:29:56.000Z","dependencies_parsed_at":"2023-02-01T03:35:12.437Z","dependency_job_id":"c4a8871d-20ca-449c-9584-9abc187a07e1","html_url":"https://github.com/javiertuya/dotnet-test-split","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javiertuya%2Fdotnet-test-split","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javiertuya%2Fdotnet-test-split/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javiertuya%2Fdotnet-test-split/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javiertuya%2Fdotnet-test-split/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/javiertuya","download_url":"https://codeload.github.com/javiertuya/dotnet-test-split/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252962852,"owners_count":21832409,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["junit","mstest","nunit","reporting","split","surefire","xunit"],"created_at":"2024-11-17T23:24:27.245Z","updated_at":"2025-05-07T22:21:49.820Z","avatar_url":"https://github.com/javiertuya.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Status](https://github.com/javiertuya/dotnet-test-split/actions/workflows/test.yml/badge.svg)\n[![Nuget](https://img.shields.io/nuget/v/DotnetTestSplit)](https://www.nuget.org/packages/DotnetTestSplit/)\n\n# dotnet-test-split\n\nSplits `dotnet test` trx files into separate junit xml files like those generated by maven surefire report plugin.\nThe trx files can be generated from MSTest, NUnit or Xunit.\n\nCan be used to generate html reports using some tools like `junitreport` ant task to provide a browsable report of the testcases results\nto be exported from your CI environment. \n\n## Usage\n\nFrom the solution folder, run your tests specifying a trx logger, e.g. given the project MyProject a trx report is generated at the reports folder:\n\n```\ndotnet test MyProject/MyProject.csproj --logger \"trx;LogFileName=../../reports/mstest-report.trx\"\n```\n\nInstall as a [.Net Core tool](https://docs.microsoft.com/es-es/dotnet/core/tools/dotnet-tool-install):\n```\ndotnet tool install --global DotnetTestSplit\n```\n\nRun the `DotnetTestSplit` tool, passing the trx file as parameter.\nThe below example will place each junit xml report file at the report folder, one file per test class\n\n```\nDotnetTestSplit reports/mstest-report.trx reports\n```\n\n## Generating html reports\n\nYou can generate the reports in html format using the [junit report ant task](https://ant.apache.org/manual/Tasks/junitreport.html). \nthe below task will generate the two different views of the html reports in folders `junit-frames` and `junit-noframes`:\n\n```\n\u003cjunitreport todir=\"reports\"\u003e\n  \u003cfileset dir=\"reports\"\u003e\n    \u003cinclude name=\"TEST-*.xml\" /\u003e\n  \u003c/fileset\u003e\n  \u003creport format=\"frames\" todir=\"reports/junit-frames\" /\u003e\n  \u003creport format=\"noframes\" todir=\"reports/junit-noframes\" /\u003e\n\u003c/junitreport\u003e\n```\n\n## Publishing html reports from CI\n\nThese html reports can be managed by you CI environment:\n\nTo publish the html report (with frames) to Jenkins you can include the following statement in your Jenkinsfile:\n\n```\n publishHTML([allowMissing: true, alwaysLinkToLastBuild: true, keepAll: false, \n    reportDir: \"reports/junit-frames\", reportFiles: 'index.html', \n    reportName: 'JUnit report with frames'])\n```\n\nTo create an artifact including the html reports using GitHub Actions, you can include the following step in your workflow:\n\n```\n  - name: Publish test report files\n    if: always()\n    uses: actions/upload-artifact@v2\n    with:\n      name: Html test reports\n      path: |\n        reports/junit-frames\n        reports/junit-noframes\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaviertuya%2Fdotnet-test-split","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaviertuya%2Fdotnet-test-split","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaviertuya%2Fdotnet-test-split/lists"}