{"id":31647824,"url":"https://github.com/vshaxe/haxe-test-adapter","last_synced_at":"2025-10-17T14:35:35.942Z","repository":{"id":44880085,"uuid":"163293898","full_name":"vshaxe/haxe-test-adapter","owner":"vshaxe","description":"Haxe Test Explorer for Visual Studio Code","archived":false,"fork":false,"pushed_at":"2025-01-23T21:00:31.000Z","size":2106,"stargazers_count":30,"open_issues_count":6,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-24T12:33:30.993Z","etag":null,"topics":["haxe","testing","unittest","vscode","vscode-extension"],"latest_commit_sha":null,"homepage":"","language":"Haxe","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/vshaxe.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-12-27T12:47:53.000Z","updated_at":"2025-03-25T22:15:56.000Z","dependencies_parsed_at":"2023-12-21T02:29:39.192Z","dependency_job_id":"f2c9dce1-ccc6-4291-900f-03ae18537706","html_url":"https://github.com/vshaxe/haxe-test-adapter","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/vshaxe/haxe-test-adapter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vshaxe%2Fhaxe-test-adapter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vshaxe%2Fhaxe-test-adapter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vshaxe%2Fhaxe-test-adapter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vshaxe%2Fhaxe-test-adapter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vshaxe","download_url":"https://codeload.github.com/vshaxe/haxe-test-adapter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vshaxe%2Fhaxe-test-adapter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278734434,"owners_count":26036404,"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","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["haxe","testing","unittest","vscode","vscode-extension"],"created_at":"2025-10-07T06:46:03.874Z","updated_at":"2025-10-07T06:46:05.654Z","avatar_url":"https://github.com/vshaxe.png","language":"Haxe","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Haxe Test Explorer for Visual Studio Code\n\nA VSCode test controller for Haxe.\n\n![VSCode test controller for Haxe](images/demo.gif)\n\n## Features\n\n* Records [munit](https://github.com/massiveinteractive/MassiveUnit), [utest](https://github.com/haxe-utest/utest), [buddy](https://github.com/ciscoheat/buddy), [hexUnit](https://github.com/DoclerLabs/hexUnit), [tink_unittest](https://github.com/haxetink/tink_unittest) and [haxe.unit](https://api.haxe.org/haxe/unit/TestRunner.html) test results as JSON files\n* Shows latest test results in VSCode\n* Supports filtering / running individual tests directly from VSCode\n* Supports Haxe 3.4.7 and 4+ (detection of test function line numbers only works with Haxe 4)\n* Supports multi-root workspaces\n* Currently only works for Node.js and sys targets\n\n## Usage\n\nA small sample project for each supported framework can be found in the [samples](https://github.com/vshaxe/haxe-test-adapter/tree/master/samples) directory.\n\nYou can run your tests by clicking the button in the \"Test\" tab of the activity bar. The command that it runs can be configured via `settings.json`:\n\n```json\n\"haxeTestExplorer.testCommand\": [\n \"${haxe}\",\n \"test.hxml\",\n \"-lib\",\n \"test-adapter\"\n]\n```\n\nAs you can see, by default it assumes the presence of a `test.hxml` that compiles and runs the tests. Additionally, the `test-adapter` library is injected. It adds hooks to the different testing frameworks to record the test results in a `.unittest` folder in your workspace.\n\nWhile the `test-adapter` library itself ships with the extension and is set up automatically, you still need to install a dependency:\n\n```hxml\nhaxelib install json2object\n```\n\n`.unittest` should be added to your `.gitignore`. You might also want to hide it from VSCode's file explorer by adding this to your global settings:\n\n```json\n\"files.exclude\": {\n \"**/.unittest\": true\n}\n```\n\n### Debugging\n\nIt's also possible to debug tests using a launch configuration from `launch.json`. Which one should be used can be configured with this setting:\n\n```json\n\"haxeTestExplorer.launchConfiguration\": \"Debug\"\n```\n\nUnlike with `testCommand` for _running_ tests, `-lib test-adapter` can't be injected automatically for _debugging_. Add `-lib test-adapter` directly to your HXML file if you want results to be recorded / filtering to work while debugging.\n\n### Detection of test positions\n\nNote that for `munit`, `hexUnit` and `tink_unittest`, the test-adapter library relies on a class name filter to detect the positions of tests. This simply defaults to `~/Test/` and is checked against the names of classes and implemented interfaces anywhere in the hierarchy of a class.\n\nYou can customize the filter with `-D test-adapter-filter=\u003cfilter\u003e`. Check `.unittest/positions.json` to see what positions were recorded.\n\nFor `utest`, test detection only works when `utest.ITest` is implemented / `utest.TestCase` is extended. If this is not the case, utest will print a warning.\n\n### Coverage\n\nto enable coverage runs `haxeTestExplorer.enableCoverageUI` needs to be set to `true` (default). Haxe test explorer will show a \"Run Tests with Coverage\" button, which will then try to run the command configured through `\"haxeTestExplorer.coverageCommand\"`. it defaults to:\n\n```json\n\"haxeTestExplorer.coverageCommand\": [\n \"${haxe}\",\n \"testCoverage.hxml\",\n \"-lib\",\n \"test-adapter\"\n]\n```\n\nmake sure your coverage run produces an LCOV file, you can configure the file name through `haxeTestExplorer.lcovPath` setting. it defaults to `lcov.info` in your project root.\n\nif you are using instrument library for coverage you don't need to set `haxeTestExplorer.lcovPath`, because it auto-configures (requires at least instrument 1.3.0).\n\nonce your coverage run completes, VSCode should enable and show \"TEST COVERAGE\" view and also show file coverage in your \"EXPLORER\" view, as well as coloured line numbers in covered files.\n\nin case there is a delay between generating test results and writing your LCOV file you can set a wait time in milliseconds via `haxeTestExplorer.waitForCoverage` setting (default: `2000` ms). test explorer will delay showing test and coverage results to ensure both of them are ready when updating UI.\n\n### Attributable Coverage\n\nwhen running Coverage with instrument library (1.3.0 and higher) test-adapter will automatically collect and generate coverage results per testcase. which means you can filter and view indiviual coverage results and see which testcase generated what coverage for your source files. you can also view unfiltered coverage results produced by all tests included in your most recent coverage run.\n\nyou can disable attributable coverage filters by setting `haxeTestExplorer.enableAttributableCoverage` to `false` (default: `true`). instrument and test-adapter will still generate attributable coverage results, but it won't show filtering UI and you won't be able to dive into individual coverage generated by each testcase.\n\nuse `-D disable-attributable-coverage` to disable attributable coverage data collection when using test-adapter library in combination with instrument library.\n\n## Build from sources\n\n```bash\ncd ~/.vscode/extensions\ngit clone https://github.com/vshaxe/haxe-test-adapter\ncd haxe-test-adapter\nnpm install\nnpx haxe build.hxml\n\nhaxelib dev test-adapter test-adapter\n```\n\nIf you open the project in VSCode, the default `display.hxml` assumes you have all supported test frameworks installed. If you just want code completion for the sources of the extension itself, or the non-framework-specific parts of `test-adapter`, you can select `build.hxml` as your active Haxe configuration instead.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvshaxe%2Fhaxe-test-adapter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvshaxe%2Fhaxe-test-adapter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvshaxe%2Fhaxe-test-adapter/lists"}