{"id":16318613,"url":"https://github.com/vic/mill-test-junit-report","last_synced_at":"2025-04-08T14:33:45.056Z","repository":{"id":66386328,"uuid":"377741598","full_name":"vic/mill-test-junit-report","owner":"vic","description":"Generate JUnit xml reports from Mill's test output.","archived":false,"fork":false,"pushed_at":"2021-06-17T15:06:05.000Z","size":8,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-23T15:43:16.360Z","etag":null,"topics":["ci-cd-pipeline","junit","mill","scala","test-reporting","utest","xml"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vic.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-06-17T07:23:43.000Z","updated_at":"2024-12-29T08:25:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"106ca82d-612f-40e7-b372-2e95bedfce14","html_url":"https://github.com/vic/mill-test-junit-report","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vic%2Fmill-test-junit-report","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vic%2Fmill-test-junit-report/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vic%2Fmill-test-junit-report/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vic%2Fmill-test-junit-report/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vic","download_url":"https://codeload.github.com/vic/mill-test-junit-report/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247861271,"owners_count":21008458,"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":["ci-cd-pipeline","junit","mill","scala","test-reporting","utest","xml"],"created_at":"2024-10-10T22:24:06.882Z","updated_at":"2025-04-08T14:33:45.046Z","avatar_url":"https://github.com/vic.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Generate JUnit XML reports from Mill's test output.\n\nMany CI/CD servers already support reading JUnit XML reports and integrate well with code-review and merge-requests.\nHowever [Mill](https://com-lihaoyi.github.io/mill/mill/Intro_to_Mill.html) is still more of a Scala niche tool.\n\nThis repo contains a tiny Scala utility that can transform [Mill test](https://com-lihaoyi.github.io/mill/mill/Configuring_Mill.html#_adding_a_test_suite)\njson reports into [JUnit XML reports](https://www.ibm.com/docs/en/developer-for-zos/14.1.0?topic=formats-junit-xml-format). \n\n\n### Usage\n\n```shell\nammonite generate-junit-report.sc --help\n\nammonite generate-junit-report.sc TEST_ID TEST_NAME TARGET_JUNIT_XML_FILE SOURCE_MILL_JSON_FILE...\n```\n\n`TEST_ID` and `TEST_NAME` have no special meaning and are for you to decide. You can provide many json files as input and they will be aggreated into a single target xml file.\n\n### Example\n\nSuppose you have a `build.sc` file like:\n\n```scala\n// build.sc\nimport mill._, scalalib._\n\nobject foo extends ScalaModule {\n  def scalaVersion = \"2.13.1\"\n\n  object test extends Tests {\n    def ivyDeps = Agg(ivy\"com.lihaoyi::utest:0.7.1\")\n    def testFramework = \"utest.runner.Framework\"\n  }\n}\n```\n\nAfter running `mill foo.test` you will find mill's json report at \n`out/foo/test/test/dest/out.json`. \n\nTo convert it into JUnit XML format, execute the following ammonite script:\n\n```shell\n\u003e ammonite generate-junit-report.sc \"foo.test\" \"Foo tests\" \"foo-junit.xml\" \"out/foo/test/test/dest/out.json\"\n```\n\nthat will generate `foo-junit.xml`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvic%2Fmill-test-junit-report","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvic%2Fmill-test-junit-report","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvic%2Fmill-test-junit-report/lists"}