{"id":21102966,"url":"https://github.com/planetarium/xunit-unity-runner","last_synced_at":"2025-06-30T11:03:03.860Z","repository":{"id":50130008,"uuid":"188170895","full_name":"planetarium/xunit-unity-runner","owner":"planetarium","description":"Run Xunit tests on Unity player","archived":false,"fork":false,"pushed_at":"2022-12-04T18:53:40.000Z","size":248,"stargazers_count":16,"open_issues_count":0,"forks_count":5,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-06-30T11:02:15.367Z","etag":null,"topics":["unity","xunit","xunit-runner"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/planetarium.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-23T06:01:26.000Z","updated_at":"2024-03-27T00:49:54.000Z","dependencies_parsed_at":"2023-01-23T06:31:19.640Z","dependency_job_id":null,"html_url":"https://github.com/planetarium/xunit-unity-runner","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/planetarium/xunit-unity-runner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/planetarium%2Fxunit-unity-runner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/planetarium%2Fxunit-unity-runner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/planetarium%2Fxunit-unity-runner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/planetarium%2Fxunit-unity-runner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/planetarium","download_url":"https://codeload.github.com/planetarium/xunit-unity-runner/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/planetarium%2Fxunit-unity-runner/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262762436,"owners_count":23360326,"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":["unity","xunit","xunit-runner"],"created_at":"2024-11-19T23:57:17.086Z","updated_at":"2025-06-30T11:03:02.845Z","avatar_url":"https://github.com/planetarium.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"xUnit.net Unity Runner\n======================\n\nThis program runs [xUnit.net]-based unit tests on [Unity] player so that\na software work well on Unity's peculiar runtime environment, which differs\nfrom stable [Mono].\n\nYou can download the executable binaries from the [releases] page.\n\nThis program takes one or more *absolute* paths to .NET assembly files (*.dll*)\nand run tests in them, e.g.:\n\n~~~~ bash\n./StandaloneLinux64 \"$(pwd)\"/YourTests.dll\n~~~~\n\n~~~~ pwsh\nStandaloneWindows64.exe C:\\path\\to\\YourTests.dll\n~~~~\n\nIt also takes several options like `-c`/`--select-class` and\n`-T`/`--exclude-trait-condition`.  See `--help` for details.\n\nOn macOS you need to invoke the actual executable binary in\n*StandardOSX.app/Contents/MacOS/* directory, e.g.:\n\n~~~~ bash\nStandaloneOSX.app/Contents/MacOS/unity-xunit \"$(pwd)\"/YourTests.dll\n~~~~\n\nNote that *.dll* files to test should target on .NET Framework (e.g., `net461`),\nnot .NET Core.\n\n[xUnit.net]: https://xunit.net/\n[Unity]: https://xunit.net/\n[Mono]: https://www.mono-project.com/\n[releases]: https://github.com/planetarium/xunit-unity-runner/releases\n\n\nCircleCI-style parallelism[^1]\n------------------------------\n\nThere are two options for running tests in distributed nodes:\n`-D`/`--distributed` and `-s`/`--distributed-seed`.  The former option takes\nan argument in the `N/M` format, where `N` is the current node's zero-indexed\nnumber and `M` is the total number of distributed nodes.  This option selects\nthe subset of the test cases[^2] for the current node, and this guarantees\ntwo different nodes never run the same test case, which is redundant.\n\nFor example, the following options make the test execution to take advantage\nof CircleCI's parallelism:\n\n~~~~ bash\n--distributed=$CIRCLE_NODE_INDEX/$CIRCLE_NODE_TOTAL \\\n--distributed-seed=$CIRCLE_BUILD_NUM\n~~~~\n\n\n[^1]: See also CircleCI's related docs: [*Running Tests in Parallel*][1].\n[^2]: Before a subset is selected, all test filters are applied first.\n      Therefore, all distributed nodes have to apply the same set of filters.\n\n[1]: https://circleci.com/docs/2.0/parallelism-faster-jobs/\n\n\nFAQ\n---\n\n### I got `Magic number is wrong: 542` error.  I'm on Linux.\n\nIf the `TERM` environment variable is not set or it's a value unsupported by\nMono (e.g., `xterm-256color`) yet Unity player's built-in Mono runtime could\nthrow such an exception.  You could work around this by setting it `xterm`:\n\n~~~~ bash\nTERM=xterm ./StandaloneLinux64 \"$(pwd)\"/YourTests.dll\n~~~~\n\nSee also the related issue on the Mono project:\n\n\u003chttps://github.com/mono/mono/issues/6752\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplanetarium%2Fxunit-unity-runner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplanetarium%2Fxunit-unity-runner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplanetarium%2Fxunit-unity-runner/lists"}